-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
Hi,
Loving openapi-mock! One thing I've noticed is that if you have an array at the depth of 2 then the response from the server will show [Array] instead of the array values.
For example:
{ name: 'consequat et amet',
selections: [ { markets: [Array] } ] }
Ideally the selections.markets array (and any other arrays at deeper depths) would be expanded also so the properties in there can be parsed.
Yaml used in example:
swagger: '2.0'
info:
description: Card Data Service
version: 1.0.0
title: Card Data Service
termsOfService: 'http://swagger.io/terms/'
contact:
email: xxx@xxx.com
license:
name: MIT
host: 'localhost:10010'
basePath: /
schemes:
- http
paths:
'/cards':
get:
summary: Get Cards
description: Get all data necesary
operationId: getCards
produces:
- application/json
responses:
'200':
description: successful operation
schema:
$ref: '#/definitions/Card'
definitions:
Card:
type: object
required:
- name
- selections
properties:
name:
type: string
example: Example Card
selections:
type: array
items:
$ref: '#/definitions/CardSelection'
CardSelection:
type: object
required:
- markets
properties:
markets:
type: array
items:
$ref: '#/definitions/market'
market:
type: object
required:
- id
properties:
id:
type: string
example: 1
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels