Skip to content

Instantly share code, notes, and snippets.

@juaoose
Last active April 18, 2022 19:54
Show Gist options
  • Save juaoose/2460dc637ecfd6793947bd2cd3df436a to your computer and use it in GitHub Desktop.
Save juaoose/2460dc637ecfd6793947bd2cd3df436a to your computer and use it in GitHub Desktop.
"{\"openapi\":\"3.0.3\",\"info\":{\"title\":\"Swagger\",\"description\":\"This is a sample server Petstore server. You can find out more about Swagger at [http:\/\/swagger.io](http:\/\/swagger.io) or on [irc.freenode.net, #swagger](http:\/\/swagger.io\/irc\/). For this sample, you can use the api key `special-key` to test the authorization filters.\",\"termsOfService\":\"http:\/\/swagger.io\/terms\/\",\"contact\":{\"email\":\"apiteam@swagger.io\"},\"license\":{\"name\":\"Apache 2.0\",\"url\":\"http:\/\/www.apache.org\/licenses\/LICENSE-2.0.html\"},\"version\":\"1.0.0\"},\"externalDocs\":{\"description\":\"Find out more about Swagger\",\"url\":\"http:\/\/swagger.io\"},\"servers\":[{\"url\":\"https:\/\/petstore.swagger.io\/v2\"},{\"url\":\"http:\/\/petstore.swagger.io\/v2\"}],\"tags\":[{\"name\":\"pet\",\"description\":\"Everything about your Pets\",\"externalDocs\":{\"description\":\"Find out more\",\"url\":\"http:\/\/swagger.io\"}},{\"name\":\"store\",\"description\":\"Access to Petstore orders\"},{\"name\":\"user\",\"description\":\"Operations about user\",\"externalDocs\":{\"description\":\"Find out more about our store\",\"url\":\"http:\/\/swagger.io\"}}],\"paths\":{\"\/pet\":{\"put\":{\"tags\":[\"pet\"],\"summary\":\"Update an existing pet\",\"operationId\":\"updatePet\",\"requestBody\":{\"description\":\"Pet object that needs to be added to the store\",\"content\":{\"application\/json\":{\"schema\":{\"$ref\":\"#\/components\/schemas\/Pet\"}},\"application\/xml\":{\"schema\":{\"$ref\":\"#\/components\/schemas\/Pet\"}}},\"required\":true},\"responses\":{\"400\":{\"description\":\"Invalid ID supplied\",\"content\":{}},\"404\":{\"description\":\"Pet not found\",\"content\":{}},\"405\":{\"description\":\"Validation exception\",\"content\":{}}},\"security\":[{\"petstore_auth\":[\"write:pets\",\"read:pets\"]}],\"x-codegen-request-body-name\":\"body\"},\"post\":{\"tags\":[\"pet\"],\"summary\":\"Add a new pet to the store\",\"operationId\":\"addPet\",\"requestBody\":{\"description\":\"Pet object that needs to be added to the store\",\"content\":{\"application\/json\":{\"schema\":{\"$ref\":\"#\/components\/schemas\/Pet\"}},\"application\/xml\":{\"schema\":{\"$ref\":\"#\/components\/schemas\/Pet\"}}},\"required\":true},\"responses\":{\"405\":{\"description\":\"Invalid input\",\"content\":{}}},\"security\":[{\"petstore_auth\":[\"write:pets\",\"read:pets\"]}],\"x-codegen-request-body-name\":\"body\"}}},\"components\":{\"schemas\":{\"Category\":{\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"integer\",\"format\":\"int64\"},\"name\":{\"type\":\"string\"}},\"xml\":{\"name\":\"Category\"}},\"Tag\":{\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"integer\",\"format\":\"int64\"},\"name\":{\"type\":\"string\"}},\"xml\":{\"name\":\"Tag\"}},\"Pet\":{\"required\":[\"name\",\"photoUrls\"],\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"integer\",\"format\":\"int64\"},\"category\":{\"$ref\":\"#\/components\/schemas\/Category\"},\"name\":{\"type\":\"string\",\"example\":\"doggie\"},\"photoUrls\":{\"type\":\"array\",\"xml\":{\"name\":\"photoUrl\",\"wrapped\":true},\"items\":{\"type\":\"string\"}},\"tags\":{\"type\":\"array\",\"xml\":{\"name\":\"tag\",\"wrapped\":true},\"items\":{\"$ref\":\"#\/components\/schemas\/Tag\"}},\"status\":{\"type\":\"string\",\"description\":\"pet status in the store\",\"enum\":[\"available\",\"pending\",\"sold\"]}},\"xml\":{\"name\":\"Pet\"}}},\"securitySchemes\":{\"petstore_auth\":{\"type\":\"oauth2\",\"flows\":{\"implicit\":{\"authorizationUrl\":\"http:\/\/petstore.swagger.io\/oauth\/dialog\",\"scopes\":{\"write:pets\":\"modify pets in your account\",\"read:pets\":\"read your pets\"}}}}}}}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment