{ "swagger": "2.0", "info": { "version": "v9.0", "title": "swagger" }, "host": "localhost:8080", "basePath": "/api", "schemes": [ "http" ], "paths": { "/api/v{api-version}/simple": { "get": { "tags": [ "Simple" ], "operationId": "GetCallWithoutParametersAndResponse" }, "put": { "tags": [ "Simple" ], "operationId": "PutCallWithoutParametersAndResponse" }, "post": { "tags": [ "Simple" ], "operationId": "PostCallWithoutParametersAndResponse" }, "delete": { "tags": [ "Simple" ], "operationId": "DeleteCallWithoutParametersAndResponse" }, "options": { "tags": [ "Simple" ], "operationId": "OptionsCallWithoutParametersAndResponse" }, "head": { "tags": [ "Simple" ], "operationId": "HeadCallWithoutParametersAndResponse" }, "patch": { "tags": [ "Simple" ], "operationId": "PatchCallWithoutParametersAndResponse" } }, "/api/v{api-version}/parameters": { "get": { "tags": [ "Parameters" ], "operationId": "CallWithParameters", "parameters": [ { "description": "This is the parameter that goes into the request header", "name": "parameterHeader", "in": "header", "type": "string", "required": true }, { "description": "This is the parameter that goes into the request query params", "name": "parameterQuery", "in": "query", "type": "string", "required": true }, { "description": "This is the parameter that goes into the request form data", "name": "parameterForm", "in": "formData", "type": "string", "required": true }, { "description": "This is the parameter that is send as request body", "name": "parameterBody", "in": "body", "type": "string", "required": true }, { "name": "api-version", "in": "path", "type": "string", "required": true } ] } }, "/api/v{api-version}/defaults": { "get": { "tags": [ "Defaults" ], "operationId": "CallWithDefaultParameters", "parameters": [ { "description": "This is a simple string", "name": "parameterString", "in": "query", "default": "Hello World!", "type": "string" }, { "description": "This is a simple number", "name": "parameterNumber", "in": "query", "default": 123, "type": "number" }, { "description": "This is a simple boolean", "name": "parameterBoolean", "in": "query", "default": true, "type": "boolean" }, { "description": "This is a simple enum", "name": "parameterEnum", "in": "query", "default": 0, "schema": { "enum": [ "Success", "Warning", "Error" ] } }, { "description": "This is a simple model", "name": "parameterModel", "in": "query", "default": { "prop": "Hello World" }, "schema": { "$ref": "#/definitions/ModelWithString" } } ] } }, "/api/v{api-version}/response": { "get": { "tags": [ "Response" ], "operationId": "CallWithResponse", "responses": { "default": { "description": "Message for default response", "schema": { "$ref": "#/definitions/ModelWithString" } } } }, "post": { "tags": [ "Response" ], "operationId": "CallWithDuplicateResponses", "responses": { "default": { "description": "Message for default response", "schema": { "$ref": "#/definitions/ModelWithString" } }, "201": { "description": "Message for 201 response", "schema": { "$ref": "#/definitions/ModelWithString" } }, "202": { "description": "Message for 202 response", "schema": { "$ref": "#/definitions/ModelWithString" } }, "500": { "description": "Message for 500 error", "schema": { "$ref": "#/definitions/ModelWithString" } }, "501": { "description": "Message for 501 error", "schema": { "$ref": "#/definitions/ModelWithString" } }, "502": { "description": "Message for 502 error", "schema": { "$ref": "#/definitions/ModelWithString" } } } }, "put": { "tags": [ "Response" ], "operationId": "CallWithResponses", "responses": { "default": { "description": "Message for default response", "schema": { "$ref": "#/definitions/ModelWithString" } }, "201": { "description": "Message for 201 response", "schema": { "$ref": "#/definitions/ModelThatExtends" } }, "202": { "description": "Message for 202 response", "schema": { "$ref": "#/definitions/ModelThatExtendsExtends" } }, "500": { "description": "Message for 500 error", "schema": { "$ref": "#/definitions/ModelWithString" } }, "501": { "description": "Message for 501 error", "schema": { "$ref": "#/definitions/ModelWithString" } }, "502": { "description": "Message for 502 error", "schema": { "$ref": "#/definitions/ModelWithString" } } } } }, "/api/v{api-version}/types": { "get": { "tags": [ "Types" ], "operationId": "Types", "parameters": [ { "description": "This is a number parameter", "name": "parameterNumber", "in": "query", "required": true, "default": 123, "type": "int" }, { "description": "This is a string parameter", "name": "parameterString", "in": "query", "required": true, "default": "default", "type": "string" }, { "description": "This is a boolean parameter", "name": "parameterBoolean", "in": "query", "required": true, "default": true, "type": "boolean" }, { "description": "This is an object parameter", "name": "parameterObject", "in": "query", "required": true, "default": null, "type": "object" }, { "description": "This is an array parameter", "name": "parameterArray", "in": "query", "required": true, "type": "array", "items": { "type": "string" } }, { "description": "This is a dictionary parameter", "name": "parameterDictionary", "in": "query", "required": true, "type": "object", "items": { "type": "string" } }, { "description": "This is an enum parameter", "name": "parameterEnum", "in": "query", "required": true, "schema": { "enum": [ "Success", "Warning", "Error" ] } }, { "description": "This is a number parameter", "name": "id", "in": "path", "schema": { "type": "integer", "format": "int32" } } ], "responses": { "200": { "description": "Response is a simple number", "schema": { "type": "number" } }, "201": { "description": "Response is a simple string", "schema": { "type": "string" } }, "202": { "description": "Response is a simple boolean", "schema": { "type": "boolean" } }, "203": { "description": "Response is a simple object", "default": null, "schema": { "type": "object" } } } } }, "/api/v{api-version}/complex": { "get": { "tags": [ "Complex" ], "operationId": "ComplexTypes", "parameters": [ { "description": "Parameter containing object", "name": "parameterObject", "in": "query", "required": true, "schema": { "type": "object", "properties": { "first": { "type": "object", "properties": { "second": { "type": "object", "properties": { "third": { "type": "string" } } } } } } } }, { "description": "Parameter containing reference", "name": "parameterReference", "in": "query", "required": true, "schema": { "$ref": "#/definitions/ModelWithString" } } ], "responses": { "200": { "description": "Successful response", "schema": { "type": "array", "items": { "$ref": "#/definitions/ModelWithString" } } }, "400": { "description": "400 server error" }, "500": { "description": "500 server error" } } } } }, "definitions": { "SimpleInteger": { "description": "This is a simple number", "type": "integer" }, "SimpleBoolean": { "description": "This is a simple boolean", "type": "boolean" }, "SimpleString": { "description": "This is a simple string", "type": "string" }, "SimpleFile": { "description": "This is a simple file", "type": "File" }, "SimpleReference": { "description": "This is a simple reference", "$ref": "#/definitions/ModelWithString" }, "EnumWithStrings": { "description": "This is a simple enum with strings", "enum": [ "Success", "Warning", "Error" ] }, "EnumWithNumbers": { "description": "This is a simple enum with numbers", "enum": [ 1, 2, 3 ] }, "EnumFromDescription": { "description": "Success=1,Warning=2,Error=3", "type": "int" }, "ArrayWithNumbers": { "description": "This is a simple array with numbers", "type": "array", "items": { "type": "integer" } }, "ArrayWithBooleans": { "description": "This is a simple array with booleans", "type": "array", "items": { "type": "boolean" } }, "ArrayWithStrings": { "description": "This is a simple array with strings", "type": "array", "items": { "type": "string" } }, "ArrayWithReferences": { "description": "This is a simple array with references", "type": "array", "items": { "$ref": "#/definitions/ModelWithString" } }, "ArrayWithArray": { "description": "This is a simple array containing an array", "type": "array", "items": { "type": "array", "items": { "$ref": "#/definitions/ModelWithString" } } }, "ArrayWithProperties": { "description": "This is a simple array with properties", "type": "array", "items": { "type": "object", "properties": { "foo": { "type": "string" }, "bar": { "type": "string" } } } }, "DictionaryWithString": { "description": "This is a string dictionary", "type": "object", "additionalProperties": { "type": "string" } }, "DictionaryWithReference": { "description": "This is a string reference", "type": "object", "additionalProperties": { "$ref": "#/definitions/ModelWithString" } }, "DictionaryWithArray": { "description": "This is a complex dictionary", "type": "object", "additionalProperties": { "type": "array", "items": { "$ref": "#/definitions/ModelWithString" } } }, "DictionaryWithDictionary": { "description": "This is a string dictionary", "type": "object", "additionalProperties": { "type": "object", "additionalProperties": { "type": "string" } } }, "DictionaryWithProperties": { "description": "This is a complex dictionary", "type": "object", "additionalProperties": { "type": "object", "properties": { "foo": { "type": "string" }, "bar": { "type": "string" } } } }, "ModelWithInteger": { "description": "This is a model with one number property", "type": "object", "properties": { "prop": { "description": "This is a simple number property", "type": "integer" } } }, "ModelWithBoolean": { "description": "This is a model with one boolean property", "type": "object", "properties": { "prop": { "description": "This is a simple boolean property", "type": "boolean" } } }, "ModelWithString": { "description": "This is a model with one string property", "type": "object", "properties": { "prop": { "description": "This is a simple string property", "type": "string" } } }, "ModelWithEnum": { "description": "This is a model with one enum", "type": "object", "properties": { "test": { "description": "This is a simple enum with strings", "enum": [ "Success", "Warning", "Error" ] } } }, "ModelWithEnumFromDescription": { "description": "This is a model with one enum", "type": "object", "properties": { "test": { "type": "integer", "description": "Success=1,Warning=2,Error=3" } } }, "ModelWithNestedEnums": { "description": "This is a model with nested enums", "type": "object", "properties": { "dictionaryWithEnum": { "type": "object", "additionalProperties": { "enum": [ "Success", "Warning", "Error" ] } }, "dictionaryWithEnumFromDescription": { "type": "object", "additionalProperties": { "type": "integer", "description": "Success=1,Warning=2,Error=3" } }, "arrayWithEnum": { "type": "array", "items": { "enum": [ "Success", "Warning", "Error" ] } }, "arrayWithDescription": { "type": "array", "items": { "type": "integer", "description": "Success=1,Warning=2,Error=3" } } } }, "ModelWithReference": { "description": "This is a model with one property containing a reference", "type": "object", "properties": { "prop": { "$ref": "#/definitions/ModelWithString" } } }, "ModelWithArray": { "description": "This is a model with one property containing an array", "type": "object", "properties": { "prop": { "type": "array", "items": { "$ref": "#/definitions/ModelWithString" } }, "propWithFile": { "type": "array", "items": { "type": "File" } }, "propWithNumber": { "type": "array", "items": { "type": "int" } } } }, "ModelWithDictionary": { "description": "This is a model with one property containing a dictionary", "type": "object", "properties": { "prop": { "type": "object", "additionalProperties": { "type": "string" } } } }, "ModelLink": { "description": "This is a model that can have a template??", "type": "object", "properties": { "id": { "type": "string" } } }, "ModelWithLink": { "description": "This is a model that can have a template??", "type": "object", "properties": { "prop": { "$ref": "#/definitions/ModelLink[ModelWithString]" } } }, "ModelWithCircularReference": { "description": "This is a model with one property containing a circular reference", "type": "object", "properties": { "prop": { "$ref": "#/definitions/ModelWithCircularReference" } } }, "ModelWithProperties": { "description": "This is a model with one nested property", "type": "object", "required": [ "required", "requiredAndReadOnly" ], "properties": { "required": { "type": "string" }, "requiredAndReadOnly": { "type": "string", "readOnly": true }, "string": { "type": "string" }, "number": { "type": "number" }, "boolean": { "type": "boolean" }, "reference": { "$ref": "#/definitions/ModelWithString" } } }, "ModelWithNestedProperties": { "description": "This is a model with one nested property", "type": "object", "required": [ "first" ], "properties": { "first": { "type": "object", "required": [ "second" ], "readOnly": true, "properties": { "second": { "type": "object", "required": [ "third" ], "readOnly": true, "properties": { "third": { "type": "string", "readOnly": true } } } } } } }, "ModelWithDuplicateProperties": { "description": "This is a model with duplicated properties", "type": "object", "properties": { "prop": { "$ref": "#/definitions/ModelWithString" }, "prop": { "$ref": "#/definitions/ModelWithString" }, "prop": { "$ref": "#/definitions/ModelWithString" } } }, "ModelWithDuplicateImports": { "description": "This is a model with duplicated imports", "type": "object", "properties": { "propA": { "$ref": "#/definitions/ModelWithString" }, "propB": { "$ref": "#/definitions/ModelWithString" }, "propC": { "$ref": "#/definitions/ModelWithString" } } }, "ModelThatExtends": { "description": "This is a model that extends another model", "type": "object", "allOf": [ { "$ref": "#/definitions/ModelWithString" }, { "type": "object", "properties": { "propExtendsA": { "type": "string" }, "propExtendsB": { "$ref": "#/definitions/ModelWithString" } } } ] }, "ModelThatExtendsExtends": { "description": "This is a model that extends another model", "type": "object", "allOf": [ { "$ref": "#/definitions/ModelWithString" }, { "$ref": "#/definitions/ModelThatExtends" }, { "type": "object", "properties": { "propExtendsC": { "type": "string" }, "propExtendsD": { "$ref": "#/definitions/ModelWithString" } } } ] } } }