forked from loafle/openapi-generator-original
pulled from live server
This commit is contained in:
parent
a0ea195ffc
commit
166a18bfc8
@ -1,19 +1,19 @@
|
|||||||
{
|
{
|
||||||
"swagger": "2.0",
|
"swagger": "2.0",
|
||||||
"info": {
|
"info": {
|
||||||
"description": "This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.wordnik.com\">http://swagger.wordnik.com</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters",
|
"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",
|
"version": "1.0.0",
|
||||||
"title": "Swagger Petstore",
|
"title": "Swagger Petstore",
|
||||||
"termsOfService": "http://helloreverb.com/terms/",
|
"termsOfService": "http://helloreverb.com/terms/",
|
||||||
"contact": {
|
"contact": {
|
||||||
"name": "apiteam@wordnik.com"
|
"email": "apiteam@wordnik.com"
|
||||||
},
|
},
|
||||||
"license": {
|
"license": {
|
||||||
"name": "Apache 2.0",
|
"name": "Apache 2.0",
|
||||||
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
|
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"host": "petstore.swagger.wordnik.com",
|
"host": "petstore.swagger.io",
|
||||||
"basePath": "/v2",
|
"basePath": "/v2",
|
||||||
"schemes": [
|
"schemes": [
|
||||||
"http"
|
"http"
|
||||||
@ -38,7 +38,7 @@
|
|||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"in": "body",
|
"in": "body",
|
||||||
"name": "pet",
|
"name": "body",
|
||||||
"description": "Pet object that needs to be added to the store",
|
"description": "Pet object that needs to be added to the store",
|
||||||
"required": false,
|
"required": false,
|
||||||
"schema": {
|
"schema": {
|
||||||
@ -121,15 +121,16 @@
|
|||||||
],
|
],
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"in": "query",
|
|
||||||
"name": "status",
|
"name": "status",
|
||||||
|
"in": "query",
|
||||||
"description": "Status values that need to be considered for filter",
|
"description": "Status values that need to be considered for filter",
|
||||||
"required": false,
|
"required": false,
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"collectionFormat": "multi"
|
"collectionFormat": "multi",
|
||||||
|
"default": "available"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"responses": {
|
"responses": {
|
||||||
@ -170,8 +171,8 @@
|
|||||||
],
|
],
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"in": "query",
|
|
||||||
"name": "tags",
|
"name": "tags",
|
||||||
|
"in": "query",
|
||||||
"description": "Tags to filter by",
|
"description": "Tags to filter by",
|
||||||
"required": false,
|
"required": false,
|
||||||
"type": "array",
|
"type": "array",
|
||||||
@ -205,29 +206,6 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/pet/{petId}/upload": {
|
|
||||||
"post": {
|
|
||||||
"tags": [ "pet" ],
|
|
||||||
"summary": "Upload an image for a pet",
|
|
||||||
"operationId": "uploadImage",
|
|
||||||
"consumes": [
|
|
||||||
"multipart/form-data"
|
|
||||||
],
|
|
||||||
"parameters": [
|
|
||||||
{
|
|
||||||
"in": "formData",
|
|
||||||
"name": "petImage",
|
|
||||||
"description": "image to upload",
|
|
||||||
"type": "file"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"responses": {
|
|
||||||
"default": {
|
|
||||||
"description": "it worked"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"/pet/{petId}": {
|
"/pet/{petId}": {
|
||||||
"get": {
|
"get": {
|
||||||
"tags": [
|
"tags": [
|
||||||
@ -242,8 +220,8 @@
|
|||||||
],
|
],
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"in": "path",
|
|
||||||
"name": "petId",
|
"name": "petId",
|
||||||
|
"in": "path",
|
||||||
"description": "ID of pet that needs to be fetched",
|
"description": "ID of pet that needs to be fetched",
|
||||||
"required": true,
|
"required": true,
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
@ -292,24 +270,24 @@
|
|||||||
],
|
],
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"in": "path",
|
|
||||||
"name": "petId",
|
"name": "petId",
|
||||||
|
"in": "path",
|
||||||
"description": "ID of pet that needs to be updated",
|
"description": "ID of pet that needs to be updated",
|
||||||
"required": true,
|
"required": true,
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"in": "formData",
|
|
||||||
"name": "name",
|
"name": "name",
|
||||||
|
"in": "formData",
|
||||||
"description": "Updated name of the pet",
|
"description": "Updated name of the pet",
|
||||||
"required": true,
|
"required": false,
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"in": "formData",
|
|
||||||
"name": "status",
|
"name": "status",
|
||||||
|
"in": "formData",
|
||||||
"description": "Updated status of the pet",
|
"description": "Updated status of the pet",
|
||||||
"required": true,
|
"required": false,
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@ -340,15 +318,15 @@
|
|||||||
],
|
],
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"in": "header",
|
|
||||||
"name": "api_key",
|
"name": "api_key",
|
||||||
|
"in": "header",
|
||||||
"description": "",
|
"description": "",
|
||||||
"required": true,
|
"required": false,
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"in": "path",
|
|
||||||
"name": "petId",
|
"name": "petId",
|
||||||
|
"in": "path",
|
||||||
"description": "Pet id to delete",
|
"description": "Pet id to delete",
|
||||||
"required": true,
|
"required": true,
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
@ -370,6 +348,91 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"/pet/{petId}/uploadImage": {
|
||||||
|
"post": {
|
||||||
|
"tags": [
|
||||||
|
"pet"
|
||||||
|
],
|
||||||
|
"summary": "uploads an image",
|
||||||
|
"description": "",
|
||||||
|
"operationId": "uploadFile",
|
||||||
|
"consumes": [
|
||||||
|
"multipart/form-data"
|
||||||
|
],
|
||||||
|
"produces": [
|
||||||
|
"application/json",
|
||||||
|
"application/xml"
|
||||||
|
],
|
||||||
|
"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"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"security": [
|
||||||
|
{
|
||||||
|
"petstore_auth": [
|
||||||
|
"write:pets",
|
||||||
|
"read:pets"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/store/inventory": {
|
||||||
|
"get": {
|
||||||
|
"tags": [
|
||||||
|
"store"
|
||||||
|
],
|
||||||
|
"summary": "Returns pet inventories by status",
|
||||||
|
"description": "Returns a map of status codes to quantities",
|
||||||
|
"operationId": "getInventory",
|
||||||
|
"produces": [
|
||||||
|
"application/json",
|
||||||
|
"application/xml"
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "successful operation",
|
||||||
|
"schema": {
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": {
|
||||||
|
"type": "integer",
|
||||||
|
"format": "int32"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"security": [
|
||||||
|
{
|
||||||
|
"api_key": []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
"/store/order": {
|
"/store/order": {
|
||||||
"post": {
|
"post": {
|
||||||
"tags": [
|
"tags": [
|
||||||
@ -420,8 +483,8 @@
|
|||||||
],
|
],
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"in": "path",
|
|
||||||
"name": "orderId",
|
"name": "orderId",
|
||||||
|
"in": "path",
|
||||||
"description": "ID of pet that needs to be fetched",
|
"description": "ID of pet that needs to be fetched",
|
||||||
"required": true,
|
"required": true,
|
||||||
"type": "string"
|
"type": "string"
|
||||||
@ -455,8 +518,8 @@
|
|||||||
],
|
],
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"in": "path",
|
|
||||||
"name": "orderId",
|
"name": "orderId",
|
||||||
|
"in": "path",
|
||||||
"description": "ID of the order that needs to be deleted",
|
"description": "ID of the order that needs to be deleted",
|
||||||
"required": true,
|
"required": true,
|
||||||
"type": "string"
|
"type": "string"
|
||||||
@ -523,7 +586,7 @@
|
|||||||
"schema": {
|
"schema": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"$ref": "User"
|
"$ref": "#/definitions/User"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -582,15 +645,15 @@
|
|||||||
],
|
],
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"in": "query",
|
|
||||||
"name": "username",
|
"name": "username",
|
||||||
|
"in": "query",
|
||||||
"description": "The user name for login",
|
"description": "The user name for login",
|
||||||
"required": false,
|
"required": false,
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"in": "query",
|
|
||||||
"name": "password",
|
"name": "password",
|
||||||
|
"in": "query",
|
||||||
"description": "The password for login in clear text",
|
"description": "The password for login in clear text",
|
||||||
"required": false,
|
"required": false,
|
||||||
"type": "string"
|
"type": "string"
|
||||||
@ -642,8 +705,8 @@
|
|||||||
],
|
],
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"in": "path",
|
|
||||||
"name": "username",
|
"name": "username",
|
||||||
|
"in": "path",
|
||||||
"description": "The name that needs to be fetched. Use user1 for testing. ",
|
"description": "The name that needs to be fetched. Use user1 for testing. ",
|
||||||
"required": true,
|
"required": true,
|
||||||
"type": "string"
|
"type": "string"
|
||||||
@ -677,8 +740,8 @@
|
|||||||
],
|
],
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"in": "path",
|
|
||||||
"name": "username",
|
"name": "username",
|
||||||
|
"in": "path",
|
||||||
"description": "name that need to be deleted",
|
"description": "name that need to be deleted",
|
||||||
"required": true,
|
"required": true,
|
||||||
"type": "string"
|
"type": "string"
|
||||||
@ -715,8 +778,8 @@
|
|||||||
],
|
],
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"in": "path",
|
|
||||||
"name": "username",
|
"name": "username",
|
||||||
|
"in": "path",
|
||||||
"description": "The name that needs to be deleted",
|
"description": "The name that needs to be deleted",
|
||||||
"required": true,
|
"required": true,
|
||||||
"type": "string"
|
"type": "string"
|
||||||
@ -741,8 +804,12 @@
|
|||||||
},
|
},
|
||||||
"petstore_auth": {
|
"petstore_auth": {
|
||||||
"type": "oauth2",
|
"type": "oauth2",
|
||||||
"authorizationUrl": "http://petstore.swagger.wordnik.com/api/oauth/dialog",
|
"authorizationUrl": "http://petstore.swagger.io/api/oauth/dialog",
|
||||||
"flow": "implicit"
|
"flow": "implicit",
|
||||||
|
"scopes": {
|
||||||
|
"write:pets": "modify pets in your account",
|
||||||
|
"read:pets": "read your pets"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"definitions": {
|
"definitions": {
|
||||||
@ -750,53 +817,29 @@
|
|||||||
"properties": {
|
"properties": {
|
||||||
"id": {
|
"id": {
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
"format": "int64",
|
"format": "int64"
|
||||||
"xml": {
|
|
||||||
"name": "id"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"username": {
|
"username": {
|
||||||
"type": "string",
|
"type": "string"
|
||||||
"xml": {
|
|
||||||
"name": "username"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"firstName": {
|
"firstName": {
|
||||||
"type": "string",
|
"type": "string"
|
||||||
"xml": {
|
|
||||||
"name": "firstName"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"lastName": {
|
"lastName": {
|
||||||
"type": "string",
|
"type": "string"
|
||||||
"xml": {
|
|
||||||
"name": "lastName"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"email": {
|
"email": {
|
||||||
"type": "string",
|
"type": "string"
|
||||||
"xml": {
|
|
||||||
"name": "email"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"password": {
|
"password": {
|
||||||
"type": "string",
|
"type": "string"
|
||||||
"xml": {
|
|
||||||
"name": "password"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"phone": {
|
"phone": {
|
||||||
"type": "string",
|
"type": "string"
|
||||||
"xml": {
|
|
||||||
"name": "phone"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"userStatus": {
|
"userStatus": {
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
"format": "int32",
|
"format": "int32",
|
||||||
"xml": {
|
|
||||||
"name": "userStatus"
|
|
||||||
},
|
|
||||||
"description": "User Status"
|
"description": "User Status"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -808,16 +851,10 @@
|
|||||||
"properties": {
|
"properties": {
|
||||||
"id": {
|
"id": {
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
"format": "int64",
|
"format": "int64"
|
||||||
"xml": {
|
|
||||||
"name": "id"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"name": {
|
"name": {
|
||||||
"type": "string",
|
"type": "string"
|
||||||
"xml": {
|
|
||||||
"name": "name"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"xml": {
|
"xml": {
|
||||||
@ -832,23 +869,14 @@
|
|||||||
"properties": {
|
"properties": {
|
||||||
"id": {
|
"id": {
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
"format": "int64",
|
"format": "int64"
|
||||||
"xml": {
|
|
||||||
"name": "id"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"category": {
|
"category": {
|
||||||
"xml": {
|
"$ref": "#/definitions/Category"
|
||||||
"name": "category"
|
|
||||||
},
|
|
||||||
"$ref": "Category"
|
|
||||||
},
|
},
|
||||||
"name": {
|
"name": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"example": "doggie",
|
"example": "doggie"
|
||||||
"xml": {
|
|
||||||
"name": "name"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"photoUrls": {
|
"photoUrls": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
@ -867,15 +895,17 @@
|
|||||||
"wrapped": true
|
"wrapped": true
|
||||||
},
|
},
|
||||||
"items": {
|
"items": {
|
||||||
"$ref": "Tag"
|
"$ref": "#/definitions/Tag"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"status": {
|
"status": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"xml": {
|
"description": "pet status in the store",
|
||||||
"name": "status"
|
"enum": [
|
||||||
},
|
"available",
|
||||||
"description": "pet status in the store"
|
"pending",
|
||||||
|
"sold"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"xml": {
|
"xml": {
|
||||||
@ -886,16 +916,10 @@
|
|||||||
"properties": {
|
"properties": {
|
||||||
"id": {
|
"id": {
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
"format": "int64",
|
"format": "int64"
|
||||||
"xml": {
|
|
||||||
"name": "id"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"name": {
|
"name": {
|
||||||
"type": "string",
|
"type": "string"
|
||||||
"xml": {
|
|
||||||
"name": "name"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"xml": {
|
"xml": {
|
||||||
@ -906,38 +930,28 @@
|
|||||||
"properties": {
|
"properties": {
|
||||||
"id": {
|
"id": {
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
"format": "int64",
|
"format": "int64"
|
||||||
"xml": {
|
|
||||||
"name": "id"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"petId": {
|
"petId": {
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
"format": "int64",
|
"format": "int64"
|
||||||
"xml": {
|
|
||||||
"name": "petId"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"quantity": {
|
"quantity": {
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
"format": "int32",
|
"format": "int32"
|
||||||
"xml": {
|
|
||||||
"name": "quantity"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"shipDate": {
|
"shipDate": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"format": "date-time",
|
"format": "date-time"
|
||||||
"xml": {
|
|
||||||
"name": "shipDate"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"status": {
|
"status": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"xml": {
|
"description": "Order Status",
|
||||||
"name": "status"
|
"enum": [
|
||||||
},
|
"placed",
|
||||||
"description": "Order Status"
|
"approved",
|
||||||
|
"delivered"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"complete": {
|
"complete": {
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user