| 1 |
swagger: '2.0' |
| 2 |
info: |
| 3 |
version: 1.0.9-abcd |
| 4 |
title: 'Swagger Sample API' |
| 5 |
description: 'A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification' |
| 6 |
termsOfService: 'http://helloreverb.com/terms/' |
| 7 |
contact: {name: 'wordnik api team', url: 'http://developer.wordnik.com'} |
| 8 |
license: {name: 'Creative Commons 4.0 International', url: 'http://creativecommons.org/licenses/by/4.0/'} |
| 9 |
host: my.api.com |
| 10 |
basePath: /v1 |
| 11 |
schemes: |
| 12 |
- http |
| 13 |
- https |
| 14 |
consumes: |
| 15 |
- application/json |
| 16 |
produces: |
| 17 |
- application/json |
| 18 |
- application/xml |
| 19 |
paths: |
| 20 |
'/pets/{id}': {parameters: [{name: id, in: path, description: 'ID of pet to use', required: true, type: array, items: {type: string}, collectionFormat: csv}], get: {description: 'Returns pets based on ID', summary: 'Find pets by ID', operationId: getPetsById, produces: [application/json, text/html], responses: {'200': {description: 'pet response', schema: {type: array, items: {$ref: Pet}}}, default: {description: 'error payload', schema: {$ref: ErrorModel}}}}} |
| 21 |
definitions: |
| 22 |
Pet: {required: [name], properties: {name: {type: string}, tag: {type: string}}} |
| 23 |
ErrorModel: {required: [code, message], properties: {code: {type: integer, format: int32}, message: {type: string}}} |