{ "opts": {}, "spec": { "swagger": "2.0", "title": "Petstore Sample API", "info": { "description": "A sample API that uses a petstore as an example to demonstrate features in the OpenAPI-2.0 specification", "title": "Petstore Sample API", "contact": { "name": "Wordnik API Team" }, "license": { "name": "MIT", "url": "http://github.com/gruntjs/grunt/blob/master/LICENSE-MIT" } }, "host": "petstore.swagger.io", "basePath": "/api", "paths": { "/pet": { "put": { "tags": [ "pet" ], "parameters": [ { "name": "body", "in": "body", "description": "Pet object that needs to be added to the store", "required": false, "schema": { "$ref": "#/definitions/Pet" } } ], "responses": { "405": { "description": "Validation exception" }, "404": { "description": "Pet not found" }, "400": { "description": "Invalid ID supplied" } } }, "post": { "tags": [ "pet" ], "parameters": [ { "name": "body", "in": "body", "description": "Pet object that needs to be added to the store", "required": false, "schema": { "$ref": "#/definitions/Tag" } } ], "responses": { "405": { "description": "Invalid input" } } } }, "/user/createWithList": { "post": { "tags": [ "user" ], "parameters": [ { "name": "body", "in": "body", "description": "List of user object", "required": false } ] } }, "/store/order/{orderId}": { "get": { "tags": [ "store" ], "parameters": [ { "name": "orderId", "in": "path", "description": "ID of pet that needs to be fetched", "required": true, "type": "string" } ], "responses": { "404": { "description": "Order not found" }, "400": { "description": "Invalid ID supplied" } } }, "delete": { "tags": [ "store" ], "parameters": [ { "name": "orderId", "in": "path", "description": "ID of the order that needs to be deleted", "required": true, "type": "string" } ], "responses": { "404": { "description": "Order not found" }, "400": { "description": "Invalid ID supplied" } } } }, "/user/createWithArray": { "post": { "tags": [ "user" ], "parameters": [ { "name": "body", "in": "body", "description": "List of user object", "required": false, "schema": { "$ref": "#/definitions/User" } } ] } }, "/store/order": { "post": { "tags": [ "store" ], "parameters": [ { "name": "body", "in": "body", "description": "order placed for purchasing the pet", "required": false, "schema": { "$ref": "#/definitions/Order" } } ], "responses": { "400": { "description": "Invalid Order" } } } }, "/pet/findByStatus": { "get": { "tags": [ "pet" ], "parameters": [ { "name": "status", "in": "query", "description": "Status values that need to be considered for filter", "required": false, "type": "string" } ], "responses": { "400": { "description": "Invalid status value" } } } }, "/user/{username}": { "get": { "tags": [ "user" ], "parameters": [ { "name": "username", "in": "path", "description": "The name that needs to be fetched. Use user1 for testing. ", "required": true, "type": "string" } ], "responses": { "404": { "description": "User not found" }, "400": { "description": "Invalid username supplied" } } }, "put": { "tags": [ "user" ], "parameters": [ { "name": "username", "in": "path", "description": "name that need to be deleted", "required": true, "type": "string" }, { "name": "body", "in": "body", "description": "Updated user object", "required": false, "schema": { "$ref": "#/definitions/User" } } ], "responses": { "404": { "description": "User not found" }, "400": { "description": "Invalid user supplied" } } }, "delete": { "tags": [ "user" ], "parameters": [ { "name": "username", "in": "path", "description": "The name that needs to be deleted", "required": true, "type": "string" } ], "responses": { "404": { "description": "User not found" }, "400": { "description": "Invalid username supplied" } } } }, "/pet/findByTags": { "get": { "tags": [ "pet" ], "parameters": [ { "name": "tags", "in": "query", "description": "Tags to filter by", "required": false, "type": "string" } ], "responses": { "400": { "description": "Invalid tag value" } } } }, "/user": { "post": { "tags": [ "user" ], "parameters": [ { "name": "body", "in": "body", "description": "Created user object", "required": false, "schema": { "$ref": "#/definitions/User" } } ] } }, "/pet/{petId}": { "get": { "tags": [ "pet" ], "parameters": [ { "name": "petId", "in": "path", "description": "ID of pet that needs to be fetched", "required": true, "type": "string" } ], "responses": { "404": { "description": "Pet not found" }, "400": { "description": "Invalid ID supplied" } } } }, "/user/logout": { "get": { "tags": [ "user" ] } }, "/user/login": { "get": { "tags": [ "user" ], "parameters": [ { "name": "username", "in": "query", "description": "The user name for login", "required": false, "type": "string" }, { "name": "password", "in": "query", "description": "The password for login in clear text", "required": false, "type": "string" } ], "responses": { "400": { "description": "Invalid username/password supplied" } } } } }, "definitions": { "User": { "properties": { "id": { "type": "integer", "format": "int32" }, "lastName": { "type": "string" }, "username": { "type": "string" }, "phone": { "type": "string" }, "email": { "type": "string" }, "userStatus": { "type": "integer", "format": "int32" }, "firstName": { "type": "string" }, "password": { "type": "string" } } }, "Category": { "properties": { "id": { "type": "integer", "format": "int32" }, "name": { "type": "string" } } }, "Pet": { "properties": { "id": { "type": "integer", "format": "int32" }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }, "category": { "$ref": "#/definitions/Category" }, "status": { "type": "string" }, "name": { "type": "string" }, "photoUrls": { "type": "array", "items": { "type": "string" } } } }, "Tag": { "properties": { "id": { "type": "integer", "format": "int32" }, "name": { "type": "string" } } }, "Order": { "properties": { "id": { "type": "integer", "format": "int32" }, "petId": { "type": "integer", "format": "int32" }, "status": { "type": "string" }, "complete": { "type": "boolean" }, "quantity": { "type": "integer", "format": "int32" }, "shipDate": { "type": "string", "format": "date-time" } } } } } }