{ "openapi": "3.0.3", "info": { "description": "This is a sample server Petstore server.", "title": "OAS Petstore", "version": "1.0.0" }, "servers": [ { "url": "https://petstore.swagger.io/v2" }, { "url": "http://petstore.swagger.io/v2" } ], "components": { "requestBodies": { "Pet": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Pet" } } }, "description": "Pet object that needs to be added to the store", "required": true }, "UserArray": { "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/User" }, "type": "array" } } }, "description": "List of user object", "required": true } }, "schemas": { "Category": { "properties": { "id": { "format": "int64", "type": "integer" }, "name": { "type": "string" } }, "type": "object" }, "Pet": { "properties": { "category": { "$ref": "#/components/schemas/Category" }, "id": { "format": "int64", "type": "integer" }, "name": { "example": "doggie", "type": "string" }, "status": { "description": "pet status in the store", "enum": [ "available", "pending", "sold" ], "type": "string" }, "tags": { "items": { "$ref": "#/components/schemas/Tag" }, "type": "array" } }, "required": [ "name" ], "type": "object" }, "Tag": { "properties": { "id": { "format": "int64", "type": "integer" }, "name": { "type": "string" } }, "type": "object" }, "User": { "properties": { "email": { "type": "string" }, "firstName": { "type": "string" }, "id": { "format": "int64", "type": "integer" }, "lastName": { "type": "string" }, "password": { "type": "string" }, "phone": { "type": "string" }, "userStatus": { "description": "User Status", "format": "int32", "type": "integer" }, "username": { "type": "string" } }, "type": "object" } }, "securitySchemes": { "api_key": { "in": "header", "name": "api_key", "type": "apiKey" } } }, "externalDocs": { "description": "Find out more about Swagger", "url": "http://swagger.io" }, "paths": { "/pet": { "post": { "operationId": "addPet", "requestBody": { "$ref": "#/components/requestBodies/Pet" }, "responses": { "405": { "description": "Invalid input" } }, "summary": "Add a new pet to the store", "tags": [ "pet" ] }, "put": { "operationId": "updatePet", "requestBody": { "$ref": "#/components/requestBodies/Pet" }, "responses": { "400": { "description": "Invalid ID supplied" }, "404": { "description": "Pet not found" }, "405": { "description": "Validation exception" } }, "summary": "Update an existing pet", "tags": [ "pet" ] } }, "/pet/{petId}": { "delete": { "operationId": "deletePet", "parameters": [ { "in": "header", "name": "api_key", "schema": { "type": "string" } }, { "description": "Pet id to delete", "in": "path", "name": "petId", "required": true, "schema": { "format": "int64", "type": "integer" } } ], "responses": { "400": { "description": "Invalid ID supplied" }, "404": { "description": "Pet not found" } }, "summary": "Deletes a pet", "tags": [ "pet" ] }, "get": { "description": "Returns a single pet", "operationId": "getPetById", "parameters": [ { "description": "ID of pet to return", "in": "path", "name": "petId", "required": true, "schema": { "format": "int64", "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Pet" } } }, "description": "successful operation" }, "400": { "description": "Invalid ID supplied" }, "404": { "description": "Pet not found" } }, "summary": "Find pet by ID", "tags": [ "pet" ] }, "post": { "operationId": "updatePetWithForm", "parameters": [ { "description": "ID of pet that needs to be updated", "in": "path", "name": "petId", "required": true, "schema": { "format": "int64", "type": "integer" } } ], "requestBody": { "content": { "application/x-www-form-urlencoded": { "schema": { "properties": { "name": { "description": "Updated name of the pet", "type": "string" }, "status": { "description": "Updated status of the pet", "type": "string" } }, "type": "object" } } } }, "responses": { "405": { "description": "Invalid input" } }, "summary": "Updates a pet in the store with form data", "tags": [ "pet" ] } } }, "security": [ { "api_key": [] } ], "tags": [ { "description": "Everything about your Pets", "name": "pet" } ], "x-tyk-api-gateway": { "info": { "name": "petstore", "state": { "active": true } }, "upstream": { "url": "https://petstore.swagger.io/v2" }, "server": { "listenPath": { "value": "/petstore-test/", "strip": true } } } }