{
"title": "A JSON Schema for Swagger 2.0 API.",
"id": "http://swagger.io/v2/schema.json#",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"required": [
"swagger",
"info",
"paths"
],
"additionalProperties": false,
"patternProperties": {
"^x-": {
"$ref": "#/definitions/vendorExtension"
}
},
"properties": {
"swagger": {
"type": "string",
"enum": [
"2.0"
"description": "The Swagger version of this document."
"info": {
"$ref": "#/definitions/info"
"host": {
"pattern": "^[^{}/ :\\\\]+(?::\\d+)?$",
"description": "The host (name or ip) of the API. Example: 'swagger.io'"
"basePath": {
"pattern": "^/",
"description": "The base path to the API. Example: '/api'."
"schemes": {
"$ref": "#/definitions/schemesList"
"consumes": {
"description": "A list of MIME types accepted by the API.",
"allOf": [
"$ref": "#/definitions/mediaTypeList"
]
"produces": {
"description": "A list of MIME types the API can produce.",
"paths": {
"$ref": "#/definitions/paths"
"definitions": {
"$ref": "#/definitions/definitions"
"parameters": {
"$ref": "#/definitions/parameterDefinitions"
"responses": {
"$ref": "#/definitions/responseDefinitions"
"security": {
"$ref": "#/definitions/security"
"securityDefinitions": {
"$ref": "#/definitions/securityDefinitions"
"tags": {
"type": "array",
"items": {
"$ref": "#/definitions/tag"
"uniqueItems": true
"externalDocs": {
"$ref": "#/definitions/externalDocs"
"description": "General information about the API.",
"version",
"title"
"title": {
"description": "A unique and precise title of the API."
"version": {
"description": "A semantic version number of the API."
"description": {
"description": "A longer description of the API. Should be different from the title. GitHub Flavored Markdown is allowed."
"termsOfService": {
"description": "The terms of service for the API."
"contact": {
"$ref": "#/definitions/contact"
"license": {
"$ref": "#/definitions/license"
"description": "Contact information for the owners of the API.",
"name": {
"description": "The identifying name of the contact person/organization."
"url": {
"description": "The URL pointing to the contact information.",
"format": "uri"
"email": {
"description": "The email address of the contact person/organization.",
"format": "email"
"name"
"description": "The name of the license type. It's encouraged to use an OSI compatible license."
"description": "The URL pointing to the license.",
"description": "Relative paths to the individual endpoints. They must be relative to the 'basePath'.",
"^/": {
"$ref": "#/definitions/pathItem"
"additionalProperties": false
"additionalProperties": {
"$ref": "#/definitions/schema"
"description": "One or more JSON objects describing the schemas being consumed and produced by the API."
"parameterDefinitions": {
"$ref": "#/definitions/parameter"
"description": "One or more JSON representations for parameters"
"responseDefinitions": {
"$ref": "#/definitions/response"
"description": "One or more JSON representations for responses"
"description": "information about external documentation",
"url"
"type": "string"
"examples": {
"additionalProperties": true
"mimeType": {
"description": "The MIME type of the HTTP message."
"operation": {
"responses"
"summary": {
"description": "A brief summary of the operation."
"description": "A longer description of the operation, GitHub Flavored Markdown is allowed."
"operationId": {
"description": "A unique identifier of the operation."
"description": "A list of MIME types the API can consume.",
"$ref": "#/definitions/parametersList"
"$ref": "#/definitions/responses"
"deprecated": {
"type": "boolean",
"default": false
"pathItem": {
"$ref": {
"get": {
"$ref": "#/definitions/operation"
"put": {
"post": {
"delete": {
"options": {
"head": {
"patch": {
"description": "Response objects names can either be any valid HTTP status code or 'default'.",
"minProperties": 1,
"^([0-9]{3})$|^(default)$": {
"$ref": "#/definitions/responseValue"
"not": {
"responseValue": {
"oneOf": [
"$ref": "#/definitions/jsonReference"
"response": {
"description"
"schema": {
"$ref": "#/definitions/fileSchema"
"headers": {
"$ref": "#/definitions/headers"
"$ref": "#/definitions/examples"
"$ref": "#/definitions/header"
"header": {
"type"
"type": {
"string",
"number",
"integer",
"boolean",
"array"
"format": {
"$ref": "#/definitions/primitivesItems"
"collectionFormat": {
"$ref": "#/definitions/collectionFormat"
"default": {
"$ref": "#/definitions/default"
"maximum": {
"$ref": "#/definitions/maximum"
"exclusiveMaximum": {
"$ref": "#/definitions/exclusiveMaximum"
"minimum": {
"$ref": "#/definitions/minimum"
"exclusiveMinimum": {
"$ref": "#/definitions/exclusiveMinimum"
"maxLength": {
"$ref": "#/definitions/maxLength"
"minLength": {
"$ref": "#/definitions/minLength"
"pattern": {
"$ref": "#/definitions/pattern"
"maxItems": {
"$ref": "#/definitions/maxItems"
"minItems": {
"$ref": "#/definitions/minItems"
"uniqueItems": {
"$ref": "#/definitions/uniqueItems"
"enum": {
"$ref": "#/definitions/enum"
"multipleOf": {
"$ref": "#/definitions/multipleOf"
"vendorExtension": {
"description": "Any property starting with x- is valid.",
"additionalProperties": true,
"additionalItems": true
"bodyParameter": {
"name",
"in",
"schema"
"description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."
"description": "The name of the parameter."
"in": {
"description": "Determines the location of the parameter.",
"body"
"required": {
"description": "Determines whether or not this parameter is required or optional.",
"headerParameterSubSchema": {
"header"
"queryParameterSubSchema": {
"query"
"allowEmptyValue": {
"default": false,
"description": "allows sending a parameter by name only or with an empty value."
"$ref": "#/definitions/collectionFormatWithMulti"
"formDataParameterSubSchema": {
"formData"
"array",
"file"
"pathParameterSubSchema": {
"required"
true
"description": "Determines whether or not this parameter is required or optional."
"path"
"nonBodyParameter": {
"$ref": "#/definitions/headerParameterSubSchema"
"$ref": "#/definitions/formDataParameterSubSchema"
"$ref": "#/definitions/queryParameterSubSchema"
"$ref": "#/definitions/pathParameterSubSchema"
"parameter": {
"$ref": "#/definitions/bodyParameter"
"$ref": "#/definitions/nonBodyParameter"
"description": "A deterministic version of a JSON Schema object.",
"$ref": "http://json-schema.org/draft-04/schema#/properties/title"
"$ref": "http://json-schema.org/draft-04/schema#/properties/description"
"$ref": "http://json-schema.org/draft-04/schema#/properties/default"
"$ref": "http://json-schema.org/draft-04/schema#/properties/multipleOf"
"$ref": "http://json-schema.org/draft-04/schema#/properties/maximum"
"$ref": "http://json-schema.org/draft-04/schema#/properties/exclusiveMaximum"
"$ref": "http://json-schema.org/draft-04/schema#/properties/minimum"
"$ref": "http://json-schema.org/draft-04/schema#/properties/exclusiveMinimum"
"$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveInteger"
"$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"
"$ref": "http://json-schema.org/draft-04/schema#/properties/pattern"
"$ref": "http://json-schema.org/draft-04/schema#/properties/uniqueItems"
"maxProperties": {
"minProperties": {
"$ref": "http://json-schema.org/draft-04/schema#/definitions/stringArray"
"$ref": "http://json-schema.org/draft-04/schema#/properties/enum"
"type": "boolean"
"default": {}
"$ref": "http://json-schema.org/draft-04/schema#/properties/type"
"anyOf": [
"minItems": 1,
"allOf": {
"discriminator": {
"readOnly": {
"xml": {
"$ref": "#/definitions/xml"
"example": {}
"fileSchema": {
"primitivesItems": {
"$ref": "#/definitions/securityRequirement"
"securityRequirement": {
"namespace": {
"prefix": {
"attribute": {
"wrapped": {
"tag": {
"$ref": "#/definitions/basicAuthenticationSecurity"
"$ref": "#/definitions/apiKeySecurity"
"$ref": "#/definitions/oauth2ImplicitSecurity"
"$ref": "#/definitions/oauth2PasswordSecurity"
"$ref": "#/definitions/oauth2ApplicationSecurity"
"$ref": "#/definitions/oauth2AccessCodeSecurity"
"basicAuthenticationSecurity": {
"basic"
"apiKeySecurity": {
"type",
"in"
"apiKey"
"header",
"oauth2ImplicitSecurity": {
"flow",
"authorizationUrl"
"oauth2"
"flow": {
"implicit"
"scopes": {
"$ref": "#/definitions/oauth2Scopes"
"authorizationUrl": {
"oauth2PasswordSecurity": {
"tokenUrl"
"password"
"tokenUrl": {
"oauth2ApplicationSecurity": {
"application"
"oauth2AccessCodeSecurity": {
"authorizationUrl",
"accessCode"
"oauth2Scopes": {
"mediaTypeList": {
"$ref": "#/definitions/mimeType"
"parametersList": {
"description": "The parameters needed to send a valid API call.",
"additionalItems": false,
"schemesList": {
"description": "The transfer protocol of the API.",
"http",
"https",
"ws",
"wss"
"csv",
"ssv",
"tsv",
"pipes"
"default": "csv"
"collectionFormatWithMulti": {
"pipes",
"multi"
"jsonReference": {
"$ref"