Created
July 10, 2017 15:13
-
-
Save alkemann/455643145fafae99bdf49fcd502fb706 to your computer and use it in GitHub Desktop.
Added lines 68 and 77
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: "Swagger Petstore" | |
basePath: "/v2" | |
schemes: | |
- "http" | |
paths: | |
/pet: | |
post: | |
tags: | |
- "pet" | |
summary: "Add a new pet to the store" | |
description: "" | |
operationId: "addPet" | |
consumes: | |
- "application/json" | |
- "application/xml" | |
produces: | |
- "application/xml" | |
- "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: | |
405: | |
description: "Invalid input" | |
security: | |
- api_key: [] | |
put: | |
tags: | |
- "pet" | |
summary: "Update an existing pet" | |
description: "" | |
operationId: "updatePet" | |
consumes: | |
- "application/json" | |
- "application/xml" | |
produces: | |
- "application/xml" | |
- "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 ID supplied" | |
404: | |
description: "Pet not found" | |
405: | |
description: "Validation exception" | |
security: | |
- petstore_auth: | |
- "write:pets" | |
- "read:pets" | |
securityDefinitions: | |
petstore_auth: | |
type: "oauth2" | |
description: "This is a description" | |
authorizationUrl: "http://petstore.swagger.io/oauth/dialog" | |
flow: "implicit" | |
scopes: | |
write:pets: "modify pets in your account" | |
read:pets: "read your pets" | |
api_key: | |
type: "apiKey" | |
name: "api_key" | |
description: "This is another description" | |
in: "header" | |
definitions: | |
Pet: | |
type: "object" | |
required: | |
- "name" | |
- "photoUrls" | |
properties: | |
id: | |
type: "integer" | |
format: "int64" | |
name: | |
type: "string" | |
example: "doggie" | |
photoUrls: | |
type: "array" | |
xml: | |
name: "photoUrl" | |
wrapped: true | |
items: | |
type: "string" | |
status: | |
type: "string" | |
description: "pet status in the store" | |
enum: | |
- "available" | |
- "pending" | |
- "sold" | |
xml: | |
name: "Pet" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment