Hi, I want to know how to get many response data...
I made swagger.yaml like below, and then I tried to get response, but I got
only 2 response data like below......
[swagger.yml]
swagger: '2.0'
info:
description: This is a sample API mock
version: 1.0.0
title: Sample API Mock
contact:
email: [email protected]
# tags are used for organizing operations
tags:
- name: users
description: Operations available to users
paths:
/stores:
get:
tags:
- users
summary: searches stores
operationId: searchStore
description: |
By passing in the appropriate options, you can search for
available stores in the system
produces:
- application/json
parameters:
- in: query
name: cost
description: budget of dishes
required: true
type: integer
format: int32
- in: query
name: gender
description: target gender of store
required: true
type: integer
format: int32
- in: query
name: numberOfCustomer
description: suitable number for store
required: true
type: integer
format: int32
- in: query
name: area
description: area of store
required: true
type: string
- in: query
name: category
type: string
required: true
description: category of store
responses:
200:
description: search results matching criteria
schema:
type: array
items:
$ref: '#/definitions/StoreItem'
400:
description: bad input parameter
definitions:
StoreItem:
type: object
required:
- id
- img
properties:
id:
type: integer
example: 1
description: store id
img:
type: string
example: sample
items:
example:
- id: 1
img: sample
- id: 2
img: sample2
- id: 3
img: sample3
- id: 4
img: sample4
# Added by API Auto Mocking Plugin
host: virtserver.swaggerhub.com
basePath: /kikuchi-s/api/1.0.0
schemes:
- https
[response data]
[
{
"id": 1
"img": "sample",
},
{
"id": 1
"img": "sample",
}
]
but I defined 4 examples on definitions schema, so I want to get response
data like below.
[ideal response data]
[
{
"id": 1
"img": "sample",
},
{
"id": 2
"img": "sample2",
},
{
"id": 3
"img": "sample3",
},
{
"id": 4
"img": "sample4",
}
]
--
You received this message because you are subscribed to the Google Groups
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.