Last active
August 1, 2019 13:55
-
-
Save lemoinem/0b3d7d065d9337a898d5ee2bc49654a2 to your computer and use it in GitHub Desktop.
This file contains 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: | |
description: "This spec is mainly for testing Petstore server" | |
version: 1.0.0 | |
title: OpenAPI Petstore | |
license: | |
name: Apache-2.0 | |
url: 'http://www.apache.org/licenses/LICENSE-2.0.html' | |
host: petstore.swagger.io:80 | |
basePath: /v2 | |
tags: | |
- name: pet | |
description: Everything about your Pets | |
schemes: | |
- http | |
paths: | |
/pet: | |
post: | |
tags: | |
- pet | |
summary: Add a new pet to the store | |
description: '' | |
operationId: addPet | |
consumes: | |
- application/json | |
produces: | |
- application/json | |
parameters: | |
- in: body | |
name: body | |
description: Pet object that needs to be added to the store | |
required: true | |
schema: | |
$ref: '#/definitions/Pet' | |
responses: | |
'400': | |
description: Invalid input | |
definitions: | |
Pet: | |
type: object | |
required: | |
- name | |
properties: | |
id: | |
type: integer | |
format: int64 | |
x-is-unique: true | |
name: | |
type: string | |
example: doggie | |
pets: | |
type: array | |
items: | |
$ref: '#/definitions/Pet' |
This file contains 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
openapi: 3.0.0 | |
info: | |
description: This spec is mainly for testing Petstore server | |
version: 1.0.0 | |
title: OpenAPI Petstore | |
license: | |
name: Apache-2.0 | |
url: http://www.apache.org/licenses/LICENSE-2.0.html | |
tags: | |
- name: pet | |
description: Everything about your Pets | |
paths: | |
/pet: | |
post: | |
tags: | |
- pet | |
summary: Add a new pet to the store | |
description: "" | |
operationId: addPet | |
requestBody: | |
content: | |
application/json: | |
schema: | |
$ref: "#/components/schemas/Pet" | |
description: Pet object that needs to be added to the store | |
required: true | |
responses: | |
"400": | |
description: Invalid input | |
servers: | |
- url: http://petstore.swagger.io:80/v2 | |
components: | |
schemas: | |
Pet: | |
type: object | |
required: | |
- name | |
properties: | |
id: | |
type: integer | |
format: int64 | |
x-is-unique: true | |
name: | |
type: string | |
example: doggie | |
pets: | |
type: array | |
items: | |
$ref: "#/components/schemas/Pet" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment