forked from loafle/openapi-generator-original
559 lines
13 KiB
JSON
559 lines
13 KiB
JSON
{
|
|
"swagger": "2.0",
|
|
"info": {
|
|
"title": "Swagger Petstore",
|
|
"description": "This is a sample server Petstore server. You can find out more about Swagger at <a href="http://swagger.io">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key "special-key" to test the authorization filters",
|
|
"version": "1.0.0"
|
|
},
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"host": "localhost:8080",
|
|
"basePath": "/v2",
|
|
"paths": {
|
|
"/user": {
|
|
"post": {
|
|
"x-swagger-router-controller": "User",
|
|
"tags": [
|
|
"User"
|
|
],
|
|
"operationId": "createUser",
|
|
"parameters": [
|
|
{
|
|
"in": "body",
|
|
"name": "body",
|
|
"description": "Created user object",
|
|
"required": false,
|
|
"schema": {
|
|
"$ref": "#/definitions/User"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"default": {
|
|
"description": "successful operation"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/user/createWithArray": {
|
|
"post": {
|
|
"x-swagger-router-controller": "User",
|
|
"tags": [
|
|
"User"
|
|
],
|
|
"operationId": "createUsersWithArrayInput",
|
|
"parameters": [
|
|
{
|
|
"in": "body",
|
|
"name": "body",
|
|
"description": "List of user object",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/User"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"default": {
|
|
"description": "successful operation"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/user/createWithList": {
|
|
"post": {
|
|
"x-swagger-router-controller": "User",
|
|
"tags": [
|
|
"User"
|
|
],
|
|
"operationId": "createUsersWithListInput",
|
|
"parameters": [
|
|
{
|
|
"in": "body",
|
|
"name": "body",
|
|
"description": "List of user object",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/User"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"default": {
|
|
"description": "successful operation"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/user/login": {
|
|
"get": {
|
|
"x-swagger-router-controller": "User",
|
|
"tags": [
|
|
"User"
|
|
],
|
|
"operationId": "loginUser",
|
|
"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": {
|
|
"200": {
|
|
"description": "successful operation",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Invalid username/password supplied"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/user/logout": {
|
|
"get": {
|
|
"x-swagger-router-controller": "User",
|
|
"tags": [
|
|
"User"
|
|
],
|
|
"operationId": "logoutUser",
|
|
"responses": {
|
|
"default": {
|
|
"description": "successful operation"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/user/{username}": {
|
|
"delete": {
|
|
"x-swagger-router-controller": "User",
|
|
"tags": [
|
|
"User"
|
|
],
|
|
"operationId": "deleteUser",
|
|
"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": {
|
|
"post": {
|
|
"x-swagger-router-controller": "Pet",
|
|
"tags": [
|
|
"Pet"
|
|
],
|
|
"operationId": "addPet",
|
|
"parameters": [
|
|
{
|
|
"in": "body",
|
|
"name": "body",
|
|
"description": "Pet object that needs to be added to the store",
|
|
"required": false,
|
|
"schema": {
|
|
"$ref": "#/definitions/Pet"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"405": {
|
|
"description": "Invalid input"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/pet/findByStatus": {
|
|
"get": {
|
|
"x-swagger-router-controller": "Pet",
|
|
"tags": [
|
|
"Pet"
|
|
],
|
|
"operationId": "findPetsByStatus",
|
|
"parameters": [
|
|
{
|
|
"name": "status",
|
|
"in": "query",
|
|
"description": "Status values that need to be considered for filter",
|
|
"required": false,
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"collectionFormat": "multi",
|
|
"default": "available"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful operation",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/Pet"
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Invalid status value"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/pet/findByTags": {
|
|
"get": {
|
|
"x-swagger-router-controller": "Pet",
|
|
"tags": [
|
|
"Pet"
|
|
],
|
|
"operationId": "findPetsByTags",
|
|
"parameters": [
|
|
{
|
|
"name": "tags",
|
|
"in": "query",
|
|
"description": "Tags to filter by",
|
|
"required": false,
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"collectionFormat": "multi"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful operation",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/Pet"
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Invalid tag value"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/pet/{petId}": {
|
|
"delete": {
|
|
"x-swagger-router-controller": "Pet",
|
|
"tags": [
|
|
"Pet"
|
|
],
|
|
"operationId": "deletePet",
|
|
"parameters": [
|
|
{
|
|
"name": "api_key",
|
|
"in": "header",
|
|
"description": "",
|
|
"required": false,
|
|
"type": "string"
|
|
},
|
|
{
|
|
"name": "petId",
|
|
"in": "path",
|
|
"description": "Pet id to delete",
|
|
"required": true,
|
|
"type": "integer",
|
|
"format": "int64"
|
|
}
|
|
],
|
|
"responses": {
|
|
"400": {
|
|
"description": "Invalid pet value"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/pet/{petId}/uploadImage": {
|
|
"post": {
|
|
"x-swagger-router-controller": "Pet",
|
|
"tags": [
|
|
"Pet"
|
|
],
|
|
"operationId": "uploadFile",
|
|
"parameters": [
|
|
{
|
|
"name": "petId",
|
|
"in": "path",
|
|
"description": "ID of pet to update",
|
|
"required": true,
|
|
"type": "integer",
|
|
"format": "int64"
|
|
},
|
|
{
|
|
"name": "additionalMetadata",
|
|
"in": "formData",
|
|
"description": "Additional data to pass to server",
|
|
"required": false,
|
|
"type": "string"
|
|
},
|
|
{
|
|
"name": "file",
|
|
"in": "formData",
|
|
"description": "file to upload",
|
|
"required": false,
|
|
"type": "file"
|
|
}
|
|
],
|
|
"responses": {
|
|
"default": {
|
|
"description": "successful operation"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/store/inventory": {
|
|
"get": {
|
|
"x-swagger-router-controller": "Store",
|
|
"tags": [
|
|
"Store"
|
|
],
|
|
"operationId": "getInventory",
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful operation",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "integer",
|
|
"format": "int32"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/store/order": {
|
|
"post": {
|
|
"x-swagger-router-controller": "Store",
|
|
"tags": [
|
|
"Store"
|
|
],
|
|
"operationId": "placeOrder",
|
|
"parameters": [
|
|
{
|
|
"in": "body",
|
|
"name": "body",
|
|
"description": "order placed for purchasing the pet",
|
|
"required": false,
|
|
"schema": {
|
|
"$ref": "#/definitions/Order"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "successful operation",
|
|
"schema": {
|
|
"$ref": "#/definitions/Order"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Invalid Order"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/store/order/{orderId}": {
|
|
"delete": {
|
|
"x-swagger-router-controller": "Store",
|
|
"tags": [
|
|
"Store"
|
|
],
|
|
"operationId": "deleteOrder",
|
|
"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"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"definitions": {
|
|
"User": {
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer",
|
|
"format": "int64"
|
|
},
|
|
"username": {
|
|
"type": "string"
|
|
},
|
|
"firstName": {
|
|
"type": "string"
|
|
},
|
|
"lastName": {
|
|
"type": "string"
|
|
},
|
|
"email": {
|
|
"type": "string"
|
|
},
|
|
"password": {
|
|
"type": "string"
|
|
},
|
|
"phone": {
|
|
"type": "string"
|
|
},
|
|
"userStatus": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "User Status"
|
|
}
|
|
},
|
|
"xml": {
|
|
"name": "User"
|
|
}
|
|
},
|
|
"Category": {
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer",
|
|
"format": "int64"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"xml": {
|
|
"name": "Category"
|
|
}
|
|
},
|
|
"Pet": {
|
|
"required": [
|
|
"name",
|
|
"photoUrls"
|
|
],
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer",
|
|
"format": "int64"
|
|
},
|
|
"category": {
|
|
"$ref": "#/definitions/Category"
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"example": "doggie"
|
|
},
|
|
"photoUrls": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"tags": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/Tag"
|
|
}
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"description": "pet status in the store",
|
|
"enum": [
|
|
"available",
|
|
"pending",
|
|
"sold"
|
|
]
|
|
}
|
|
},
|
|
"xml": {
|
|
"name": "Pet"
|
|
}
|
|
},
|
|
"Tag": {
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer",
|
|
"format": "int64"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"xml": {
|
|
"name": "Tag"
|
|
}
|
|
},
|
|
"Order": {
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer",
|
|
"format": "int64"
|
|
},
|
|
"petId": {
|
|
"type": "integer",
|
|
"format": "int64"
|
|
},
|
|
"quantity": {
|
|
"type": "integer",
|
|
"format": "int32"
|
|
},
|
|
"shipDate": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"description": "Order Status",
|
|
"enum": [
|
|
"placed",
|
|
"approved",
|
|
"delivered"
|
|
]
|
|
},
|
|
"complete": {
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"xml": {
|
|
"name": "Order"
|
|
}
|
|
}
|
|
}
|
|
} |