|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425 |
- {
- "apiVersion": "1.0.0",
- "swaggerVersion": "1.2",
- "basePath": "http://petstore.swagger.io/api",
- "resourcePath": "/pet",
- "produces": [
- "application/json",
- "application/xml",
- "text/plain",
- "text/html"
- ],
- "apis": [
- {
- "path": "/pet/{petId}",
- "operations": [
- {
- "method": "GET",
- "summary": "Find pet by ID",
- "notes": "Returns a pet based on ID",
- "type": "Pet",
- "nickname": "getPetById",
- "authorizations": {},
- "parameters": [
- {
- "name": "petId",
- "description": "ID of pet that needs to be fetched",
- "required": true,
- "type": "integer",
- "format": "int64",
- "paramType": "path",
- "minimum": "1.0",
- "maximum": "100000.0"
- }
- ],
- "responseMessages": [
- {
- "code": 400,
- "message": "Invalid ID supplied"
- },
- {
- "code": 404,
- "message": "Pet not found"
- }
- ]
- },
- {
- "method": "PATCH",
- "summary": "partial updates to a pet",
- "notes": "",
- "type": "array",
- "items": {
- "$ref": "Pet"
- },
- "nickname": "partialUpdate",
- "produces": [
- "application/json",
- "application/xml"
- ],
- "consumes": [
- "application/json",
- "application/xml"
- ],
- "authorizations": {
- "oauth2": [
- {
- "scope": "test:anything",
- "description": "anything"
- }
- ]
- },
- "parameters": [
- {
- "name": "petId",
- "description": "ID of pet that needs to be fetched",
- "required": true,
- "type": "string",
- "paramType": "path"
- },
- {
- "name": "body",
- "description": "Pet object that needs to be added to the store",
- "required": true,
- "type": "Pet",
- "paramType": "body"
- }
- ],
- "responseMessages": [
- {
- "code": 400,
- "message": "Invalid tag value"
- }
- ]
- },
- {
- "method": "POST",
- "summary": "Updates a pet in the store with form data",
- "notes": "",
- "type": "void",
- "nickname": "updatePetWithForm",
- "consumes": [
- "application/x-www-form-urlencoded"
- ],
- "authorizations": {
- "oauth2": [
- {
- "scope": "test:anything",
- "description": "anything"
- }
- ]
- },
- "parameters": [
- {
- "name": "petId",
- "description": "ID of pet that needs to be updated",
- "required": true,
- "type": "string",
- "paramType": "path"
- },
- {
- "name": "name",
- "description": "Updated name of the pet",
- "required": false,
- "type": "string",
- "paramType": "form"
- },
- {
- "name": "status",
- "description": "Updated status of the pet",
- "required": false,
- "type": "string",
- "paramType": "form"
- }
- ],
- "responseMessages": [
- {
- "code": 405,
- "message": "Invalid input"
- }
- ]
- },
- {
- "method": "DELETE",
- "summary": "Deletes a pet",
- "notes": "",
- "type": "void",
- "nickname": "deletePet",
- "authorizations": {
- "oauth2": [
- {
- "scope": "test:anything",
- "description": "anything"
- }
- ]
- },
- "parameters": [
- {
- "name": "petId",
- "description": "Pet id to delete",
- "required": true,
- "type": "string",
- "paramType": "path"
- }
- ],
- "responseMessages": [
- {
- "code": 400,
- "message": "Invalid pet value"
- }
- ]
- }
- ]
- },
- {
- "path": "/pet",
- "operations": [
- {
- "method": "PUT",
- "summary": "Update an existing pet",
- "notes": "",
- "type": "void",
- "nickname": "updatePet",
- "authorizations": {},
- "parameters": [
- {
- "name": "body",
- "description": "Pet object that needs to be updated in the store",
- "required": true,
- "type": "Pet",
- "paramType": "body"
- }
- ],
- "responseMessages": [
- {
- "code": 400,
- "message": "Invalid ID supplied"
- },
- {
- "code": 404,
- "message": "Pet not found"
- },
- {
- "code": 405,
- "message": "Validation exception"
- }
- ]
- },
- {
- "method": "POST",
- "summary": "Add a new pet to the store",
- "notes": "",
- "type": "void",
- "nickname": "addPet",
- "consumes": [
- "application/json",
- "application/xml"
- ],
- "authorizations": {
- "oauth2": [
- {
- "scope": "test:anything",
- "description": "anything"
- }
- ]
- },
- "parameters": [
- {
- "name": "body",
- "description": "Pet object that needs to be added to the store",
- "required": true,
- "type": "Pet",
- "paramType": "body"
- }
- ],
- "responseMessages": [
- {
- "code": 405,
- "message": "Invalid input"
- }
- ]
- }
- ]
- },
- {
- "path": "/pet/findByStatus",
- "operations": [
- {
- "method": "GET",
- "summary": "Finds Pets by status",
- "notes": "Multiple status values can be provided with comma seperated strings",
- "type": "array",
- "items": {
- "$ref": "Pet"
- },
- "nickname": "findPetsByStatus",
- "authorizations": {},
- "parameters": [
- {
- "name": "status",
- "description": "Status values that need to be considered for filter",
- "defaultValue": "available",
- "required": true,
- "type": "string",
- "paramType": "query",
- "enum": [
- "available",
- "pending",
- "sold"
- ]
- }
- ],
- "responseMessages": [
- {
- "code": 400,
- "message": "Invalid status value"
- }
- ]
- }
- ]
- },
- {
- "path": "/pet/findByTags",
- "operations": [
- {
- "method": "GET",
- "summary": "Finds Pets by tags",
- "notes": "Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.",
- "type": "array",
- "items": {
- "$ref": "Pet"
- },
- "nickname": "findPetsByTags",
- "authorizations": {},
- "parameters": [
- {
- "name": "tags",
- "description": "Tags to filter by",
- "required": true,
- "type": "string",
- "paramType": "query"
- }
- ],
- "responseMessages": [
- {
- "code": 400,
- "message": "Invalid tag value"
- }
- ],
- "deprecated": "true"
- }
- ]
- },
- {
- "path": "/pet/uploadImage",
- "operations": [
- {
- "method": "POST",
- "summary": "uploads an image",
- "notes": "",
- "type": "void",
- "nickname": "uploadFile",
- "consumes": [
- "multipart/form-data"
- ],
- "authorizations": {
- "oauth2": [
- {
- "scope": "test:anything",
- "description": "anything"
- },
- {
- "scope": "test:nothing",
- "description": "nothing"
- }
- ]
- },
- "parameters": [
- {
- "name": "additionalMetadata",
- "description": "Additional data to pass to server",
- "required": false,
- "type": "string",
- "paramType": "form"
- },
- {
- "name": "file",
- "description": "file to upload",
- "required": false,
- "type": "File",
- "paramType": "body"
- }
- ]
- }
- ]
- }
- ],
- "models": {
- "Tag": {
- "id": "Tag",
- "properties": {
- "id": {
- "type": "integer",
- "format": "int64"
- },
- "name": {
- "type": "string"
- }
- }
- },
- "Pet": {
- "id": "Pet",
- "required": [
- "id",
- "name"
- ],
- "properties": {
- "id": {
- "type": "integer",
- "format": "int64",
- "description": "unique identifier for the pet",
- "minimum": "0.0",
- "maximum": "100.0"
- },
- "category": {
- "$ref": "Category"
- },
- "name": {
- "type": "string"
- },
- "photoUrls": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "tags": {
- "type": "array",
- "items": {
- "$ref": "Tag"
- }
- },
- "status": {
- "type": "string",
- "description": "pet status in the store",
- "enum": [
- "available",
- "pending",
- "sold"
- ]
- }
- }
- },
- "Category": {
- "id": "Category",
- "properties": {
- "id": {
- "type": "integer",
- "format": "int64"
- },
- "name": {
- "type": "string"
- }
- }
- }
- }
- }
|