Created
February 11, 2016 05:05
-
-
Save cellularmitosis/2e88c09e8a5c7f27abfb to your computer and use it in GitHub Desktop.
test of swagger 'enum' allowed values in response object.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
swagger: '2.0' | |
info: | |
version: 1.0.0 | |
title: PetStore on Heroku | |
description: | | |
**This example has a working backend hosted in Heroku** | |
You can try all HTTP operation described in this Swagger spec. | |
Find source code of this API [here](https://github.com/mohsen1/petstore-api) | |
host: petstore-api.herokuapp.com | |
basePath: /pet | |
schemes: | |
- http | |
- https | |
consumes: | |
- application/json | |
produces: | |
- application/json | |
paths: | |
/: | |
get: | |
parameters: | |
- name: limit | |
in: query | |
description: number of pets to return | |
type: integer | |
default: 11 | |
minimum: 11 | |
maximum: 10000 | |
responses: | |
200: | |
description: List all pets | |
schema: | |
title: Pets | |
type: array | |
items: | |
$ref: '#/definitions/Pet' | |
/{petId}: | |
get: | |
parameters: | |
- name: petId | |
in: path | |
type: string | |
description: ID of the pet | |
required: true | |
responses: | |
200: | |
description: Sends the pet with pet Id | |
schema: | |
title: Pet | |
$ref: '#/definitions/Pet' | |
definitions: | |
Pet: | |
type: object | |
properties: | |
name: | |
type: string | |
enum: | |
- Fido | |
- Fifi | |
birthday: | |
type: integer | |
format: int32 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment