diff --git a/oas/latest.html b/oas/latest.html index 897f677f77..4f53076434 100644 --- a/oas/latest.html +++ b/oas/latest.html @@ -1,32 +1,263 @@ -OpenAPI Specification v3.1.0 | Introduction, Definitions, & More - + + + + + +OpenAPI Specification v3.1.0 + + + + + + + + -

OpenAPI Specification v3.1.0

What is the OpenAPI Specification?

The OpenAPI Specification (OAS) defines a standard, programming language-agnostic interface description for HTTP APIs, which allows both humans and computers to discover and understand the capabilities of a service without requiring access to source code, additional documentation, or inspection of network traffic. When properly defined via OpenAPI, a consumer can understand and interact with the remote service with a minimal amount of implementation logic. Similar to what interface descriptions have done for lower-level programming, the OpenAPI Specification removes guesswork in calling a service.

Status of This Document

The source-of-truth for the specification is the GitHub markdown file referenced above.
-

OpenAPI Specification

-

Version 3.1.0

-

The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “NOT RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in BCP 14 [[!RFC2119]] [[!RFC8174]] when, and only when, they appear in all capitals, as shown here.

+ + + + + +
+

+

OpenAPI Specification v3.1.0

Version 3.1.0

+

+
+ More details about this document +
+ +
Latest published version:
+ https://spec.openapis.org/oas/latest.html +
+
Latest editor's draft:
https://github.com/OAI/OpenAPI-Specification/
+ + + + + + +
Editors:
+ Darrel Miller +
+ Jeremy Whitlock +
+ Marsh Gardiner +
+ Mike Ralphson +
+ Ron Ratovsky +
+ Uri Sarid +
+
+ Former editors: +
+ Jason Harmon +
+ Tony Tam +
+ + + +
Participate
+ GitHub OAI/OpenAPI-Specification +
+ File a bug +
+ Commit history +
+ Pull requests +
+
+
+ + + +
+

What is the OpenAPI Specification?

The OpenAPI Specification (OAS) defines a standard, programming language-agnostic interface description for HTTP APIs, which allows both humans and computers to discover and understand the capabilities of a service without requiring access to source code, additional documentation, or inspection of network traffic. When properly defined via OpenAPI, a consumer can understand and interact with the remote service with a minimal amount of implementation logic. Similar to what interface descriptions have done for lower-level programming, the OpenAPI Specification removes guesswork in calling a service.

Status of This Document

The source-of-truth for the specification is the GitHub markdown file referenced above.
+

1. OpenAPI Specification

+

1.1 Version 3.1.0

+

The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “NOT RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.

This document is licensed under The Apache License, Version 2.0.

-

Introduction

+

2. Introduction

The OpenAPI Specification (OAS) defines a standard, language-agnostic interface to HTTP APIs which allows both humans and computers to discover and understand the capabilities of the service without access to source code, documentation, or through network traffic inspection. When properly defined, a consumer can understand and interact with the remote service with a minimal amount of implementation logic.

An OpenAPI definition can then be used by documentation generation tools to display the API, code generation tools to generate servers and clients in various programming languages, testing tools, and many other use cases.

- -

Definitions

-

OpenAPI Document

-

A self-contained or composite resource which defines or describes an API or elements of an API. The OpenAPI document MUST contain at least one paths field, a components field or a webhooks field. An OpenAPI document uses and conforms to the OpenAPI Specification.

-

Path Templating

+ +

3. Definitions

+

3.1 OpenAPI Document

+

A self-contained or composite resource which defines or describes an API or elements of an API. The OpenAPI document MUST contain at least one paths field, a components field or a webhooks field. An OpenAPI document uses and conforms to the OpenAPI Specification.

+

3.2 Path Templating

Path templating refers to the usage of template expressions, delimited by curly braces ({}), to mark a section of a URL path as replaceable using path parameters.

-

Each template expression in the path MUST correspond to a path parameter that is included in the Path Item itself and/or in each of the Path Item’s Operations. An exception is if the path item is empty, for example due to ACL constraints, matching path parameters are not required.

-

The value for these path parameters MUST NOT contain any unescaped “generic syntax” characters described by [[!RFC3986]]: forward slashes (/), question marks (?), or hashes (#).

-

Media Types

+

Each template expression in the path MUST correspond to a path parameter that is included in the Path Item itself and/or in each of the Path Item’s Operations. An exception is if the path item is empty, for example due to ACL constraints, matching path parameters are not required.

+

The value for these path parameters MUST NOT contain any unescaped “generic syntax” characters described by [RFC3986]: forward slashes (/), question marks (?), or hashes (#).

+

3.3 Media Types

Media type definitions are spread across several resources. -The media type definitions SHOULD be in compliance with [[!RFC6838]].

+The media type definitions SHOULD be in compliance with [RFC6838].

Some examples of possible media type definitions:

-

+

   text/plain; charset=utf-8
   application/json
   application/vnd.github+json
@@ -38,40 +269,40 @@
   application/vnd.github.v3.diff
   application/vnd.github.v3.patch
 
-

HTTP Status Codes

+

3.4 HTTP Status Codes

The HTTP Status Codes are used to indicate the status of the executed operation. -The available status codes are defined by [[!RFC7231]] and registered status codes are listed in the IANA Status Code Registry.

-

Specification

-

Versions

-

The OpenAPI Specification is versioned using a major.minor.patch versioning scheme. The major.minor portion of the version string (for example 3.1) SHALL designate the OAS feature set. .patch versions address errors in, or provide clarifications to, this document, not the feature set. Tooling which supports OAS 3.1 SHOULD be compatible with all OAS 3.1.* versions. The patch version SHOULD NOT be considered by tooling, making no distinction between 3.1.0 and 3.1.1 for example.

+The available status codes are defined by [RFC7231] and registered status codes are listed in the IANA Status Code Registry.

+

4. Specification

+

4.1 Versions

+

The OpenAPI Specification is versioned using a major.minor.patch versioning scheme. The major.minor portion of the version string (for example 3.1) SHALL designate the OAS feature set. .patch versions address errors in, or provide clarifications to, this document, not the feature set. Tooling which supports OAS 3.1 SHOULD be compatible with all OAS 3.1.* versions. The patch version SHOULD NOT be considered by tooling, making no distinction between 3.1.0 and 3.1.1 for example.

Occasionally, non-backwards compatible changes may be made in minor versions of the OAS where impact is believed to be low relative to the benefit provided.

An OpenAPI document compatible with OAS 3.*.* contains a required openapi field which designates the version of the OAS that it uses.

-

Format

+

4.2 Format

An OpenAPI document that conforms to the OpenAPI Specification is itself a JSON object, which may be represented either in JSON or YAML format.

For example, if a field has an array value, the JSON array representation will be used:


 {
-   "field": [ 1, 2, 3 ]
+   "field": [ 1, 2, 3 ]
 }
 

All field names in the specification are case sensitive. This includes all fields that are used as keys in a map, except where explicitly noted that keys are case insensitive.

The schema exposes two types of fields: Fixed fields, which have a declared name, and Patterned fields, which declare a regex pattern for the field name.

-

Patterned fields MUST have unique names within the containing object.

-

In order to preserve the ability to round-trip between YAML and JSON formats, YAML version 1.2 is RECOMMENDED along with some additional constraints:

+

Patterned fields MUST have unique names within the containing object.

+

In order to preserve the ability to round-trip between YAML and JSON formats, YAML version 1.2 is RECOMMENDED along with some additional constraints:

Note: While APIs may be defined by OpenAPI documents in either YAML or JSON format, the API request and response bodies and other content are not required to be JSON or YAML.

-

Document Structure

-

An OpenAPI document MAY be made up of a single document or be divided into multiple, connected parts at the discretion of the author. In the latter case, Reference Objects and Schema Object $ref keywords are used.

-

It is RECOMMENDED that the root OpenAPI document be named: openapi.json or openapi.yaml.

-

Data Types

+

4.3 Document Structure

+

An OpenAPI document MAY be made up of a single document or be divided into multiple, connected parts at the discretion of the author. In the latter case, Reference Objects and Schema Object $ref keywords are used.

+

It is RECOMMENDED that the root OpenAPI document be named: openapi.json or openapi.yaml.

+

4.4 Data Types

Data types in the OAS are based on the types supported by the JSON Schema Specification Draft 2020-12. Note that integer as a type is also supported and is defined as a JSON number without a fraction or exponent part. Models are defined using the Schema Object, which is a superset of JSON Schema Specification Draft 2020-12.

-

As defined by the JSON Schema Validation vocabulary, data types can have an optional modifier property: format. +

As defined by the JSON Schema Validation vocabulary, data types can have an optional modifier property: format. OAS defines additional formats to provide fine detail for primitive data types.

The formats defined by the OAS are:

@@ -110,22 +341,22 @@
-

Rich Text Formatting

+

4.5 Rich Text Formatting

Throughout the specification description fields are noted as supporting CommonMark markdown formatting. -Where OpenAPI tooling renders rich text it MUST support, at a minimum, markdown syntax as described by CommonMark 0.27. Tooling MAY choose to ignore some CommonMark features to address security concerns.

-

Relative References in URIs

-

Unless specified otherwise, all properties that are URIs MAY be relative references as defined by [[!RFC3986]].

-

Relative references, including those in Reference Objects, PathItem Object $ref fields, Link Object operationRef fields and Example Object externalValue fields, are resolved using the referring document as the Base URI according to [[!RFC3986]].

-

If a URI contains a fragment identifier, then the fragment should be resolved per the fragment resolution mechanism of the referenced document. If the representation of the referenced document is JSON or YAML, then the fragment identifier SHOULD be interpreted as a JSON-Pointer as per [[!RFC6901]].

-

Relative references in Schema Objects, including any that appear as $id values, use the nearest parent $id as a Base URI, as described by JSON Schema Specification Draft 2020-12. If no parent schema contains an $id, then the Base URI MUST be determined according to [[!RFC3986]].

-

Relative References in URLs

-

Unless specified otherwise, all properties that are URLs MAY be relative references as defined by [[!RFC3986]]. -Unless specified otherwise, relative references are resolved using the URLs defined in the Server Object as a Base URL. Note that these themselves MAY be relative to the referring document.

-

Schema

-

In the following description, if a field is not explicitly REQUIRED or described with a MUST or SHALL, it can be considered OPTIONAL.

-

OpenAPI Object

+Where OpenAPI tooling renders rich text it MUST support, at a minimum, markdown syntax as described by CommonMark 0.27. Tooling MAY choose to ignore some CommonMark features to address security concerns.

+

4.6 Relative References in URIs

+

Unless specified otherwise, all properties that are URIs MAY be relative references as defined by [RFC3986].

+

Relative references, including those in Reference Objects, PathItem Object $ref fields, Link Object operationRef fields and Example Object externalValue fields, are resolved using the referring document as the Base URI according to [RFC3986].

+

If a URI contains a fragment identifier, then the fragment should be resolved per the fragment resolution mechanism of the referenced document. If the representation of the referenced document is JSON or YAML, then the fragment identifier SHOULD be interpreted as a JSON-Pointer as per [RFC6901].

+

Relative references in Schema Objects, including any that appear as $id values, use the nearest parent $id as a Base URI, as described by JSON Schema Specification Draft 2020-12. If no parent schema contains an $id, then the Base URI MUST be determined according to [RFC3986].

+

4.7 Relative References in URLs

+

Unless specified otherwise, all properties that are URLs MAY be relative references as defined by [RFC3986]. +Unless specified otherwise, relative references are resolved using the URLs defined in the Server Object as a Base URL. Note that these themselves MAY be relative to the referring document.

+

4.8 Schema

+

In the following description, if a field is not explicitly REQUIRED or described with a MUST or SHALL, it can be considered OPTIONAL.

+

4.8.1 OpenAPI Object

This is the root object of the OpenAPI document.

-

Fixed Fields

+
4.8.1.1 Fixed Fields
@@ -136,62 +367,62 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
openapiopenapi stringREQUIRED. This string MUST be the version number of the OpenAPI Specification that the OpenAPI document uses. The openapi field SHOULD be used by tooling to interpret the OpenAPI document. This is not related to the API info.version string.REQUIRED. This string MUST be the version number of the OpenAPI Specification that the OpenAPI document uses. The openapi field SHOULD be used by tooling to interpret the OpenAPI document. This is not related to the API info.version string.
infoinfo Info ObjectREQUIRED. Provides metadata about the API. The metadata MAY be used by tooling as required.REQUIRED. Provides metadata about the API. The metadata MAY be used by tooling as required.
jsonSchemaDialect jsonSchemaDialect stringThe default value for the $schema keyword within Schema Objects contained within this OAS document. This MUST be in the form of a URI.The default value for the $schema keyword within Schema Objects contained within this OAS document. This MUST be in the form of a URI.
serversservers [Server Object] An array of Server Objects, which provide connectivity information to a target server. If the servers property is not provided, or is an empty array, the default value would be a Server Object with a url value of /.
pathspaths Paths Object The available paths and operations for the API.
webhookswebhooks Map[string, Path Item Object | Reference Object] ]The incoming webhooks that MAY be received as part of this API and that the API consumer MAY choose to implement. Closely related to the callbacks feature, this section describes requests initiated other than by an API call, for example by an out of band registration. The key name is a unique string to refer to each webhook, while the (optionally referenced) Path Item Object describes a request that may be initiated by the API provider and the expected responses. An example is available.The incoming webhooks that MAY be received as part of this API and that the API consumer MAY choose to implement. Closely related to the callbacks feature, this section describes requests initiated other than by an API call, for example by an out of band registration. The key name is a unique string to refer to each webhook, while the (optionally referenced) Path Item Object describes a request that may be initiated by the API provider and the expected responses. An example is available.
componentscomponents Components Object An element to hold various schemas for the document.
securitysecurity [Security Requirement Object] A declaration of which security mechanisms can be used across the API. The list of values includes alternative security requirement objects that can be used. Only one of the security requirement objects need to be satisfied to authorize a request. Individual operations can override this definition. To make security optional, an empty security requirement ({}) can be included in the array.
tagstags [Tag Object]A list of tags used by the document with additional metadata. The order of the tags can be used to reflect on their order by the parsing tools. Not all tags that are used by the Operation Object must be declared. The tags that are not declared MAY be organized randomly or based on the tools’ logic. Each tag name in the list MUST be unique.A list of tags used by the document with additional metadata. The order of the tags can be used to reflect on their order by the parsing tools. Not all tags that are used by the Operation Object must be declared. The tags that are not declared MAY be organized randomly or based on the tools’ logic. Each tag name in the list MUST be unique.
externalDocsexternalDocs External Documentation Object Additional external documentation.
-

This object MAY be extended with Specification Extensions.

-

Info Object

+

This object MAY be extended with Specification Extensions.

+

4.8.2 Info Object

The object provides metadata about the API. -The metadata MAY be used by the clients if needed, and MAY be presented in editing or documentation generation tools for convenience.

-

Fixed Fields

+The metadata MAY be used by the clients if needed, and MAY be presented in editing or documentation generation tools for convenience.

+
4.8.2.1 Fixed Fields
@@ -202,60 +433,60 @@ - + - + - + - + - + - + - + - + - + - + - +
titletitle stringREQUIRED. The title of the API.REQUIRED. The title of the API.
summarysummary string A short summary of the API.
descriptiondescription stringA description of the API. CommonMark syntax MAY be used for rich text representation.A description of the API. CommonMark syntax MAY be used for rich text representation.
termsOfServicetermsOfService stringA URL to the Terms of Service for the API. This MUST be in the form of a URL.A URL to the Terms of Service for the API. This MUST be in the form of a URL.
contactcontact Contact Object The contact information for the exposed API.
licenselicense License Object The license information for the exposed API.
versionversion stringREQUIRED. The version of the OpenAPI document (which is distinct from the OpenAPI Specification version or the API implementation version).REQUIRED. The version of the OpenAPI document (which is distinct from the OpenAPI Specification version or the API implementation version).
-

This object MAY be extended with Specification Extensions.

-

Info Object Example

+

This object MAY be extended with Specification Extensions.

+
4.8.2.2 Info Object Example

 {
-  "title": "Sample Pet Store App",
-  "summary": "A pet store manager.",
-  "description": "This is a sample server for a pet store.",
-  "termsOfService": "https://example.com/terms/",
-  "contact": {
-    "name": "API Support",
-    "url": "https://www.example.com/support",
-    "email": "support@example.com"
+  "title": "Sample Pet Store App",
+  "summary": "A pet store manager.",
+  "description": "This is a sample server for a pet store.",
+  "termsOfService": "https://example.com/terms/",
+  "contact": {
+    "name": "API Support",
+    "url": "https://www.example.com/support",
+    "email": "support@example.com"
   },
-  "license": {
-    "name": "Apache 2.0",
-    "url": "https://www.apache.org/licenses/LICENSE-2.0.html"
+  "license": {
+    "name": "Apache 2.0",
+    "url": "https://www.apache.org/licenses/LICENSE-2.0.html"
   },
-  "version": "1.0.1"
+  "version": "1.0.1"
 }
 

@@ -272,9 +503,9 @@
   url: https://www.apache.org/licenses/LICENSE-2.0.html
 version: 1.0.1
 
-

Contact Object

+

4.8.3 Contact Object

Contact information for the exposed API.

-

Fixed Fields

+
4.8.3.1 Fixed Fields
@@ -285,29 +516,29 @@ - + - + - + - + - +
namename string The identifying name of the contact person/organization.
urlurl stringThe URL pointing to the contact information. This MUST be in the form of a URL.The URL pointing to the contact information. This MUST be in the form of a URL.
emailemail stringThe email address of the contact person/organization. This MUST be in the form of an email address.The email address of the contact person/organization. This MUST be in the form of an email address.
-

This object MAY be extended with Specification Extensions.

-

Contact Object Example

+

This object MAY be extended with Specification Extensions.

+
4.8.3.2 Contact Object Example

 {
-  "name": "API Support",
-  "url": "https://www.example.com/support",
-  "email": "support@example.com"
+  "name": "API Support",
+  "url": "https://www.example.com/support",
+  "email": "support@example.com"
 }
 

@@ -315,9 +546,9 @@
 url: https://www.example.com/support
 email: support@example.com
 
-

License Object

+

4.8.4 License Object

License information for the exposed API.

-

Fixed Fields

+
4.8.4.1 Fixed Fields
@@ -328,37 +559,37 @@ - + - + - + - + - +
namename stringREQUIRED. The license name used for the API.REQUIRED. The license name used for the API.
identifieridentifier string An SPDX license expression for the API. The identifier field is mutually exclusive of the url field.
urlurl stringA URL to the license used for the API. This MUST be in the form of a URL. The url field is mutually exclusive of the identifier field.A URL to the license used for the API. This MUST be in the form of a URL. The url field is mutually exclusive of the identifier field.
-

This object MAY be extended with Specification Extensions.

-

License Object Example

+

This object MAY be extended with Specification Extensions.

+
4.8.4.2 License Object Example

 {
-  "name": "Apache 2.0",
-  "identifier": "Apache-2.0"
+  "name": "Apache 2.0",
+  "identifier": "Apache-2.0"
 }
 

 name: Apache 2.0
 identifier: Apache-2.0
 
-

Server Object

+

4.8.5 Server Object

An object representing a Server.

-

Fixed Fields

+
4.8.5.1 Fixed Fields
@@ -369,29 +600,29 @@ - + - + - + - + - +
urlurl stringREQUIRED. A URL to the target host. This URL supports Server Variables and MAY be relative, to indicate that the host location is relative to the location where the OpenAPI document is being served. Variable substitutions will be made when a variable is named in {brackets}.REQUIRED. A URL to the target host. This URL supports Server Variables and MAY be relative, to indicate that the host location is relative to the location where the OpenAPI document is being served. Variable substitutions will be made when a variable is named in {brackets}.
descriptiondescription stringAn optional string describing the host designated by the URL. CommonMark syntax MAY be used for rich text representation.An optional string describing the host designated by the URL. CommonMark syntax MAY be used for rich text representation.
variablesvariables Map[string, Server Variable Object] A map between a variable name and its value. The value is used for substitution in the server’s URL template.
-

This object MAY be extended with Specification Extensions.

-

Server Object Example

+

This object MAY be extended with Specification Extensions.

+
4.8.5.2 Server Object Example

A single server would be described as:


 {
-  "url": "https://development.gigantic-server.com/v1",
-  "description": "Development server"
+  "url": "https://development.gigantic-server.com/v1",
+  "description": "Development server"
 }
 

@@ -401,18 +632,18 @@
 

The following shows how multiple servers can be described, for example, at the OpenAPI Object’s servers:


 {
-  "servers": [
+  "servers": [
     {
-      "url": "https://development.gigantic-server.com/v1",
-      "description": "Development server"
+      "url": "https://development.gigantic-server.com/v1",
+      "description": "Development server"
     },
     {
-      "url": "https://staging.gigantic-server.com/v1",
-      "description": "Staging server"
+      "url": "https://staging.gigantic-server.com/v1",
+      "description": "Staging server"
     },
     {
-      "url": "https://api.gigantic-server.com/v1",
-      "description": "Production server"
+      "url": "https://api.gigantic-server.com/v1",
+      "description": "Production server"
     }
   ]
 }
@@ -429,24 +660,24 @@
 

The following shows how variables can be used for a server configuration:


 {
-  "servers": [
+  "servers": [
     {
-      "url": "https://{username}.gigantic-server.com:{port}/{basePath}",
-      "description": "The production API server",
-      "variables": {
-        "username": {
-          "default": "demo",
-          "description": "this value is assigned by the service provider, in this example `gigantic-server.com`"
+      "url": "https://{username}.gigantic-server.com:{port}/{basePath}",
+      "description": "The production API server",
+      "variables": {
+        "username": {
+          "default": "demo",
+          "description": "this value is assigned by the service provider, in this example `gigantic-server.com`"
         },
-        "port": {
-          "enum": [
-            "8443",
-            "443"
+        "port": {
+          "enum": [
+            "8443",
+            "443"
           ],
-          "default": "8443"
+          "default": "8443"
         },
-        "basePath": {
-          "default": "v2"
+        "basePath": {
+          "default": "v2"
         }
       }
     }
@@ -464,16 +695,16 @@
       description: this value is assigned by the service provider, in this example `gigantic-server.com`
     port:
       enum:
-        - '8443'
-        - '443'
-      default: '8443'
+        - '8443'
+        - '443'
+      default: '8443'
     basePath:
       # open meaning there is the opportunity to use special base paths as assigned by the provider, default is `v2`
       default: v2
 
-

Server Variable Object

+

4.8.6 Server Variable Object

An object representing a Server Variable for server URL template substitution.

-

Fixed Fields

+
4.8.6.1 Fixed Fields
@@ -484,27 +715,27 @@ - + - + - + - + - + - +
enumenum [string]An enumeration of string values to be used if the substitution options are from a limited set. The array MUST NOT be empty.An enumeration of string values to be used if the substitution options are from a limited set. The array MUST NOT be empty.
defaultdefault stringREQUIRED. The default value to use for substitution, which SHALL be sent if an alternate value is not supplied. Note this behavior is different than the Schema Object’s treatment of default values, because in those cases parameter values are optional. If the enum is defined, the value MUST exist in the enum’s values.REQUIRED. The default value to use for substitution, which SHALL be sent if an alternate value is not supplied. Note this behavior is different than the Schema Object’s treatment of default values, because in those cases parameter values are optional. If the enum is defined, the value MUST exist in the enum’s values.
descriptiondescription stringAn optional description for the server variable. CommonMark syntax MAY be used for rich text representation.An optional description for the server variable. CommonMark syntax MAY be used for rich text representation.
-

This object MAY be extended with Specification Extensions.

-

Components Object

+

This object MAY be extended with Specification Extensions.

+

4.8.7 Components Object

Holds a set of reusable objects for different aspects of the OAS. All objects defined within the components object will have no effect on the API unless they are explicitly referenced from properties outside the components object.

-

Fixed Fields

+
4.8.7.1 Fixed Fields
@@ -515,162 +746,162 @@ - + - + - + - + - + - + - + - + - + - +
schemas schemas Map[string, Schema Object] An object to hold reusable Schema Objects.
responses responses Map[string, Response Object | Reference Object] An object to hold reusable Response Objects.
parameters parameters Map[string, Parameter Object | Reference Object] An object to hold reusable Parameter Objects.
examples examples Map[string, Example Object | Reference Object] An object to hold reusable Example Objects.
requestBodies requestBodies Map[string, Request Body Object | Reference Object] An object to hold reusable Request Body Objects.
headers headers Map[string, Header Object | Reference Object] An object to hold reusable Header Objects.
securitySchemes securitySchemes Map[string, Security Scheme Object | Reference Object] An object to hold reusable Security Scheme Objects.
links links Map[string, Link Object | Reference Object] An object to hold reusable Link Objects.
callbacks callbacks Map[string, Callback Object | Reference Object] An object to hold reusable Callback Objects.
pathItems pathItems Map[string, Path Item Object | Reference Object] An object to hold reusable Path Item Object.
-

This object MAY be extended with Specification Extensions.

-

All the fixed fields declared above are objects that MUST use keys that match the regular expression: ^[a-zA-Z0-9\.\-_]+$.

+

This object MAY be extended with Specification Extensions.

+

All the fixed fields declared above are objects that MUST use keys that match the regular expression: ^[a-zA-Z0-9\.\-_]+$.

Field Name Examples:

-

+

 User
 User_1
 User_Name
 user-name
 my.org.User
 
-

Components Object Example

+
4.8.7.2 Components Object Example

-"components": {
-  "schemas": {
-    "GeneralError": {
-      "type": "object",
-      "properties": {
-        "code": {
-          "type": "integer",
-          "format": "int32"
+"components": {
+  "schemas": {
+    "GeneralError": {
+      "type": "object",
+      "properties": {
+        "code": {
+          "type": "integer",
+          "format": "int32"
         },
-        "message": {
-          "type": "string"
+        "message": {
+          "type": "string"
         }
       }
     },
-    "Category": {
-      "type": "object",
-      "properties": {
-        "id": {
-          "type": "integer",
-          "format": "int64"
+    "Category": {
+      "type": "object",
+      "properties": {
+        "id": {
+          "type": "integer",
+          "format": "int64"
         },
-        "name": {
-          "type": "string"
+        "name": {
+          "type": "string"
         }
       }
     },
-    "Tag": {
-      "type": "object",
-      "properties": {
-        "id": {
-          "type": "integer",
-          "format": "int64"
+    "Tag": {
+      "type": "object",
+      "properties": {
+        "id": {
+          "type": "integer",
+          "format": "int64"
         },
-        "name": {
-          "type": "string"
+        "name": {
+          "type": "string"
         }
       }
     }
   },
-  "parameters": {
-    "skipParam": {
-      "name": "skip",
-      "in": "query",
-      "description": "number of items to skip",
-      "required": true,
-      "schema": {
-        "type": "integer",
-        "format": "int32"
+  "parameters": {
+    "skipParam": {
+      "name": "skip",
+      "in": "query",
+      "description": "number of items to skip",
+      "required": true,
+      "schema": {
+        "type": "integer",
+        "format": "int32"
       }
     },
-    "limitParam": {
-      "name": "limit",
-      "in": "query",
-      "description": "max records to return",
-      "required": true,
-      "schema" : {
-        "type": "integer",
-        "format": "int32"
+    "limitParam": {
+      "name": "limit",
+      "in": "query",
+      "description": "max records to return",
+      "required": true,
+      "schema" : {
+        "type": "integer",
+        "format": "int32"
       }
     }
   },
-  "responses": {
-    "NotFound": {
-      "description": "Entity not found."
+  "responses": {
+    "NotFound": {
+      "description": "Entity not found."
     },
-    "IllegalInput": {
-      "description": "Illegal input for operation."
+    "IllegalInput": {
+      "description": "Illegal input for operation."
     },
-    "GeneralError": {
-      "description": "General Error",
-      "content": {
-        "application/json": {
-          "schema": {
-            "$ref": "#/components/schemas/GeneralError"
+    "GeneralError": {
+      "description": "General Error",
+      "content": {
+        "application/json": {
+          "schema": {
+            "$ref": "#/components/schemas/GeneralError"
           }
         }
       }
     }
   },
-  "securitySchemes": {
-    "api_key": {
-      "type": "apiKey",
-      "name": "api_key",
-      "in": "header"
+  "securitySchemes": {
+    "api_key": {
+      "type": "apiKey",
+      "name": "api_key",
+      "in": "header"
     },
-    "petstore_auth": {
-      "type": "oauth2",
-      "flows": {
-        "implicit": {
-          "authorizationUrl": "https://example.org/api/oauth/dialog",
-          "scopes": {
-            "write:pets": "modify pets in your account",
-            "read:pets": "read your pets"
+    "petstore_auth": {
+      "type": "oauth2",
+      "flows": {
+        "implicit": {
+          "authorizationUrl": "https://example.org/api/oauth/dialog",
+          "scopes": {
+            "write:pets": "modify pets in your account",
+            "read:pets": "read your pets"
           }
         }
       }
@@ -732,7 +963,7 @@
       content:
         application/json:
           schema:
-            $ref: '#/components/schemas/GeneralError'
+            $ref: '#/components/schemas/GeneralError'
   securitySchemes:
     api_key:
       type: apiKey
@@ -747,10 +978,10 @@
             write:pets: modify pets in your account
             read:pets: read your pets
 
-

Paths Object

+

4.8.8 Paths Object

Holds the relative paths to the individual endpoints and their operations. -The path is appended to the URL from the Server Object in order to construct the full URL. The Paths MAY be empty, due to Access Control List (ACL) constraints.

-

Patterned Fields

+The path is appended to the URL from the Server Object in order to construct the full URL. The Paths MAY be empty, due to Access Control List (ACL) constraints.

+
4.8.8.1 Patterned Fields
@@ -761,44 +992,44 @@ - + - +
/{path}/{path} Path Item ObjectA relative path to an individual endpoint. The field name MUST begin with a forward slash (/). The path is appended (no relative URL resolution) to the expanded URL from the Server Object’s url field in order to construct the full URL. Path templating is allowed. When matching URLs, concrete (non-templated) paths would be matched before their templated counterparts. Templated paths with the same hierarchy but different templated names MUST NOT exist as they are identical. In case of ambiguous matching, it’s up to the tooling to decide which one to use.A relative path to an individual endpoint. The field name MUST begin with a forward slash (/). The path is appended (no relative URL resolution) to the expanded URL from the Server Object’s url field in order to construct the full URL. Path templating is allowed. When matching URLs, concrete (non-templated) paths would be matched before their templated counterparts. Templated paths with the same hierarchy but different templated names MUST NOT exist as they are identical. In case of ambiguous matching, it’s up to the tooling to decide which one to use.
-

This object MAY be extended with Specification Extensions.

-

Path Templating Matching

+

This object MAY be extended with Specification Extensions.

+
4.8.8.2 Path Templating Matching

Assuming the following paths, the concrete definition, /pets/mine, will be matched first if used:

-

+

   /pets/{petId}
   /pets/mine
 

The following paths are considered identical and invalid:

-

+

   /pets/{petId}
   /pets/{name}
 

The following may lead to ambiguous resolution:

-

+

   /{entity}/me
   /books/{id}
 
-

Paths Object Example

+
4.8.8.3 Paths Object Example

 {
-  "/pets": {
-    "get": {
-      "description": "Returns all pets from the system that the user has access to",
-      "responses": {
-        "200": {         
-          "description": "A list of pets.",
-          "content": {
-            "application/json": {
-              "schema": {
-                "type": "array",
-                "items": {
-                  "$ref": "#/components/schemas/pet"
+  "/pets": {
+    "get": {
+      "description": "Returns all pets from the system that the user has access to",
+      "responses": {
+        "200": {         
+          "description": "A list of pets.",
+          "content": {
+            "application/json": {
+              "schema": {
+                "type": "array",
+                "items": {
+                  "$ref": "#/components/schemas/pet"
                 }
               }
             }
@@ -814,20 +1045,20 @@
   get:
     description: Returns all pets from the system that the user has access to
     responses:
-      '200':
+      '200':
         description: A list of pets.
         content:
           application/json:
             schema:
               type: array
               items:
-                $ref: '#/components/schemas/pet'
+                $ref: '#/components/schemas/pet'
 
-

Path Item Object

+

4.8.9 Path Item Object

Describes the operations available on a single path. -A Path Item MAY be empty, due to ACL constraints. +A Path Item MAY be empty, due to ACL constraints. The path itself is still exposed to the documentation viewer but they will not know which operations and parameters are available.

-

Fixed Fields

+
4.8.9.1 Fixed Fields
@@ -838,119 +1069,119 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
$ref$ref stringAllows for a referenced definition of this path item. The referenced structure MUST be in the form of a Path Item Object. In case a Path Item Object field appears both in the defined object and the referenced object, the behavior is undefined. See the rules for resolving Relative References.Allows for a referenced definition of this path item. The referenced structure MUST be in the form of a Path Item Object. In case a Path Item Object field appears both in the defined object and the referenced object, the behavior is undefined. See the rules for resolving Relative References.
summarysummary string An optional, string summary, intended to apply to all operations in this path.
descriptiondescription stringAn optional, string description, intended to apply to all operations in this path. CommonMark syntax MAY be used for rich text representation.An optional, string description, intended to apply to all operations in this path. CommonMark syntax MAY be used for rich text representation.
getget Operation Object A definition of a GET operation on this path.
putput Operation Object A definition of a PUT operation on this path.
postpost Operation Object A definition of a POST operation on this path.
deletedelete Operation Object A definition of a DELETE operation on this path.
optionsoptions Operation Object A definition of a OPTIONS operation on this path.
headhead Operation Object A definition of a HEAD operation on this path.
patchpatch Operation Object A definition of a PATCH operation on this path.
tracetrace Operation Object A definition of a TRACE operation on this path.
serversservers [Server Object] An alternative server array to service all operations in this path.
parametersparameters [Parameter Object | Reference Object]A list of parameters that are applicable for all the operations described under this path. These parameters can be overridden at the operation level, but cannot be removed there. The list MUST NOT include duplicated parameters. A unique parameter is defined by a combination of a name and location. The list can use the Reference Object to link to parameters that are defined at the OpenAPI Object’s components/parameters.A list of parameters that are applicable for all the operations described under this path. These parameters can be overridden at the operation level, but cannot be removed there. The list MUST NOT include duplicated parameters. A unique parameter is defined by a combination of a name and location. The list can use the Reference Object to link to parameters that are defined at the OpenAPI Object’s components/parameters.
-

This object MAY be extended with Specification Extensions.

-

Path Item Object Example

+

This object MAY be extended with Specification Extensions.

+
4.8.9.2 Path Item Object Example

 {
-  "get": {
-    "description": "Returns pets based on ID",
-    "summary": "Find pets by ID",
-    "operationId": "getPetsById",
-    "responses": {
-      "200": {
-        "description": "pet response",
-        "content": {
-          "*/*": {
-            "schema": {
-              "type": "array",
-              "items": {
-                "$ref": "#/components/schemas/Pet"
+  "get": {
+    "description": "Returns pets based on ID",
+    "summary": "Find pets by ID",
+    "operationId": "getPetsById",
+    "responses": {
+      "200": {
+        "description": "pet response",
+        "content": {
+          "*/*": {
+            "schema": {
+              "type": "array",
+              "items": {
+                "$ref": "#/components/schemas/Pet"
               }
             }
           }
         }
       },
-      "default": {
-        "description": "error payload",
-        "content": {
-          "text/html": {
-            "schema": {
-              "$ref": "#/components/schemas/ErrorModel"
+      "default": {
+        "description": "error payload",
+        "content": {
+          "text/html": {
+            "schema": {
+              "$ref": "#/components/schemas/ErrorModel"
             }
           }
         }
       }
     }
   },
-  "parameters": [
+  "parameters": [
     {
-      "name": "id",
-      "in": "path",
-      "description": "ID of pet to use",
-      "required": true,
-      "schema": {
-        "type": "array",
-        "items": {
-          "type": "string"
+      "name": "id",
+      "in": "path",
+      "description": "ID of pet to use",
+      "required": true,
+      "schema": {
+        "type": "array",
+        "items": {
+          "type": "string"
         }
       },
-      "style": "simple"
+      "style": "simple"
     }
   ]
 }
@@ -961,20 +1192,20 @@
   summary: Find pets by ID
   operationId: getPetsById
   responses:
-    '200':
+    '200':
       description: pet response
       content:
-        '*/*' :
+        '*/*' :
           schema:
             type: array
             items:
-              $ref: '#/components/schemas/Pet'
+              $ref: '#/components/schemas/Pet'
     default:
       description: error payload
       content:
-        'text/html':
+        'text/html':
           schema:
-            $ref: '#/components/schemas/ErrorModel'
+            $ref: '#/components/schemas/ErrorModel'
 parameters:
 - name: id
   in: path
@@ -986,9 +1217,9 @@
       type: string 
   style: simple
 
-

Operation Object

+

4.8.10 Operation Object

Describes a single API operation on a path.

-

Fixed Fields

+
4.8.10.1 Fixed Fields
@@ -999,128 +1230,128 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
tagstags [string] A list of tags for API documentation control. Tags can be used for logical grouping of operations by resources or any other qualifier.
summarysummary string A short summary of what the operation does.
descriptiondescription stringA verbose explanation of the operation behavior. CommonMark syntax MAY be used for rich text representation.A verbose explanation of the operation behavior. CommonMark syntax MAY be used for rich text representation.
externalDocsexternalDocs External Documentation Object Additional external documentation for this operation.
operationIdoperationId stringUnique string used to identify the operation. The id MUST be unique among all operations described in the API. The operationId value is case-sensitive. Tools and libraries MAY use the operationId to uniquely identify an operation, therefore, it is RECOMMENDED to follow common programming naming conventions.Unique string used to identify the operation. The id MUST be unique among all operations described in the API. The operationId value is case-sensitive. Tools and libraries MAY use the operationId to uniquely identify an operation, therefore, it is RECOMMENDED to follow common programming naming conventions.
parametersparameters [Parameter Object | Reference Object]A list of parameters that are applicable for this operation. If a parameter is already defined at the Path Item, the new definition will override it but can never remove it. The list MUST NOT include duplicated parameters. A unique parameter is defined by a combination of a name and location. The list can use the Reference Object to link to parameters that are defined at the OpenAPI Object’s components/parameters.A list of parameters that are applicable for this operation. If a parameter is already defined at the Path Item, the new definition will override it but can never remove it. The list MUST NOT include duplicated parameters. A unique parameter is defined by a combination of a name and location. The list can use the Reference Object to link to parameters that are defined at the OpenAPI Object’s components/parameters.
requestBodyrequestBody Request Body Object | Reference ObjectThe request body applicable for this operation. The requestBody is fully supported in HTTP methods where the HTTP 1.1 specification [[!RFC7231]] has explicitly defined semantics for request bodies. In other cases where the HTTP spec is vague (such as GET, HEAD and DELETE), requestBody is permitted but does not have well-defined semantics and SHOULD be avoided if possible.The request body applicable for this operation. The requestBody is fully supported in HTTP methods where the HTTP 1.1 specification [RFC7231] has explicitly defined semantics for request bodies. In other cases where the HTTP spec is vague (such as GET, HEAD and DELETE), requestBody is permitted but does not have well-defined semantics and SHOULD be avoided if possible.
responsesresponses Responses Object The list of possible responses as they are returned from executing this operation.
callbackscallbacks Map[string, Callback Object | Reference Object] A map of possible out-of band callbacks related to the parent operation. The key is a unique identifier for the Callback Object. Each value in the map is a Callback Object that describes a request that may be initiated by the API provider and the expected responses.
deprecateddeprecated booleanDeclares this operation to be deprecated. Consumers SHOULD refrain from usage of the declared operation. Default value is false.Declares this operation to be deprecated. Consumers SHOULD refrain from usage of the declared operation. Default value is false.
securitysecurity [Security Requirement Object] A declaration of which security mechanisms can be used for this operation. The list of values includes alternative security requirement objects that can be used. Only one of the security requirement objects need to be satisfied to authorize a request. To make security optional, an empty security requirement ({}) can be included in the array. This definition overrides any declared top-level security. To remove a top-level security declaration, an empty array can be used.
serversservers [Server Object] An alternative server array to service this operation. If an alternative server object is specified at the Path Item Object or Root level, it will be overridden by this value.
-

This object MAY be extended with Specification Extensions.

-

Operation Object Example

+

This object MAY be extended with Specification Extensions.

+
4.8.10.2 Operation Object Example

 {
-  "tags": [
-    "pet"
+  "tags": [
+    "pet"
   ],
-  "summary": "Updates a pet in the store with form data",
-  "operationId": "updatePetWithForm",
-  "parameters": [
+  "summary": "Updates a pet in the store with form data",
+  "operationId": "updatePetWithForm",
+  "parameters": [
     {
-      "name": "petId",
-      "in": "path",
-      "description": "ID of pet that needs to be updated",
-      "required": true,
-      "schema": {
-        "type": "string"
+      "name": "petId",
+      "in": "path",
+      "description": "ID of pet that needs to be updated",
+      "required": true,
+      "schema": {
+        "type": "string"
       }
     }
   ],
-  "requestBody": {
-    "content": {
-      "application/x-www-form-urlencoded": {
-        "schema": {
-          "type": "object",
-          "properties": {
-            "name": {
-              "description": "Updated name of the pet",
-              "type": "string"
+  "requestBody": {
+    "content": {
+      "application/x-www-form-urlencoded": {
+        "schema": {
+          "type": "object",
+          "properties": {
+            "name": {
+              "description": "Updated name of the pet",
+              "type": "string"
             },
-            "status": {
-              "description": "Updated status of the pet",
-              "type": "string"
+            "status": {
+              "description": "Updated status of the pet",
+              "type": "string"
             }
           },
-          "required": ["status"]
+          "required": ["status"]
         }
       }
     }
   },
-  "responses": {
-    "200": {
-      "description": "Pet updated.",
-      "content": {
-        "application/json": {},
-        "application/xml": {}
+  "responses": {
+    "200": {
+      "description": "Pet updated.",
+      "content": {
+        "application/json": {},
+        "application/xml": {}
       }
     },
-    "405": {
-      "description": "Method Not Allowed",
-      "content": {
-        "application/json": {},
-        "application/xml": {}
+    "405": {
+      "description": "Method Not Allowed",
+      "content": {
+        "application/json": {},
+        "application/xml": {}
       }
     }
   },
-  "security": [
+  "security": [
     {
-      "petstore_auth": [
-        "write:pets",
-        "read:pets"
+      "petstore_auth": [
+        "write:pets",
+        "read:pets"
       ]
     }
   ]
@@ -1140,7 +1371,7 @@
     type: string
 requestBody:
   content:
-    'application/x-www-form-urlencoded':
+    'application/x-www-form-urlencoded':
       schema:
        type: object
        properties:
@@ -1153,24 +1384,24 @@
        required:
          - status
 responses:
-  '200':
+  '200':
     description: Pet updated.
     content:
-      'application/json': {}
-      'application/xml': {}
-  '405':
+      'application/json': {}
+      'application/xml': {}
+  '405':
     description: Method Not Allowed
     content:
-      'application/json': {}
-      'application/xml': {}
+      'application/json': {}
+      'application/xml': {}
 security:
 - petstore_auth:
   - write:pets
   - read:pets
 
-

External Documentation Object

+

4.8.11 External Documentation Object

Allows referencing an external resource for extended documentation.

-

Fixed Fields

+
4.8.11.1 Fixed Fields
@@ -1181,41 +1412,41 @@ - + - + - + - +
descriptiondescription stringA description of the target documentation. CommonMark syntax MAY be used for rich text representation.A description of the target documentation. CommonMark syntax MAY be used for rich text representation.
urlurl stringREQUIRED. The URL for the target documentation. This MUST be in the form of a URL.REQUIRED. The URL for the target documentation. This MUST be in the form of a URL.
-

This object MAY be extended with Specification Extensions.

-

External Documentation Object Example

+

This object MAY be extended with Specification Extensions.

+
4.8.11.2 External Documentation Object Example

 {
-  "description": "Find more info here",
-  "url": "https://example.com"
+  "description": "Find more info here",
+  "url": "https://example.com"
 }
 

 description: Find more info here
 url: https://example.com
 
-

Parameter Object

+

4.8.12 Parameter Object

Describes a single operation parameter.

A unique parameter is defined by a combination of a name and location.

-

Parameter Locations

+
4.8.12.1 Parameter Locations

There are four possible parameter locations specified by the in field:

  • path - Used together with Path Templating, where the parameter value is actually part of the operation’s URL. This does not include the host or base path of the API. For example, in /items/{itemId}, the path parameter is itemId.
  • query - Parameters that are appended to the URL. For example, in /items?id=###, the query parameter is id.
  • -
  • header - Custom headers that are expected as part of the request. Note that [[!RFC7230]] states header names are case insensitive.
  • +
  • header - Custom headers that are expected as part of the request. Note that [RFC7230] states header names are case insensitive.
  • cookie - Used to pass a specific cookie value to the API.
-

Fixed Fields

+
4.8.12.2 Fixed Fields
@@ -1226,34 +1457,34 @@ - + - + - + - + - + - + - + - + - + - + - + - +
namename stringREQUIRED. The name of the parameter. Parameter names are case sensitive.
  • If in is "path", the name field MUST correspond to a template expression occurring within the path field in the Paths Object. See Path Templating for further information.
  • If in is "header" and the name field is "Accept", "Content-Type" or "Authorization", the parameter definition SHALL be ignored.
  • For all other cases, the name corresponds to the parameter name used by the in property.
REQUIRED. The name of the parameter. Parameter names are case sensitive.
  • If in is "path", the name field MUST correspond to a template expression occurring within the path field in the Paths Object. See Path Templating for further information.
  • If in is "header" and the name field is "Accept", "Content-Type" or "Authorization", the parameter definition SHALL be ignored.
  • For all other cases, the name corresponds to the parameter name used by the in property.
inin stringREQUIRED. The location of the parameter. Possible values are "query", "header", "path" or "cookie".REQUIRED. The location of the parameter. Possible values are "query", "header", "path" or "cookie".
descriptiondescription stringA brief description of the parameter. This could contain examples of use. CommonMark syntax MAY be used for rich text representation.A brief description of the parameter. This could contain examples of use. CommonMark syntax MAY be used for rich text representation.
requiredrequired booleanDetermines whether this parameter is mandatory. If the parameter location is "path", this property is REQUIRED and its value MUST be true. Otherwise, the property MAY be included and its default value is false.Determines whether this parameter is mandatory. If the parameter location is "path", this property is REQUIRED and its value MUST be true. Otherwise, the property MAY be included and its default value is false.
deprecated deprecated booleanSpecifies that a parameter is deprecated and SHOULD be transitioned out of usage. Default value is false.Specifies that a parameter is deprecated and SHOULD be transitioned out of usage. Default value is false.
allowEmptyValue allowEmptyValue booleanSets the ability to pass empty-valued parameters. This is valid only for query parameters and allows sending a parameter with an empty value. Default value is false. If style is used, and if behavior is n/a (cannot be serialized), the value of allowEmptyValue SHALL be ignored. Use of this property is NOT RECOMMENDED, as it is likely to be removed in a later revision.Sets the ability to pass empty-valued parameters. This is valid only for query parameters and allows sending a parameter with an empty value. Default value is false. If style is used, and if behavior is n/a (cannot be serialized), the value of allowEmptyValue SHALL be ignored. Use of this property is NOT RECOMMENDED, as it is likely to be removed in a later revision.
@@ -1269,40 +1500,40 @@ - style +style string Describes how the parameter value will be serialized depending on the type of the parameter value. Default values (based on value of in): for query - form; for path - simple; for header - simple; for cookie - form. - explode +explode boolean When this is true, parameter values of type array or object generate separate parameters for each value of the array or key-value pair of the map. For other types of parameters this property has no effect. When style is form, the default value is true. For all other styles, the default value is false. - allowReserved +allowReserved boolean -Determines whether the parameter value SHOULD allow reserved characters, as defined by [[!RFC3986]] :/?#[]@!$&'()*+,;= to be included without percent-encoding. This property only applies to parameters with an in value of query. The default value is false. +Determines whether the parameter value SHOULD allow reserved characters, as defined by [RFC3986] :/?#[]@!$&'()*+,;= to be included without percent-encoding. This property only applies to parameters with an in value of query. The default value is false. - schema +schema Schema Object The schema defining the type used for the parameter. - example +example Any -Example of the parameter’s potential value. The example SHOULD match the specified schema and encoding properties if present. The example field is mutually exclusive of the examples field. Furthermore, if referencing a schema that contains an example, the example value SHALL override the example provided by the schema. To represent examples of media types that cannot naturally be represented in JSON or YAML, a string value can contain the example with escaping where necessary. +Example of the parameter’s potential value. The example SHOULD match the specified schema and encoding properties if present. The example field is mutually exclusive of the examples field. Furthermore, if referencing a schema that contains an example, the example value SHALL override the example provided by the schema. To represent examples of media types that cannot naturally be represented in JSON or YAML, a string value can contain the example with escaping where necessary. - examples +examples Map[ string, Example Object | Reference Object] -Examples of the parameter’s potential value. Each example SHOULD contain a value in the correct format as specified in the parameter encoding. The examples field is mutually exclusive of the example field. Furthermore, if referencing a schema that contains an example, the examples value SHALL override the example provided by the schema. +Examples of the parameter’s potential value. Each example SHOULD contain a value in the correct format as specified in the parameter encoding. The examples field is mutually exclusive of the example field. Furthermore, if referencing a schema that contains an example, the examples value SHALL override the example provided by the schema.

For more complex scenarios, the content property can define the media type and schema of the parameter. -A parameter MUST contain either a schema property, or a content property, but not both. -When example or examples are provided in conjunction with the schema object, the example MUST follow the prescribed serialization strategy for the parameter.

+A parameter MUST contain either a schema property, or a content property, but not both. +When example or examples are provided in conjunction with the schema object, the example MUST follow the prescribed serialization strategy for the parameter.

@@ -1313,13 +1544,13 @@ - + - +
contentcontent Map[string, Media Type Object]A map containing the representations for the parameter. The key is the media type and the value describes it. The map MUST only contain one entry.A map containing the representations for the parameter. The key is the media type and the value describes it. The map MUST only contain one entry.
-

Style Values

+
4.8.12.3 Style Values

In order to support common ways of serializing simple parameters, a set of style values are defined.

@@ -1335,25 +1566,25 @@ - + - + - + - + @@ -1375,12 +1606,12 @@
matrix primitive, array, object pathPath-style parameters defined by [[!RFC6570]]Path-style parameters defined by [RFC6570]
label primitive, array, object pathLabel style parameters defined by [[!RFC6570]]Label style parameters defined by [RFC6570]
form primitive, array, object query, cookieForm style parameters defined by [[!RFC6570]]. This option replaces collectionFormat with a csv (when explode is false) or multi (when explode is true) value from OpenAPI 2.0.Form style parameters defined by [RFC6570]. This option replaces collectionFormat with a csv (when explode is false) or multi (when explode is true) value from OpenAPI 2.0.
simple array path, headerSimple style parameters defined by [[!RFC6570]]. This option replaces collectionFormat with a csv value from OpenAPI 2.0.Simple style parameters defined by [RFC6570]. This option replaces collectionFormat with a csv value from OpenAPI 2.0.
spaceDelimited
-

Style Examples

+
4.8.12.4 Style Examples

Assume a parameter named color has one of the following values:

-

-   string -> "blue"
-   array -> ["blue","black","brown"]
-   object -> { "R": 100, "G": 200, "B": 150 }
+

+   string -> "blue"
+   array -> ["blue","black","brown"]
+   object -> { "R": 100, "G": 200, "B": 150 }
 

The following table shows examples of rendering differences for each value.

@@ -1481,27 +1712,27 @@ - +
n/a n/a n/acolor[R]=100&color[G]=200&color[B]=150color[R]=100&color[G]=200&color[B]=150
-

This object MAY be extended with Specification Extensions.

-

Parameter Object Examples

+

This object MAY be extended with Specification Extensions.

+
4.8.12.5 Parameter Object Examples

A header parameter with an array of 64 bit integer numbers:


 {
-  "name": "token",
-  "in": "header",
-  "description": "token to be passed as a header",
-  "required": true,
-  "schema": {
-    "type": "array",
-    "items": {
-      "type": "integer",
-      "format": "int64"
+  "name": "token",
+  "in": "header",
+  "description": "token to be passed as a header",
+  "required": true,
+  "schema": {
+    "type": "array",
+    "items": {
+      "type": "integer",
+      "format": "int64"
     }
   },
-  "style": "simple"
+  "style": "simple"
 }
 

@@ -1519,12 +1750,12 @@
 

A path parameter of a string value:


 {
-  "name": "username",
-  "in": "path",
-  "description": "username to fetch",
-  "required": true,
-  "schema": {
-    "type": "string"
+  "name": "username",
+  "in": "path",
+  "description": "username to fetch",
+  "required": true,
+  "schema": {
+    "type": "string"
   }
 }
 
@@ -1539,18 +1770,18 @@

An optional query parameter of a string value, allowing multiple values by repeating the query parameter:


 {
-  "name": "id",
-  "in": "query",
-  "description": "ID of the object to fetch",
-  "required": false,
-  "schema": {
-    "type": "array",
-    "items": {
-      "type": "string"
+  "name": "id",
+  "in": "query",
+  "description": "ID of the object to fetch",
+  "required": false,
+  "schema": {
+    "type": "array",
+    "items": {
+      "type": "string"
     }
   },
-  "style": "form",
-  "explode": true
+  "style": "form",
+  "explode": true
 }
 

@@ -1568,15 +1799,15 @@
 

A free-form query parameter, allowing undefined parameters of a specific type:


 {
-  "in": "query",
-  "name": "freeForm",
-  "schema": {
-    "type": "object",
-    "additionalProperties": {
-      "type": "integer"
+  "in": "query",
+  "name": "freeForm",
+  "schema": {
+    "type": "object",
+    "additionalProperties": {
+      "type": "integer"
     },
   },
-  "style": "form"
+  "style": "form"
 }
 

@@ -1591,22 +1822,22 @@
 

A complex parameter using content to define serialization:


 {
-  "in": "query",
-  "name": "coordinates",
-  "content": {
-    "application/json": {
-      "schema": {
-        "type": "object",
-        "required": [
-          "lat",
-          "long"
+  "in": "query",
+  "name": "coordinates",
+  "content": {
+    "application/json": {
+      "schema": {
+        "type": "object",
+        "required": [
+          "lat",
+          "long"
         ],
-        "properties": {
-          "lat": {
-            "type": "number"
+        "properties": {
+          "lat": {
+            "type": "number"
           },
-          "long": {
-            "type": "number"
+          "long": {
+            "type": "number"
           }
         }
       }
@@ -1630,9 +1861,9 @@
         long:
           type: number
 
-

Request Body Object

+

4.8.13 Request Body Object

Describes a single request body.

-

Fixed Fields

+
4.8.13.1 Fixed Fields
@@ -1643,64 +1874,64 @@ - + - + - + - + - +
descriptiondescription stringA brief description of the request body. This could contain examples of use. CommonMark syntax MAY be used for rich text representation.A brief description of the request body. This could contain examples of use. CommonMark syntax MAY be used for rich text representation.
contentcontent Map[string, Media Type Object]REQUIRED. The content of the request body. The key is a media type or media type range and the value describes it. For requests that match multiple keys, only the most specific key is applicable. e.g. text/plain overrides text/*REQUIRED. The content of the request body. The key is a media type or media type range and the value describes it. For requests that match multiple keys, only the most specific key is applicable. e.g. text/plain overrides text/*
requiredrequired boolean Determines if the request body is required in the request. Defaults to false.
-

This object MAY be extended with Specification Extensions.

-

Request Body Examples

+

This object MAY be extended with Specification Extensions.

+
4.8.13.2 Request Body Examples

A request body with a referenced model definition.


 {
-  "description": "user to add to the system",
-  "content": {
-    "application/json": {
-      "schema": {
-        "$ref": "#/components/schemas/User"
+  "description": "user to add to the system",
+  "content": {
+    "application/json": {
+      "schema": {
+        "$ref": "#/components/schemas/User"
       },
-      "examples": {
-          "user" : {
-            "summary": "User Example",
-            "externalValue": "https://foo.bar/examples/user-example.json"
+      "examples": {
+          "user" : {
+            "summary": "User Example",
+            "externalValue": "https://foo.bar/examples/user-example.json"
           }
         }
     },
-    "application/xml": {
-      "schema": {
-        "$ref": "#/components/schemas/User"
+    "application/xml": {
+      "schema": {
+        "$ref": "#/components/schemas/User"
       },
-      "examples": {
-          "user" : {
-            "summary": "User example in XML",
-            "externalValue": "https://foo.bar/examples/user-example.xml"
+      "examples": {
+          "user" : {
+            "summary": "User example in XML",
+            "externalValue": "https://foo.bar/examples/user-example.xml"
           }
         }
     },
-    "text/plain": {
-      "examples": {
-        "user" : {
-            "summary": "User example in Plain text",
-            "externalValue": "https://foo.bar/examples/user-example.txt"
+    "text/plain": {
+      "examples": {
+        "user" : {
+            "summary": "User example in Plain text",
+            "externalValue": "https://foo.bar/examples/user-example.txt"
         }
       }
     },
-    "*/*": {
-      "examples": {
-        "user" : {
-            "summary": "User example in other format",
-            "externalValue": "https://foo.bar/examples/user-example.whatever"
+    "*/*": {
+      "examples": {
+        "user" : {
+            "summary": "User example in other format",
+            "externalValue": "https://foo.bar/examples/user-example.whatever"
         }
       }
     }
@@ -1710,42 +1941,42 @@
 

 description: user to add to the system
 content:
-  'application/json':
+  'application/json':
     schema:
-      $ref: '#/components/schemas/User'
+      $ref: '#/components/schemas/User'
     examples:
       user:
         summary: User Example
-        externalValue: 'https://foo.bar/examples/user-example.json'
-  'application/xml':
+        externalValue: 'https://foo.bar/examples/user-example.json'
+  'application/xml':
     schema:
-      $ref: '#/components/schemas/User'
+      $ref: '#/components/schemas/User'
     examples:
       user:
         summary: User example in XML
-        externalValue: 'https://foo.bar/examples/user-example.xml'
-  'text/plain':
+        externalValue: 'https://foo.bar/examples/user-example.xml'
+  'text/plain':
     examples:
       user:
         summary: User example in Plain text
-        externalValue: 'https://foo.bar/examples/user-example.txt'
-  '*/*':
+        externalValue: 'https://foo.bar/examples/user-example.txt'
+  '*/*':
     examples:
       user:
         summary: User example in other format
-        externalValue: 'https://foo.bar/examples/user-example.whatever'
+        externalValue: 'https://foo.bar/examples/user-example.whatever'
 

A body parameter that is an array of string values:


 {
-  "description": "user to add to the system",
-  "required": true,
-  "content": {
-    "text/plain": {
-      "schema": {
-        "type": "array",
-        "items": {
-          "type": "string"
+  "description": "user to add to the system",
+  "required": true,
+  "content": {
+    "text/plain": {
+      "schema": {
+        "type": "array",
+        "items": {
+          "type": "string"
         }
       }
     }
@@ -1762,9 +1993,9 @@
       items:
         type: string
 
-

Media Type Object

+

4.8.14 Media Type Object

Each Media Type Object provides schema and examples for the media type identified by its key.

-

Fixed Fields

+
4.8.14.1 Fixed Fields
@@ -1775,58 +2006,58 @@ - + - + - + - + - + - + - +
schemaschema Schema Object The schema defining the content of the request, response, or parameter.
exampleexample AnyExample of the media type. The example object SHOULD be in the correct format as specified by the media type. The example field is mutually exclusive of the examples field. Furthermore, if referencing a schema which contains an example, the example value SHALL override the example provided by the schema.Example of the media type. The example object SHOULD be in the correct format as specified by the media type. The example field is mutually exclusive of the examples field. Furthermore, if referencing a schema which contains an example, the example value SHALL override the example provided by the schema.
examplesexamples Map[ string, Example Object | Reference Object]Examples of the media type. Each example object SHOULD match the media type and specified schema if present. The examples field is mutually exclusive of the example field. Furthermore, if referencing a schema which contains an example, the examples value SHALL override the example provided by the schema.Examples of the media type. Each example object SHOULD match the media type and specified schema if present. The examples field is mutually exclusive of the example field. Furthermore, if referencing a schema which contains an example, the examples value SHALL override the example provided by the schema.
encodingencoding Map[string, Encoding Object]A map between a property name and its encoding information. The key, being the property name, MUST exist in the schema as a property. The encoding object SHALL only apply to requestBody objects when the media type is multipart or application/x-www-form-urlencoded.A map between a property name and its encoding information. The key, being the property name, MUST exist in the schema as a property. The encoding object SHALL only apply to requestBody objects when the media type is multipart or application/x-www-form-urlencoded.
-

This object MAY be extended with Specification Extensions.

-

Media Type Examples

+

This object MAY be extended with Specification Extensions.

+
4.8.14.2 Media Type Examples

 {
-  "application/json": {
-    "schema": {
-         "$ref": "#/components/schemas/Pet"
+  "application/json": {
+    "schema": {
+         "$ref": "#/components/schemas/Pet"
     },
-    "examples": {
-      "cat" : {
-        "summary": "An example of a cat",
-        "value":
+    "examples": {
+      "cat" : {
+        "summary": "An example of a cat",
+        "value":
           {
-            "name": "Fluffy",
-            "petType": "Cat",
-            "color": "White",
-            "gender": "male",
-            "breed": "Persian"
+            "name": "Fluffy",
+            "petType": "Cat",
+            "color": "White",
+            "gender": "male",
+            "breed": "Persian"
           }
       },
-      "dog": {
-        "summary": "An example of a dog with a cat's name",
-        "value" :  {
-          "name": "Puma",
-          "petType": "Dog",
-          "color": "Black",
-          "gender": "Female",
-          "breed": "Mixed"
+      "dog": {
+        "summary": "An example of a dog with a cat's name",
+        "value" :  {
+          "name": "Puma",
+          "petType": "Dog",
+          "color": "Black",
+          "gender": "Female",
+          "breed": "Mixed"
         },
-      "frog": {
-          "$ref": "#/components/examples/frog-example"
+      "frog": {
+          "$ref": "#/components/examples/frog-example"
         }
       }
     }
@@ -1836,7 +2067,7 @@
 

 application/json:
   schema:
-    $ref: "#/components/schemas/Pet"
+    $ref: "#/components/schemas/Pet"
   examples:
     cat:
       summary: An example of a cat
@@ -1847,7 +2078,7 @@
         gender: male
         breed: Persian
     dog:
-      summary: An example of a dog with a cat's name
+      summary: An example of a dog with a cat's name
       value:
         name: Puma
         petType: Dog
@@ -1855,14 +2086,14 @@
         gender: Female
         breed: Mixed
     frog:
-      $ref: "#/components/examples/frog-example"
+      $ref: "#/components/examples/frog-example"
 
-

Considerations for File Uploads

+
4.8.14.3 Considerations for File Uploads

In contrast with the 2.0 specification, file input/output content in OpenAPI is described with the same semantics as any other schema type.

-

In contrast with the 3.0 specification, the format keyword has no effect on the content-encoding of the schema. JSON Schema offers a contentEncoding keyword, which may be used to specify the Content-Encoding for the schema. The contentEncoding keyword supports all encodings defined in [[!RFC4648]], including “base64” and “base64url”, as well as “quoted-printable” from [[!RFC2045]]. The encoding specified by the contentEncoding keyword is independent of an encoding specified by the Content-Type header in the request or response or metadata of a multipart body – when both are present, the encoding specified in the contentEncoding is applied first and then the encoding specified in the Content-Type header.

-

JSON Schema also offers a contentMediaType keyword. However, when the media type is already specified by the Media Type Object’s key, or by the contentType field of an Encoding Object, the contentMediaType keyword SHALL be ignored if present.

+

In contrast with the 3.0 specification, the format keyword has no effect on the content-encoding of the schema. JSON Schema offers a contentEncoding keyword, which may be used to specify the Content-Encoding for the schema. The contentEncoding keyword supports all encodings defined in [RFC4648], including “base64” and “base64url”, as well as “quoted-printable” from [RFC2045]. The encoding specified by the contentEncoding keyword is independent of an encoding specified by the Content-Type header in the request or response or metadata of a multipart body – when both are present, the encoding specified in the contentEncoding is applied first and then the encoding specified in the Content-Type header.

+

JSON Schema also offers a contentMediaType keyword. However, when the media type is already specified by the Media Type Object’s key, or by the contentType field of an Encoding Object, the contentMediaType keyword SHALL be ignored if present.

Examples:

-

Content transferred in binary (octet-stream) MAY omit schema:

+

Content transferred in binary (octet-stream) MAY omit schema:


 # a PNG image as a binary file:
 content:
@@ -1890,7 +2121,7 @@
   content:
     application/octet-stream: {}
 
-

In addition, specific media types MAY be specified:

+

In addition, specific media types MAY be specified:


 # multiple, specific media types may be specified:
 requestBody:
@@ -1899,21 +2130,21 @@
     image/jpeg: {}
     image/png: {}
 
-

To upload multiple files, a multipart media type MUST be used:

+

To upload multiple files, a multipart media type MUST be used:


 requestBody:
   content:
     multipart/form-data:
       schema:
         properties:
-          # The property name 'file' will be used for all files.
+          # The property name 'file' will be used for all files.
           file:
             type: array
             items: {}
 

As seen in the section on multipart/form-data below, the empty schema for items indicates a media type of application/octet-stream.

-

Support for x-www-form-urlencoded Request Bodies

-

To submit content using form url encoding via [[!RFC1866]], the following +

4.8.14.4 Support for x-www-form-urlencoded Request Bodies
+

To submit content using form url encoding via [RFC1866], the following definition may be used:


 requestBody:
@@ -1930,12 +2161,12 @@
             type: object
             properties: {}
 
-

In this example, the contents in the requestBody MUST be stringified per [[!RFC1866]] when passed to the server. In addition, the address field complex object will be stringified.

+

In this example, the contents in the requestBody MUST be stringified per [RFC1866] when passed to the server. In addition, the address field complex object will be stringified.

When passing complex objects in the application/x-www-form-urlencoded content type, the default serialization strategy of such properties is described in the Encoding Object’s style property as form.

-

Special Considerations for multipart Content

-

It is common to use multipart/form-data as a Content-Type when transferring request bodies to operations. In contrast to 2.0, a schema is REQUIRED to define the input parameters to the operation when using multipart content. This supports complex structures as well as supporting mechanisms for multiple file uploads.

-

In a multipart/form-data request body, each schema property, or each element of a schema array property, takes a section in the payload with an internal header as defined by [[!RFC7578]]. The serialization strategy for each property of a multipart/form-data request body can be specified in an associated Encoding Object.

-

When passing in multipart types, boundaries MAY be used to separate sections of the content being transferred – thus, the following default Content-Types are defined for multipart:

+
4.8.14.5 Special Considerations for multipart Content
+

It is common to use multipart/form-data as a Content-Type when transferring request bodies to operations. In contrast to 2.0, a schema is REQUIRED to define the input parameters to the operation when using multipart content. This supports complex structures as well as supporting mechanisms for multiple file uploads.

+

In a multipart/form-data request body, each schema property, or each element of a schema array property, takes a section in the payload with an internal header as defined by [RFC7578]. The serialization strategy for each property of a multipart/form-data request body can be specified in an associated Encoding Object.

+

When passing in multipart types, boundaries MAY be used to separate sections of the content being transferred – thus, the following default Content-Types are defined for multipart:

  • If the property is a primitive, or an array of primitive values, the default Content-Type is text/plain
  • If the property is complex, or an array of complex values, the default Content-Type is application/json
  • @@ -1972,12 +2203,12 @@ type: array items: type: object - $ref: '#/components/schemas/Address' + $ref: '#/components/schemas/Address'

    An encoding attribute is introduced to give you control over the serialization of parts of multipart request bodies. This attribute is only applicable to multipart and application/x-www-form-urlencoded request bodies.

    -

Encoding Object

+

4.8.15 Encoding Object

A single encoding definition applied to a single schema property.

-

Fixed Fields

+
4.8.15.1 Fixed Fields
@@ -1988,34 +2219,34 @@ - + - + - + - + - + - + - + - + - +
contentTypecontentType string The Content-Type for encoding a specific property. Default value depends on the property type: for object - application/json; for array – the default is defined based on the inner type; for all other cases the default is application/octet-stream. The value can be a specific media type (e.g. application/json), a wildcard media type (e.g. image/*), or a comma-separated list of the two types.
headersheaders Map[string, Header Object | Reference Object]A map allowing additional information to be provided as headers, for example Content-Disposition. Content-Type is described separately and SHALL be ignored in this section. This property SHALL be ignored if the request body media type is not a multipart.A map allowing additional information to be provided as headers, for example Content-Disposition. Content-Type is described separately and SHALL be ignored in this section. This property SHALL be ignored if the request body media type is not a multipart.
stylestyle stringDescribes how a specific property value will be serialized depending on its type. See Parameter Object for details on the style property. The behavior follows the same values as query parameters, including default values. This property SHALL be ignored if the request body media type is not application/x-www-form-urlencoded or multipart/form-data. If a value is explicitly defined, then the value of contentType (implicit or explicit) SHALL be ignored.Describes how a specific property value will be serialized depending on its type. See Parameter Object for details on the style property. The behavior follows the same values as query parameters, including default values. This property SHALL be ignored if the request body media type is not application/x-www-form-urlencoded or multipart/form-data. If a value is explicitly defined, then the value of contentType (implicit or explicit) SHALL be ignored.
explodeexplode booleanWhen this is true, property values of type array or object generate separate parameters for each value of the array, or key-value-pair of the map. For other types of properties this property has no effect. When style is form, the default value is true. For all other styles, the default value is false. This property SHALL be ignored if the request body media type is not application/x-www-form-urlencoded or multipart/form-data. If a value is explicitly defined, then the value of contentType (implicit or explicit) SHALL be ignored.When this is true, property values of type array or object generate separate parameters for each value of the array, or key-value-pair of the map. For other types of properties this property has no effect. When style is form, the default value is true. For all other styles, the default value is false. This property SHALL be ignored if the request body media type is not application/x-www-form-urlencoded or multipart/form-data. If a value is explicitly defined, then the value of contentType (implicit or explicit) SHALL be ignored.
allowReservedallowReserved booleanDetermines whether the parameter value SHOULD allow reserved characters, as defined by [[!RFC3986]] :/?#[]@!$&'()*+,;= to be included without percent-encoding. The default value is false. This property SHALL be ignored if the request body media type is not application/x-www-form-urlencoded or multipart/form-data. If a value is explicitly defined, then the value of contentType (implicit or explicit) SHALL be ignored.Determines whether the parameter value SHOULD allow reserved characters, as defined by [RFC3986] :/?#[]@!$&'()*+,;= to be included without percent-encoding. The default value is false. This property SHALL be ignored if the request body media type is not application/x-www-form-urlencoded or multipart/form-data. If a value is explicitly defined, then the value of contentType (implicit or explicit) SHALL be ignored.
-

This object MAY be extended with Specification Extensions.

-

Encoding Object Example

+

This object MAY be extended with Specification Extensions.

+
4.8.15.2 Encoding Object Example

 requestBody:
   content:
@@ -2050,17 +2281,17 @@
               schema:
                 type: integer
 
-

Responses Object

+

4.8.16 Responses Object

A container for the expected responses of an operation. The container maps a HTTP response code to the expected response.

The documentation is not necessarily expected to cover all possible HTTP response codes because they may not be known in advance. However, documentation is expected to cover a successful operation response and any known errors.

-

The default MAY be used as a default response object for all HTTP codes +

The default MAY be used as a default response object for all HTTP codes that are not covered individually by the Responses Object.

-

The Responses Object MUST contain at least one response code, and if only one -response code is provided it SHOULD be the response for a successful operation +

The Responses Object MUST contain at least one response code, and if only one +response code is provided it SHOULD be the response for a successful operation call.

-

Fixed Fields

+
4.8.16.1 Fixed Fields
@@ -2071,13 +2302,13 @@ - +
defaultdefault Response Object | Reference Object The documentation of responses other than the ones declared for specific HTTP response codes. Use this field to cover undeclared responses.
-

Patterned Fields

+
4.8.16.2 Patterned Fields
@@ -2088,33 +2319,33 @@ - + - +
HTTP Status CodeHTTP Status Code Response Object | Reference ObjectAny HTTP status code can be used as the property name, but only one property per code, to describe the expected response for that HTTP status code. This field MUST be enclosed in quotation marks (for example, “200”) for compatibility between JSON and YAML. To define a range of response codes, this field MAY contain the uppercase wildcard character X. For example, 2XX represents all response codes between [200-299]. Only the following range definitions are allowed: 1XX, 2XX, 3XX, 4XX, and 5XX. If a response is defined using an explicit code, the explicit code definition takes precedence over the range definition for that code.Any HTTP status code can be used as the property name, but only one property per code, to describe the expected response for that HTTP status code. This field MUST be enclosed in quotation marks (for example, “200”) for compatibility between JSON and YAML. To define a range of response codes, this field MAY contain the uppercase wildcard character X. For example, 2XX represents all response codes between [200-299]. Only the following range definitions are allowed: 1XX, 2XX, 3XX, 4XX, and 5XX. If a response is defined using an explicit code, the explicit code definition takes precedence over the range definition for that code.
-

This object MAY be extended with Specification Extensions.

-

Responses Object Example

+

This object MAY be extended with Specification Extensions.

+
4.8.16.3 Responses Object Example

A 200 response for a successful operation and a default response for others (implying an error):


 {
-  "200": {
-    "description": "a pet to be returned",
-    "content": {
-      "application/json": {
-        "schema": {
-          "$ref": "#/components/schemas/Pet"
+  "200": {
+    "description": "a pet to be returned",
+    "content": {
+      "application/json": {
+        "schema": {
+          "$ref": "#/components/schemas/Pet"
         }
       }
     }
   },
-  "default": {
-    "description": "Unexpected error",
-    "content": {
-      "application/json": {
-        "schema": {
-          "$ref": "#/components/schemas/ErrorModel"
+  "default": {
+    "description": "Unexpected error",
+    "content": {
+      "application/json": {
+        "schema": {
+          "$ref": "#/components/schemas/ErrorModel"
         }
       }
     }
@@ -2122,23 +2353,23 @@
 }
 

-'200':
+'200':
   description: a pet to be returned
   content:
     application/json:
       schema:
-        $ref: '#/components/schemas/Pet'
+        $ref: '#/components/schemas/Pet'
 default:
   description: Unexpected error
   content:
     application/json:
       schema:
-        $ref: '#/components/schemas/ErrorModel'
+        $ref: '#/components/schemas/ErrorModel'
 
-

Response Object

+

4.8.17 Response Object

Describes a single response from an API Operation, including design-time, static links to operations based on the response.

-

Fixed Fields

+
4.8.17.1 Fixed Fields
@@ -2149,39 +2380,39 @@ - + - + - + - + - + - +
descriptiondescription stringREQUIRED. A description of the response. CommonMark syntax MAY be used for rich text representation.REQUIRED. A description of the response. CommonMark syntax MAY be used for rich text representation.
headersheaders Map[string, Header Object | Reference Object]Maps a header name to its definition. [[!RFC7230]] states header names are case insensitive. If a response header is defined with the name "Content-Type", it SHALL be ignored.Maps a header name to its definition. [RFC7230] states header names are case insensitive. If a response header is defined with the name "Content-Type", it SHALL be ignored.
contentcontent Map[string, Media Type Object] A map containing descriptions of potential response payloads. The key is a media type or media type range and the value describes it. For responses that match multiple keys, only the most specific key is applicable. e.g. text/plain overrides text/*
linkslinks Map[string, Link Object | Reference Object] A map of operations links that can be followed from the response. The key of the map is a short name for the link, following the naming constraints of the names for Component Objects.
-

This object MAY be extended with Specification Extensions.

-

Response Object Examples

+

This object MAY be extended with Specification Extensions.

+
4.8.17.2 Response Object Examples

Response of an array of a complex type:


 {
-  "description": "A complex object array response",
-  "content": {
-    "application/json": {
-      "schema": {
-        "type": "array",
-        "items": {
-          "$ref": "#/components/schemas/VeryComplexType"
+  "description": "A complex object array response",
+  "content": {
+    "application/json": {
+      "schema": {
+        "type": "array",
+        "items": {
+          "$ref": "#/components/schemas/VeryComplexType"
         }
       }
     }
@@ -2195,16 +2426,16 @@
     schema:
       type: array
       items:
-        $ref: '#/components/schemas/VeryComplexType'
+        $ref: '#/components/schemas/VeryComplexType'
 

Response with a string type:


 {
-  "description": "A simple string response",
-  "content": {
-    "text/plain": {
-      "schema": {
-        "type": "string"
+  "description": "A simple string response",
+  "content": {
+    "text/plain": {
+      "schema": {
+        "type": "string"
       }
     }
   }
@@ -2221,32 +2452,32 @@
 

Plain text response with headers:


 {
-  "description": "A simple string response",
-  "content": {
-    "text/plain": {
-      "schema": {
-        "type": "string",
-        "example": "whoa!"
+  "description": "A simple string response",
+  "content": {
+    "text/plain": {
+      "schema": {
+        "type": "string",
+        "example": "whoa!"
       }
     }
   },
-  "headers": {
-    "X-Rate-Limit-Limit": {
-      "description": "The number of allowed requests in the current period",
-      "schema": {
-        "type": "integer"
+  "headers": {
+    "X-Rate-Limit-Limit": {
+      "description": "The number of allowed requests in the current period",
+      "schema": {
+        "type": "integer"
       }
     },
-    "X-Rate-Limit-Remaining": {
-      "description": "The number of remaining requests in the current period",
-      "schema": {
-        "type": "integer"
+    "X-Rate-Limit-Remaining": {
+      "description": "The number of remaining requests in the current period",
+      "schema": {
+        "type": "integer"
       }
     },
-    "X-Rate-Limit-Reset": {
-      "description": "The number of seconds left in the current period",
-      "schema": {
-        "type": "integer"
+    "X-Rate-Limit-Reset": {
+      "description": "The number of seconds left in the current period",
+      "schema": {
+        "type": "integer"
       }
     }
   }
@@ -2258,7 +2489,7 @@
   text/plain:
     schema:
       type: string
-    example: 'whoa!'
+    example: 'whoa!'
 headers:
   X-Rate-Limit-Limit:
     description: The number of allowed requests in the current period
@@ -2276,18 +2507,18 @@
 

Response with no return value:


 {
-  "description": "object created"
+  "description": "object created"
 }
 

 description: object created
 
-

Callback Object

+

4.8.18 Callback Object

A map of possible out-of band callbacks related to the parent operation. Each value in the map is a Path Item Object that describes a set of requests that may be initiated by the API provider and the expected responses. The key value used to identify the path item object is an expression, evaluated at runtime, that identifies a URL to use for the callback operation.

To describe incoming requests from the API provider independent from another API call, use the webhooks field.

-

Patterned Fields

+
4.8.18.1 Patterned Fields
@@ -2298,18 +2529,18 @@ - +
{expression}{expression} Path Item Object | Reference Object A Path Item Object, or a reference to one, used to define a callback request and expected responses. A complete example is available.
-

This object MAY be extended with Specification Extensions.

-

Key Expression

+

This object MAY be extended with Specification Extensions.

+
4.8.18.2 Key Expression

The key that identifies the Path Item Object is a runtime expression that can be evaluated in the context of a runtime HTTP request/response to identify the URL to be used for the callback request. A simple example might be $request.body#/url. However, using a runtime expression the complete HTTP message can be accessed. -This includes accessing any part of a body that a JSON Pointer [[!RFC6901]] can reference.

+This includes accessing any part of a body that a JSON Pointer [RFC6901] can reference.

For example, given the following HTTP request:


 POST /subscribe/myevent?queryUrl=https://clientdomain.com/stillrunning HTTP/1.1
@@ -2318,11 +2549,11 @@
 Content-Length: 187
 
 {
-  "failedUrl" : "https://clientdomain.com/failed",
-  "successUrls" : [
-    "https://clientdomain.com/fast",
-    "https://clientdomain.com/medium",
-    "https://clientdomain.com/slow"
+  "failedUrl" : "https://clientdomain.com/failed",
+  "successUrls" : [
+    "https://clientdomain.com/fast",
+    "https://clientdomain.com/medium",
+    "https://clientdomain.com/slow"
   ]
 }
 
@@ -2372,39 +2603,39 @@
 
 
 
-

Callback Object Examples

+
4.8.18.3 Callback Object Examples

The following example uses the user provided queryUrl query string parameter to define the callback URL. This is an example of how to use a callback object to describe a WebHook callback that goes with the subscription operation to enable registering for the WebHook.


 myCallback:
-  '{$request.query.queryUrl}':
+  '{$request.query.queryUrl}':
     post:
       requestBody:
         description: Callback payload
         content:
-          'application/json':
+          'application/json':
             schema:
-              $ref: '#/components/schemas/SomePayload'
+              $ref: '#/components/schemas/SomePayload'
       responses:
-        '200':
+        '200':
           description: callback successfully processed
 

The following example shows a callback where the server is hard-coded, but the query string parameters are populated from the id and email property in the request body.


 transactionCallback:
-  'http://notificationServer.com?transactionId={$request.body#/id}&email={$request.body#/email}':
+  'http://notificationServer.com?transactionId={$request.body#/id}&email={$request.body#/email}':
     post:
       requestBody:
         description: Callback payload
         content:
-          'application/json':
+          'application/json':
             schema:
-              $ref: '#/components/schemas/SomePayload'
+              $ref: '#/components/schemas/SomePayload'
       responses:
-        '200':
+        '200':
           description: callback successfully processed
 
-

Example Object

-

Fixed Fields

+

4.8.19 Example Object

+
4.8.19.1 Fixed Fields
@@ -2415,88 +2646,88 @@ - + - + - + - + - +
summarysummary string Short description for the example.
descriptiondescription stringLong description for the example. CommonMark syntax MAY be used for rich text representation.Long description for the example. CommonMark syntax MAY be used for rich text representation.
valuevalue Any Embedded literal example. The value field and externalValue field are mutually exclusive. To represent examples of media types that cannot naturally represented in JSON or YAML, use a string value to contain the example, escaping where necessary.
externalValueexternalValue string A URI that points to the literal example. This provides the capability to reference examples that cannot easily be included in JSON or YAML documents. The value field and externalValue field are mutually exclusive. See the rules for resolving Relative References.
-

This object MAY be extended with Specification Extensions.

+

This object MAY be extended with Specification Extensions.

In all cases, the example value is expected to be compatible with the type schema -of its associated value. Tooling implementations MAY choose to +of its associated value. Tooling implementations MAY choose to validate compatibility automatically, and reject the example value(s) if incompatible.

-

Example Object Examples

+
4.8.19.2 Example Object Examples

In a request body:


 requestBody:
   content:
-    'application/json':
+    'application/json':
       schema:
-        $ref: '#/components/schemas/Address'
+        $ref: '#/components/schemas/Address'
       examples:
         foo:
           summary: A foo example
-          value: {"foo": "bar"}
+          value: {"foo": "bar"}
         bar:
           summary: A bar example
-          value: {"bar": "baz"}
-    'application/xml':
+          value: {"bar": "baz"}
+    'application/xml':
       examples:
         xmlExample:
           summary: This is an example in XML
-          externalValue: 'https://example.org/examples/address-example.xml'
-    'text/plain':
+          externalValue: 'https://example.org/examples/address-example.xml'
+    'text/plain':
       examples:
         textExample:
           summary: This is a text example
-          externalValue: 'https://foo.bar/examples/address-example.txt'
+          externalValue: 'https://foo.bar/examples/address-example.txt'
 

In a parameter:


 parameters:
-  - name: 'zipCode'
-    in: 'query'
+  - name: 'zipCode'
+    in: 'query'
     schema:
-      type: 'string'
-      format: 'zip-code'
+      type: 'string'
+      format: 'zip-code'
     examples:
       zip-example:
-        $ref: '#/components/examples/zip-example'
+        $ref: '#/components/examples/zip-example'
 

In a response:


 responses:
-  '200':
+  '200':
     description: your car appointment has been booked
     content:
       application/json:
         schema:
-          $ref: '#/components/schemas/SuccessResponse'
+          $ref: '#/components/schemas/SuccessResponse'
         examples:
           confirmation-success:
-            $ref: '#/components/examples/confirmation-success'
+            $ref: '#/components/examples/confirmation-success'
 
-

Link Object

+

4.8.21 Header Object

The Header Object follows the structure of the Parameter Object with the following changes:

    -
  1. name MUST NOT be specified, it is given in the corresponding headers map.
  2. -
  3. in MUST NOT be specified, it is implicitly in header.
  4. -
  5. All traits that are affected by the location MUST be applicable to a location of header (for example, style).
  6. +
  7. name MUST NOT be specified, it is given in the corresponding headers map.
  8. +
  9. in MUST NOT be specified, it is implicitly in header.
  10. +
  11. All traits that are affected by the location MUST be applicable to a location of header (for example, style).
-

Header Object Example

+
4.8.21.1 Header Object Example

A simple header of type integer:


 {
-  "description": "The number of allowed requests in the current period",
-  "schema": {
-    "type": "integer"
+  "description": "The number of allowed requests in the current period",
+  "schema": {
+    "type": "integer"
   }
 }
 
@@ -2721,10 +2952,10 @@ schema: type: integer
-

Tag Object

+

4.8.22 Tag Object

Adds metadata to a single tag that is used by the Operation Object. It is not mandatory to have a Tag Object per tag defined in the Operation Object instances.

-

Fixed Fields

+
4.8.22.1 Fixed Fields
@@ -2735,39 +2966,39 @@ - + - + - + - + - +
namename stringREQUIRED. The name of the tag.REQUIRED. The name of the tag.
descriptiondescription stringA description for the tag. CommonMark syntax MAY be used for rich text representation.A description for the tag. CommonMark syntax MAY be used for rich text representation.
externalDocsexternalDocs External Documentation Object Additional external documentation for this tag.
-

This object MAY be extended with Specification Extensions.

-

Tag Object Example

+

This object MAY be extended with Specification Extensions.

+
4.8.22.2 Tag Object Example

 {
-	"name": "pet",
-	"description": "Pets operations"
+	"name": "pet",
+	"description": "Pets operations"
 }
 

 name: pet
 description: Pets operations
 
-

Reference Object

+

4.8.23 Reference Object

A simple object to allow referencing other components in the OpenAPI document, internally and externally.

-

The $ref string value contains a URI [[!RFC3986]], which identifies the location of the value being referenced.

+

The $ref string value contains a URI [RFC3986], which identifies the location of the value being referenced.

See the rules for resolving Relative References.

-

Fixed Fields

+
4.8.23.1 Fixed Fields
@@ -2778,68 +3009,68 @@ - + - + - + - + - + - +
$ref$ref stringREQUIRED. The reference identifier. This MUST be in the form of a URI.REQUIRED. The reference identifier. This MUST be in the form of a URI.
summarysummary stringA short summary which by default SHOULD override that of the referenced component. If the referenced object-type does not allow a summary field, then this field has no effect.A short summary which by default SHOULD override that of the referenced component. If the referenced object-type does not allow a summary field, then this field has no effect.
descriptiondescription stringA description which by default SHOULD override that of the referenced component. CommonMark syntax MAY be used for rich text representation. If the referenced object-type does not allow a description field, then this field has no effect.A description which by default SHOULD override that of the referenced component. CommonMark syntax MAY be used for rich text representation. If the referenced object-type does not allow a description field, then this field has no effect.
-

This object cannot be extended with additional properties and any properties added SHALL be ignored.

+

This object cannot be extended with additional properties and any properties added SHALL be ignored.

Note that this restriction on additional properties is a difference between Reference Objects and Schema Objects that contain a $ref keyword.

-

Reference Object Example

+
4.8.23.2 Reference Object Example

 {
-	"$ref": "#/components/schemas/Pet"
+	"$ref": "#/components/schemas/Pet"
 }
 

-$ref: '#/components/schemas/Pet'
+$ref: '#/components/schemas/Pet'
 
-

Relative Schema Document Example

+
4.8.23.3 Relative Schema Document Example

 {
-  "$ref": "Pet.json"
+  "$ref": "Pet.json"
 }
 

 $ref: Pet.yaml
 
-

Relative Documents With Embedded Schema Example

+
4.8.23.4 Relative Documents With Embedded Schema Example

 {
-  "$ref": "definitions.json#/Pet"
+  "$ref": "definitions.json#/Pet"
 }
 

 $ref: definitions.yaml#/Pet
 
-

Schema Object

+

4.8.24 Schema Object

The Schema Object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. This object is a superset of the JSON Schema Specification Draft 2020-12.

For more information about the properties, see JSON Schema Core and JSON Schema Validation.

Unless stated otherwise, the property definitions follow those of JSON Schema and do not add any additional semantics. Where JSON Schema indicates that behavior is defined by the application (e.g. for annotations), OAS also defers the definition of semantics to the application consuming the OpenAPI document.

-

Properties

+
4.8.24.1 Properties

The OpenAPI Schema Object dialect is defined as requiring the OAS base vocabulary, in addition to the vocabularies as specified in the JSON Schema draft 2020-12 general purpose meta-schema.

-

The OpenAPI Schema Object dialect for this version of the specification is identified by the URI https://spec.openapis.org/oas/3.1/dialect/base (the “OAS dialect schema id”).

+

The OpenAPI Schema Object dialect for this version of the specification is identified by the URI https://spec.openapis.org/oas/3.1/dialect/base (the “OAS dialect schema id”).

The following properties are taken from the JSON Schema specification but their definitions have been extended by the OAS:

    -
  • description - CommonMark syntax MAY be used for rich text representation.
  • +
  • description - CommonMark syntax MAY be used for rich text representation.
  • format - See Data Type Formats for further details. While relying on JSON Schema’s defined formats, the OAS offers a few additional predefined formats.

In addition to the JSON Schema properties comprising the OAS dialect, the Schema Object supports keywords from any other vocabularies, or entirely arbitrary properties.

The OpenAPI Specification’s base vocabulary is comprised of the following keywords:

-

Fixed Fields

+
4.8.24.2 Fixed Fields
@@ -2850,79 +3081,79 @@ - + - + - + - + - +
discriminatordiscriminator Discriminator Object Adds support for polymorphism. The discriminator is an object name that is used to differentiate between other schemas which may satisfy the payload description. See Composition and Inheritance for more details.
xmlxml XML ObjectThis MAY be used only on properties schemas. It has no effect on root schemas. Adds additional metadata to describe the XML representation of this property.This MAY be used only on properties schemas. It has no effect on root schemas. Adds additional metadata to describe the XML representation of this property.
externalDocsexternalDocs External Documentation Object Additional external documentation for this schema.
exampleexample Any A free-form property to include an example of an instance for this schema. To represent examples that cannot be naturally represented in JSON or YAML, a string value can be used to contain the example with escaping where necessary.

Deprecated: The example property has been deprecated in favor of the JSON Schema examples keyword. Use of example is discouraged, and later versions of this specification may remove it.
-

This object MAY be extended with Specification Extensions, though as noted, additional properties MAY omit the x- prefix within this object.

-
Composition and Inheritance (Polymorphism)
+

This object MAY be extended with Specification Extensions, though as noted, additional properties MAY omit the x- prefix within this object.

+
4.8.24.2.1 Composition and Inheritance (Polymorphism)

The OpenAPI Specification allows combining and extending model definitions using the allOf property of JSON Schema, in effect offering model composition. allOf takes an array of object definitions that are validated independently but together compose a single object.

While composition offers model extensibility, it does not imply a hierarchy between the models. To support polymorphism, the OpenAPI Specification adds the discriminator field. When used, the discriminator will be the name of the property that decides which schema definition validates the structure of the model. -As such, the discriminator field MUST be a required field. +As such, the discriminator field MUST be a required field. There are two ways to define the value of a discriminator for an inheriting instance.

  • Use the schema name.
  • Override the schema name by overriding the property with a new value. If a new value exists, this takes precedence over the schema name. As such, inline schema definitions, which do not have a given id, cannot be used in polymorphism.
-
XML Modeling
+
4.8.24.2.2 XML Modeling

The xml property allows extra definitions when translating the JSON definition to XML. The XML Object contains additional information about the available options.

-
Specifying Schema Dialects
+
4.8.24.2.3 Specifying Schema Dialects

It is important for tooling to be able to determine which dialect or meta-schema any given resource wishes to be processed with: JSON Schema Core, JSON Schema Validation, OpenAPI Schema dialect, or some custom meta-schema.

-

The $schema keyword MAY be present in any root Schema Object, and if present MUST be used to determine which dialect should be used when processing the schema. This allows use of Schema Objects which comply with other drafts of JSON Schema than the default Draft 2020-12 support. Tooling MUST support the OAS dialect schema id, and MAY support additional values of $schema.

-

To allow use of a different default $schema value for all Schema Objects contained within an OAS document, a jsonSchemaDialect value may be set within the OpenAPI Object. If this default is not set, then the OAS dialect schema id MUST be used for these Schema Objects. The value of $schema within a Schema Object always overrides any default.

-

When a Schema Object is referenced from an external resource which is not an OAS document (e.g. a bare JSON Schema resource), then the value of the $schema keyword for schemas within that resource MUST follow JSON Schema rules.

-

Schema Object Examples

-
Primitive Sample
+

The $schema keyword MAY be present in any root Schema Object, and if present MUST be used to determine which dialect should be used when processing the schema. This allows use of Schema Objects which comply with other drafts of JSON Schema than the default Draft 2020-12 support. Tooling MUST support the OAS dialect schema id, and MAY support additional values of $schema.

+

To allow use of a different default $schema value for all Schema Objects contained within an OAS document, a jsonSchemaDialect value may be set within the OpenAPI Object. If this default is not set, then the OAS dialect schema id MUST be used for these Schema Objects. The value of $schema within a Schema Object always overrides any default.

+

When a Schema Object is referenced from an external resource which is not an OAS document (e.g. a bare JSON Schema resource), then the value of the $schema keyword for schemas within that resource MUST follow JSON Schema rules.

+
4.8.24.3 Schema Object Examples
+
4.8.24.3.1 Primitive Sample

 {
-  "type": "string",
-  "format": "email"
+  "type": "string",
+  "format": "email"
 }
 

 type: string
 format: email
 
-
Simple Model
+
4.8.24.3.2 Simple Model

 {
-  "type": "object",
-  "required": [
-    "name"
+  "type": "object",
+  "required": [
+    "name"
   ],
-  "properties": {
-    "name": {
-      "type": "string"
+  "properties": {
+    "name": {
+      "type": "string"
     },
-    "address": {
-      "$ref": "#/components/schemas/Address"
+    "address": {
+      "$ref": "#/components/schemas/Address"
     },
-    "age": {
-      "type": "integer",
-      "format": "int32",
-      "minimum": 0
+    "age": {
+      "type": "integer",
+      "format": "int32",
+      "minimum": 0
     }
   }
 }
@@ -2935,19 +3166,19 @@
   name:
     type: string
   address:
-    $ref: '#/components/schemas/Address'
+    $ref: '#/components/schemas/Address'
   age:
     type: integer
     format: int32
     minimum: 0
 
-
Model with Map/Dictionary Properties
+
4.8.24.3.3 Model with Map/Dictionary Properties

For a simple string to string mapping:


 {
-  "type": "object",
-  "additionalProperties": {
-    "type": "string"
+  "type": "object",
+  "additionalProperties": {
+    "type": "string"
   }
 }
 
@@ -2959,36 +3190,36 @@

For a string to model mapping:


 {
-  "type": "object",
-  "additionalProperties": {
-    "$ref": "#/components/schemas/ComplexModel"
+  "type": "object",
+  "additionalProperties": {
+    "$ref": "#/components/schemas/ComplexModel"
   }
 }
 

 type: object
 additionalProperties:
-  $ref: '#/components/schemas/ComplexModel'
+  $ref: '#/components/schemas/ComplexModel'
 
-
Model with Example
+
4.8.24.3.4 Model with Example

 {
-  "type": "object",
-  "properties": {
-    "id": {
-      "type": "integer",
-      "format": "int64"
+  "type": "object",
+  "properties": {
+    "id": {
+      "type": "integer",
+      "format": "int64"
     },
-    "name": {
-      "type": "string"
+    "name": {
+      "type": "string"
     }
   },
-  "required": [
-    "name"
+  "required": [
+    "name"
   ],
-  "example": {
-    "name": "Puma",
-    "id": 1
+  "example": {
+    "name": "Puma",
+    "id": 1
   }
 }
 
@@ -3006,41 +3237,41 @@ name: Puma id: 1
-
Models with Composition
+
4.8.24.3.5 Models with Composition

 {
-  "components": {
-    "schemas": {
-      "ErrorModel": {
-        "type": "object",
-        "required": [
-          "message",
-          "code"
+  "components": {
+    "schemas": {
+      "ErrorModel": {
+        "type": "object",
+        "required": [
+          "message",
+          "code"
         ],
-        "properties": {
-          "message": {
-            "type": "string"
+        "properties": {
+          "message": {
+            "type": "string"
           },
-          "code": {
-            "type": "integer",
-            "minimum": 100,
-            "maximum": 600
+          "code": {
+            "type": "integer",
+            "minimum": 100,
+            "maximum": 600
           }
         }
       },
-      "ExtendedErrorModel": {
-        "allOf": [
+      "ExtendedErrorModel": {
+        "allOf": [
           {
-            "$ref": "#/components/schemas/ErrorModel"
+            "$ref": "#/components/schemas/ErrorModel"
           },
           {
-            "type": "object",
-            "required": [
-              "rootCause"
+            "type": "object",
+            "required": [
+              "rootCause"
             ],
-            "properties": {
-              "rootCause": {
-                "type": "string"
+            "properties": {
+              "rootCause": {
+                "type": "string"
               }
             }
           }
@@ -3067,7 +3298,7 @@
           maximum: 600
     ExtendedErrorModel:
       allOf:
-      - $ref: '#/components/schemas/ErrorModel'
+      - $ref: '#/components/schemas/ErrorModel'
       - type: object
         required:
         - rootCause
@@ -3075,75 +3306,75 @@
           rootCause:
             type: string
 
-
Models with Polymorphism Support
+
4.8.24.3.6 Models with Polymorphism Support

 {
-  "components": {
-    "schemas": {
-      "Pet": {
-        "type": "object",
-        "discriminator": {
-          "propertyName": "petType"
+  "components": {
+    "schemas": {
+      "Pet": {
+        "type": "object",
+        "discriminator": {
+          "propertyName": "petType"
         },
-        "properties": {
-          "name": {
-            "type": "string"
+        "properties": {
+          "name": {
+            "type": "string"
           },
-          "petType": {
-            "type": "string"
+          "petType": {
+            "type": "string"
           }
         },
-        "required": [
-          "name",
-          "petType"
+        "required": [
+          "name",
+          "petType"
         ]
       },
-      "Cat": {
-        "description": "A representation of a cat. Note that `Cat` will be used as the discriminator value.",
-        "allOf": [
+      "Cat": {
+        "description": "A representation of a cat. Note that `Cat` will be used as the discriminator value.",
+        "allOf": [
           {
-            "$ref": "#/components/schemas/Pet"
+            "$ref": "#/components/schemas/Pet"
           },
           {
-            "type": "object",
-            "properties": {
-              "huntingSkill": {
-                "type": "string",
-                "description": "The measured skill for hunting",
-                "default": "lazy",
-                "enum": [
-                  "clueless",
-                  "lazy",
-                  "adventurous",
-                  "aggressive"
+            "type": "object",
+            "properties": {
+              "huntingSkill": {
+                "type": "string",
+                "description": "The measured skill for hunting",
+                "default": "lazy",
+                "enum": [
+                  "clueless",
+                  "lazy",
+                  "adventurous",
+                  "aggressive"
                 ]
               }
             },
-            "required": [
-              "huntingSkill"
+            "required": [
+              "huntingSkill"
             ]
           }
         ]
       },
-      "Dog": {
-        "description": "A representation of a dog. Note that `Dog` will be used as the discriminator value.",
-        "allOf": [
+      "Dog": {
+        "description": "A representation of a dog. Note that `Dog` will be used as the discriminator value.",
+        "allOf": [
           {
-            "$ref": "#/components/schemas/Pet"
+            "$ref": "#/components/schemas/Pet"
           },
           {
-            "type": "object",
-            "properties": {
-              "packSize": {
-                "type": "integer",
-                "format": "int32",
-                "description": "the size of the pack the dog is from",
-                "default": 0,
-                "minimum": 0
+            "type": "object",
+            "properties": {
+              "packSize": {
+                "type": "integer",
+                "format": "int32",
+                "description": "the size of the pack the dog is from",
+                "default": 0,
+                "minimum": 0
               }
             },
-            "required": [
-              "packSize"
+            "required": [
+              "packSize"
             ]
           }
         ]
@@ -3167,10 +3398,10 @@
       required:
       - name
       - petType
-    Cat:  ## "Cat" will be used as the discriminator value
+    Cat:  ## "Cat" will be used as the discriminator value
       description: A representation of a cat
       allOf:
-      - $ref: '#/components/schemas/Pet'
+      - $ref: '#/components/schemas/Pet'
       - type: object
         properties:
           huntingSkill:
@@ -3183,10 +3414,10 @@
             - aggressive
         required:
         - huntingSkill
-    Dog:  ## "Dog" will be used as the discriminator value
+    Dog:  ## "Dog" will be used as the discriminator value
       description: A representation of a dog
       allOf:
-      - $ref: '#/components/schemas/Pet'
+      - $ref: '#/components/schemas/Pet'
       - type: object
         properties:
           packSize:
@@ -3198,10 +3429,10 @@
         required:
         - packSize
 
-

Discriminator Object

+

4.8.25 Discriminator Object

When request bodies or response payloads may be one of a number of different schemas, a discriminator object can be used to aid in serialization, deserialization, and validation. The discriminator is a specific object in a schema which is used to inform the consumer of the document of an alternative schema based on the value associated with it.

When using the discriminator, inline schemas will not be considered.

-

Fixed Fields

+
4.8.25.1 Fixed Fields
@@ -3212,62 +3443,62 @@ - + - + - +
propertyNamepropertyName stringREQUIRED. The name of the property in the payload that will hold the discriminator value.REQUIRED. The name of the property in the payload that will hold the discriminator value.
mapping mapping Map[string, string] An object to hold mappings between payload values and schema names or references.
-

This object MAY be extended with Specification Extensions.

+

This object MAY be extended with Specification Extensions.

The discriminator object is legal only when using one of the composite keywords oneOf, anyOf, allOf.

-

In OAS 3.0, a response payload MAY be described to be exactly one of any number of types:

+

In OAS 3.0, a response payload MAY be described to be exactly one of any number of types:


 MyResponseType:
   oneOf:
-  - $ref: '#/components/schemas/Cat'
-  - $ref: '#/components/schemas/Dog'
-  - $ref: '#/components/schemas/Lizard'
+  - $ref: '#/components/schemas/Cat'
+  - $ref: '#/components/schemas/Dog'
+  - $ref: '#/components/schemas/Lizard'
 
-

which means the payload MUST, by validation, match exactly one of the schemas described by Cat, Dog, or Lizard. In this case, a discriminator MAY act as a “hint” to shortcut validation and selection of the matching schema which may be a costly operation, depending on the complexity of the schema. We can then describe exactly which field tells us which schema to use:

+

which means the payload MUST, by validation, match exactly one of the schemas described by Cat, Dog, or Lizard. In this case, a discriminator MAY act as a “hint” to shortcut validation and selection of the matching schema which may be a costly operation, depending on the complexity of the schema. We can then describe exactly which field tells us which schema to use:


 MyResponseType:
   oneOf:
-  - $ref: '#/components/schemas/Cat'
-  - $ref: '#/components/schemas/Dog'
-  - $ref: '#/components/schemas/Lizard'
+  - $ref: '#/components/schemas/Cat'
+  - $ref: '#/components/schemas/Dog'
+  - $ref: '#/components/schemas/Lizard'
   discriminator:
     propertyName: petType
 
-

The expectation now is that a property with name petType MUST be present in the response payload, and the value will correspond to the name of a schema defined in the OAS document. Thus the response payload:

+

The expectation now is that a property with name petType MUST be present in the response payload, and the value will correspond to the name of a schema defined in the OAS document. Thus the response payload:


 {
-  "id": 12345,
-  "petType": "Cat"
+  "id": 12345,
+  "petType": "Cat"
 }
 

Will indicate that the Cat schema be used in conjunction with this payload.

-

In scenarios where the value of the discriminator field does not match the schema name or implicit mapping is not possible, an optional mapping definition MAY be used:

+

In scenarios where the value of the discriminator field does not match the schema name or implicit mapping is not possible, an optional mapping definition MAY be used:


 MyResponseType:
   oneOf:
-  - $ref: '#/components/schemas/Cat'
-  - $ref: '#/components/schemas/Dog'
-  - $ref: '#/components/schemas/Lizard'
-  - $ref: 'https://gigantic-server.com/schemas/Monster/schema.json'
+  - $ref: '#/components/schemas/Cat'
+  - $ref: '#/components/schemas/Dog'
+  - $ref: '#/components/schemas/Lizard'
+  - $ref: 'https://gigantic-server.com/schemas/Monster/schema.json'
   discriminator:
     propertyName: petType
     mapping:
-      dog: '#/components/schemas/Dog'
-      monster: 'https://gigantic-server.com/schemas/Monster/schema.json'
+      dog: '#/components/schemas/Dog'
+      monster: 'https://gigantic-server.com/schemas/Monster/schema.json'
 
-

Here the discriminator value of dog will map to the schema #/components/schemas/Dog, rather than the default (implicit) value of Dog. If the discriminator value does not match an implicit or explicit mapping, no schema can be determined and validation SHOULD fail. Mapping keys MUST be string values, but tooling MAY convert response values to strings for comparison.

+

Here the discriminator value of dog will map to the schema #/components/schemas/Dog, rather than the default (implicit) value of Dog. If the discriminator value does not match an implicit or explicit mapping, no schema can be determined and validation SHOULD fail. Mapping keys MUST be string values, but tooling MAY convert response values to strings for comparison.

When used in conjunction with the anyOf construct, the use of the discriminator can avoid ambiguity where multiple schemas may satisfy a single payload.

-

In both the oneOf and anyOf use cases, all possible schemas MUST be listed explicitly. To avoid redundancy, the discriminator MAY be added to a parent schema definition, and all schemas comprising the parent schema in an allOf construct may be used as an alternate schema.

+

In both the oneOf and anyOf use cases, all possible schemas MUST be listed explicitly. To avoid redundancy, the discriminator MAY be added to a parent schema definition, and all schemas comprising the parent schema in an allOf construct may be used as an alternate schema.

For example:


 components:
@@ -3285,7 +3516,7 @@
           dog: Dog
     Cat:
       allOf:
-      - $ref: '#/components/schemas/Pet'
+      - $ref: '#/components/schemas/Pet'
       - type: object
         # all other properties specific to a `Cat`
         properties:
@@ -3293,7 +3524,7 @@
             type: string
     Dog:
       allOf:
-      - $ref: '#/components/schemas/Pet'
+      - $ref: '#/components/schemas/Pet'
       - type: object
         # all other properties specific to a `Dog`
         properties:
@@ -3301,7 +3532,7 @@
             type: string
     Lizard:
       allOf:
-      - $ref: '#/components/schemas/Pet'
+      - $ref: '#/components/schemas/Pet'
       - type: object
         # all other properties specific to a `Lizard`
         properties:
@@ -3311,23 +3542,23 @@
 

a payload like this:


 {
-  "petType": "Cat",
-  "name": "misty"
+  "petType": "Cat",
+  "name": "misty"
 }
 

will indicate that the Cat schema be used. Likewise this schema:


 {
-  "petType": "dog",
-  "bark": "soft"
+  "petType": "dog",
+  "bark": "soft"
 }
 

will map to Dog because of the definition in the mapping element.

-

XML Object

+

4.8.26 XML Object

A metadata object that allows for more fine-tuned XML model definitions.

-

When using arrays, XML element names are not inferred (for singular/plural forms) and the name property SHOULD be used to add that information. +

When using arrays, XML element names are not inferred (for singular/plural forms) and the name property SHOULD be used to add that information. See examples for expected behavior.

-

Fixed Fields

+
4.8.26.1 Fixed Fields
@@ -3338,41 +3569,41 @@ - + - + - + - + - + - + - +
namename string Replaces the name of the element/attribute used for the described schema property. When defined within items, it will affect the name of the individual XML elements within the list. When defined alongside type being array (outside the items), it will affect the wrapping element and only if wrapped is true. If wrapped is false, it will be ignored.
namespacenamespace stringThe URI of the namespace definition. This MUST be in the form of an absolute URI.The URI of the namespace definition. This MUST be in the form of an absolute URI.
prefixprefix string The prefix to be used for the name.
attributeattribute boolean Declares whether the property definition translates to an attribute instead of an element. Default value is false.
wrappedwrapped booleanMAY be used only for an array definition. Signifies whether the array is wrapped (for example, <books><book/><book/></books>) or unwrapped (<book/><book/>). Default value is false. The definition takes effect only when defined alongside type being array (outside the items).MAY be used only for an array definition. Signifies whether the array is wrapped (for example, <books><book/><book/></books>) or unwrapped (<book/><book/>). Default value is false. The definition takes effect only when defined alongside type being array (outside the items).
-

This object MAY be extended with Specification Extensions.

-

XML Object Examples

+

This object MAY be extended with Specification Extensions.

+
4.8.26.2 XML Object Examples

The examples of the XML object definitions are included inside a property definition of a Schema Object with a sample of the XML representation of it.

-
No XML Element
+
4.8.26.2.1 No XML Element

Basic string property:


 {
-    "animals": {
-        "type": "string"
+    "animals": {
+        "type": "string"
     }
 }
 
@@ -3386,10 +3617,10 @@

Basic string array property (wrapped is false by default):


 {
-    "animals": {
-        "type": "array",
-        "items": {
-            "type": "string"
+    "animals": {
+        "type": "array",
+        "items": {
+            "type": "string"
         }
     }
 }
@@ -3405,13 +3636,13 @@
 <animals>...</animals>
 <animals>...</animals>
 
-
XML Name Replacement
+
4.8.26.2.2 XML Name Replacement

 {
-  "animals": {
-    "type": "string",
-    "xml": {
-      "name": "animal"
+  "animals": {
+    "type": "string",
+    "xml": {
+      "name": "animal"
     }
   }
 }
@@ -3425,25 +3656,25 @@
 

 <animal>...</animal>
 
-
XML Attribute, Prefix and Namespace
+
4.8.26.2.3 XML Attribute, Prefix and Namespace

In this example, a full model definition is shown.


 {
-  "Person": {
-    "type": "object",
-    "properties": {
-      "id": {
-        "type": "integer",
-        "format": "int32",
-        "xml": {
-          "attribute": true
+  "Person": {
+    "type": "object",
+    "properties": {
+      "id": {
+        "type": "integer",
+        "format": "int32",
+        "xml": {
+          "attribute": true
         }
       },
-      "name": {
-        "type": "string",
-        "xml": {
-          "namespace": "https://example.com/schema/sample",
-          "prefix": "sample"
+      "name": {
+        "type": "string",
+        "xml": {
+          "namespace": "https://example.com/schema/sample",
+          "prefix": "sample"
         }
       }
     }
@@ -3466,20 +3697,20 @@
         prefix: sample
 

-<Person id="123">
-    <sample:name xmlns:sample="https://example.com/schema/sample">example</sample:name>
+<Person id="123">
+    <sample:name xmlns:sample="https://example.com/schema/sample">example</sample:name>
 </Person>
 
-
XML Arrays
+
4.8.26.2.4 XML Arrays

Changing the element names:


 {
-  "animals": {
-    "type": "array",
-    "items": {
-      "type": "string",
-      "xml": {
-        "name": "animal"
+  "animals": {
+    "type": "array",
+    "items": {
+      "type": "string",
+      "xml": {
+        "name": "animal"
       }
     }
   }
@@ -3500,16 +3731,16 @@
 

The external name property has no effect on the XML:


 {
-  "animals": {
-    "type": "array",
-    "items": {
-      "type": "string",
-      "xml": {
-        "name": "animal"
+  "animals": {
+    "type": "array",
+    "items": {
+      "type": "string",
+      "xml": {
+        "name": "animal"
       }
     },
-    "xml": {
-      "name": "aliens"
+    "xml": {
+      "name": "aliens"
     }
   }
 }
@@ -3531,13 +3762,13 @@
 

Even when the array is wrapped, if a name is not explicitly defined, the same name will be used both internally and externally:


 {
-  "animals": {
-    "type": "array",
-    "items": {
-      "type": "string"
+  "animals": {
+    "type": "array",
+    "items": {
+      "type": "string"
     },
-    "xml": {
-      "wrapped": true
+    "xml": {
+      "wrapped": true
     }
   }
 }
@@ -3559,16 +3790,16 @@
 

To overcome the naming problem in the example above, the following definition can be used:


 {
-  "animals": {
-    "type": "array",
-    "items": {
-      "type": "string",
-      "xml": {
-        "name": "animal"
+  "animals": {
+    "type": "array",
+    "items": {
+      "type": "string",
+      "xml": {
+        "name": "animal"
       }
     },
-    "xml": {
-      "wrapped": true
+    "xml": {
+      "wrapped": true
     }
   }
 }
@@ -3592,17 +3823,17 @@
 

Affecting both internal and external names:


 {
-  "animals": {
-    "type": "array",
-    "items": {
-      "type": "string",
-      "xml": {
-        "name": "animal"
+  "animals": {
+    "type": "array",
+    "items": {
+      "type": "string",
+      "xml": {
+        "name": "animal"
       }
     },
-    "xml": {
-      "name": "aliens",
-      "wrapped": true
+    "xml": {
+      "name": "aliens",
+      "wrapped": true
     }
   }
 }
@@ -3627,14 +3858,14 @@
 

If we change the external element but not the internal ones:


 {
-  "animals": {
-    "type": "array",
-    "items": {
-      "type": "string"
+  "animals": {
+    "type": "array",
+    "items": {
+      "type": "string"
     },
-    "xml": {
-      "name": "aliens",
-      "wrapped": true
+    "xml": {
+      "name": "aliens",
+      "wrapped": true
     }
   }
 }
@@ -3654,11 +3885,11 @@
   <aliens>value</aliens>
 </aliens>
 
-

Security Scheme Object

+

4.8.27 Security Scheme Object

Defines a security scheme that can be used by the operations.

-

Supported schemes are HTTP authentication, an API key (either as a header, a cookie parameter or as a query parameter), mutual TLS (use of a client certificate), OAuth2’s common flows (implicit, password, client credentials and authorization code) as defined in [[!RFC6749]], and OpenID Connect Discovery. +

Supported schemes are HTTP authentication, an API key (either as a header, a cookie parameter or as a query parameter), mutual TLS (use of a client certificate), OAuth2’s common flows (implicit, password, client credentials and authorization code) as defined in [RFC6749], and OpenID Connect Discovery. Please note that as of 2020, the implicit flow is about to be deprecated by OAuth 2.0 Security Best Current Practice. Recommended for most use case is Authorization Code Grant flow with PKCE.

-

Fixed Fields

+
4.8.27.1 Fixed Fields
@@ -3670,74 +3901,74 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
typetype string AnyREQUIRED. The type of the security scheme. Valid values are "apiKey", "http", "mutualTLS", "oauth2", "openIdConnect".REQUIRED. The type of the security scheme. Valid values are "apiKey", "http", "mutualTLS", "oauth2", "openIdConnect".
descriptiondescription string AnyA description for security scheme. CommonMark syntax MAY be used for rich text representation.A description for security scheme. CommonMark syntax MAY be used for rich text representation.
namename string apiKeyREQUIRED. The name of the header, query or cookie parameter to be used.REQUIRED. The name of the header, query or cookie parameter to be used.
inin string apiKeyREQUIRED. The location of the API key. Valid values are "query", "header" or "cookie".REQUIRED. The location of the API key. Valid values are "query", "header" or "cookie".
schemescheme string httpREQUIRED. The name of the HTTP Authorization scheme to be used in the Authorization header as defined in [[!RFC7235]]. The values used SHOULD be registered in the IANA Authentication Scheme registry.REQUIRED. The name of the HTTP Authorization scheme to be used in the Authorization header as defined in [RFC7235]. The values used SHOULD be registered in the IANA Authentication Scheme registry.
bearerFormatbearerFormat stringhttp ("bearer")http ("bearer") A hint to the client to identify how the bearer token is formatted. Bearer tokens are usually generated by an authorization server, so this information is primarily for documentation purposes.
flowsflows OAuth Flows Object oauth2REQUIRED. An object containing configuration information for the flow types supported.REQUIRED. An object containing configuration information for the flow types supported.
openIdConnectUrlopenIdConnectUrl string openIdConnectREQUIRED. OpenId Connect URL to discover OAuth2 configuration values. This MUST be in the form of a URL. The OpenID Connect standard requires the use of TLS.REQUIRED. OpenId Connect URL to discover OAuth2 configuration values. This MUST be in the form of a URL. The OpenID Connect standard requires the use of TLS.
-

This object MAY be extended with Specification Extensions.

-

Security Scheme Object Example

-
Basic Authentication Sample
+

This object MAY be extended with Specification Extensions.

+
4.8.27.2 Security Scheme Object Example
+
4.8.27.2.1 Basic Authentication Sample

 {
-  "type": "http",
-  "scheme": "basic"
+  "type": "http",
+  "scheme": "basic"
 }
 

 type: http
 scheme: basic
 
-
API Key Sample
+
4.8.27.2.2 API Key Sample

 {
-  "type": "apiKey",
-  "name": "api_key",
-  "in": "header"
+  "type": "apiKey",
+  "name": "api_key",
+  "in": "header"
 }
 

@@ -3745,12 +3976,12 @@
 name: api_key
 in: header
 
-
JWT Bearer Sample
+
4.8.27.2.3 JWT Bearer Sample

 {
-  "type": "http",
-  "scheme": "bearer",
-  "bearerFormat": "JWT",
+  "type": "http",
+  "scheme": "bearer",
+  "bearerFormat": "JWT",
 }
 

@@ -3758,16 +3989,16 @@
 scheme: bearer
 bearerFormat: JWT
 
-
Implicit OAuth2 Sample
+
4.8.27.2.4 Implicit OAuth2 Sample

 {
-  "type": "oauth2",
-  "flows": {
-    "implicit": {
-      "authorizationUrl": "https://example.com/api/oauth/dialog",
-      "scopes": {
-        "write:pets": "modify pets in your account",
-        "read:pets": "read your pets"
+  "type": "oauth2",
+  "flows": {
+    "implicit": {
+      "authorizationUrl": "https://example.com/api/oauth/dialog",
+      "scopes": {
+        "write:pets": "modify pets in your account",
+        "read:pets": "read your pets"
       }
     }
   }
@@ -3782,9 +4013,9 @@
       write:pets: modify pets in your account
       read:pets: read your pets
 
-

OAuth Flows Object

+

4.8.28 OAuth Flows Object

Allows configuration of the supported OAuth Flows.

-

Fixed Fields

+
4.8.28.1 Fixed Fields
@@ -3795,31 +4026,31 @@ - + - + - + - +
implicitimplicit OAuth Flow Object Configuration for the OAuth Implicit flow
passwordpassword OAuth Flow Object Configuration for the OAuth Resource Owner Password flow
clientCredentialsclientCredentials OAuth Flow Object Configuration for the OAuth Client Credentials flow. Previously called application in OpenAPI 2.0.
authorizationCodeauthorizationCode OAuth Flow Object Configuration for the OAuth Authorization Code flow. Previously called accessCode in OpenAPI 2.0.
-

This object MAY be extended with Specification Extensions.

-

OAuth Flow Object

+

This object MAY be extended with Specification Extensions.

+

4.8.29 OAuth Flow Object

Configuration details for a supported OAuth Flow

-

Fixed Fields

+
4.8.29.1 Fixed Fields
@@ -3831,50 +4062,50 @@ - + - - + + - + - - + + - + - + - + - +
authorizationUrlauthorizationUrl stringoauth2 ("implicit", "authorizationCode")REQUIRED. The authorization URL to be used for this flow. This MUST be in the form of a URL. The OAuth2 standard requires the use of TLS.oauth2 ("implicit", "authorizationCode")REQUIRED. The authorization URL to be used for this flow. This MUST be in the form of a URL. The OAuth2 standard requires the use of TLS.
tokenUrltokenUrl stringoauth2 ("password", "clientCredentials", "authorizationCode")REQUIRED. The token URL to be used for this flow. This MUST be in the form of a URL. The OAuth2 standard requires the use of TLS.oauth2 ("password", "clientCredentials", "authorizationCode")REQUIRED. The token URL to be used for this flow. This MUST be in the form of a URL. The OAuth2 standard requires the use of TLS.
refreshUrlrefreshUrl string oauth2The URL to be used for obtaining refresh tokens. This MUST be in the form of a URL. The OAuth2 standard requires the use of TLS.The URL to be used for obtaining refresh tokens. This MUST be in the form of a URL. The OAuth2 standard requires the use of TLS.
scopesscopes Map[string, string] oauth2REQUIRED. The available scopes for the OAuth2 security scheme. A map between the scope name and a short description for it. The map MAY be empty.REQUIRED. The available scopes for the OAuth2 security scheme. A map between the scope name and a short description for it. The map MAY be empty.
-

This object MAY be extended with Specification Extensions.

-

OAuth Flow Object Examples

+

This object MAY be extended with Specification Extensions.

+
4.8.29.2 OAuth Flow Object Examples

 {
-  "type": "oauth2",
-  "flows": {
-    "implicit": {
-      "authorizationUrl": "https://example.com/api/oauth/dialog",
-      "scopes": {
-        "write:pets": "modify pets in your account",
-        "read:pets": "read your pets"
+  "type": "oauth2",
+  "flows": {
+    "implicit": {
+      "authorizationUrl": "https://example.com/api/oauth/dialog",
+      "scopes": {
+        "write:pets": "modify pets in your account",
+        "read:pets": "read your pets"
       }
     },
-    "authorizationCode": {
-      "authorizationUrl": "https://example.com/api/oauth/dialog",
-      "tokenUrl": "https://example.com/api/oauth/token",
-      "scopes": {
-        "write:pets": "modify pets in your account",
-        "read:pets": "read your pets"
+    "authorizationCode": {
+      "authorizationUrl": "https://example.com/api/oauth/dialog",
+      "tokenUrl": "https://example.com/api/oauth/token",
+      "scopes": {
+        "write:pets": "modify pets in your account",
+        "read:pets": "read your pets"
       }
     }
   }
@@ -3895,13 +4126,13 @@
       write:pets: modify pets in your account
       read:pets: read your pets
 
-

Security Requirement Object

+

4.8.30 Security Requirement Object

Lists the required security schemes to execute this operation. -The name used for each property MUST correspond to a security scheme declared in the Security Schemes under the Components Object.

-

Security Requirement Objects that contain multiple schemes require that all schemes MUST be satisfied for a request to be authorized. +The name used for each property MUST correspond to a security scheme declared in the Security Schemes under the Components Object.

+

Security Requirement Objects that contain multiple schemes require that all schemes MUST be satisfied for a request to be authorized. This enables support for scenarios where multiple query parameters or HTTP headers are required to convey security information.

When a list of Security Requirement Objects is defined on the OpenAPI Object or Operation Object, only one of the Security Requirement Objects in the list needs to be satisfied to authorize the request.

-

Patterned Fields

+
4.8.30.1 Patterned Fields
@@ -3912,28 +4143,28 @@ - + - +
{name}{name} [string]Each name MUST correspond to a security scheme which is declared in the Security Schemes under the Components Object. If the security scheme is of type "oauth2" or "openIdConnect", then the value is a list of scope names required for the execution, and the list MAY be empty if authorization does not require a specified scope. For other security scheme types, the array MAY contain a list of role names which are required for the execution, but are not otherwise defined or exchanged in-band.Each name MUST correspond to a security scheme which is declared in the Security Schemes under the Components Object. If the security scheme is of type "oauth2" or "openIdConnect", then the value is a list of scope names required for the execution, and the list MAY be empty if authorization does not require a specified scope. For other security scheme types, the array MAY contain a list of role names which are required for the execution, but are not otherwise defined or exchanged in-band.
-

Security Requirement Object Examples

-
Non-OAuth2 Security Requirement
+
4.8.30.2 Security Requirement Object Examples
+
4.8.30.2.1 Non-OAuth2 Security Requirement

 {
-  "api_key": []
+  "api_key": []
 }
 

 api_key: []
 
-
OAuth2 Security Requirement
+
4.8.30.2.2 OAuth2 Security Requirement

 {
-  "petstore_auth": [
-    "write:pets",
-    "read:pets"
+  "petstore_auth": [
+    "write:pets",
+    "read:pets"
   ]
 }
 
@@ -3942,16 +4173,16 @@ - write:pets - read:pets
-
Optional OAuth2 Security
+
4.8.30.2.3 Optional OAuth2 Security

Optional OAuth2 security as would be defined in an OpenAPI Object or an Operation Object:


 {
-  "security": [
+  "security": [
     {},
     {
-      "petstore_auth": [
-        "write:pets",
-        "read:pets"
+      "petstore_auth": [
+        "write:pets",
+        "read:pets"
       ]
     }
   ]
@@ -3964,9 +4195,9 @@
     - write:pets
     - read:pets
 
-

Specification Extensions

+

4.9 Specification Extensions

While the OpenAPI Specification tries to accommodate most use cases, additional data can be added to extend the specification at certain points.

-

The extensions properties are implemented as patterned fields that are always prefixed by "x-".

+

The extensions properties are implemented as patterned fields that are always prefixed by "x-".

@@ -3977,23 +4208,23 @@ - + - +
^x-^x- AnyAllows extensions to the OpenAPI Schema. The field name MUST begin with x-, for example, x-internal-id. Field names beginning x-oai- and x-oas- are reserved for uses defined by the OpenAPI Initiative. The value can be null, a primitive, an array or an object.Allows extensions to the OpenAPI Schema. The field name MUST begin with x-, for example, x-internal-id. Field names beginning x-oai- and x-oas- are reserved for uses defined by the OpenAPI Initiative. The value can be null, a primitive, an array or an object.

The extensions may or may not be supported by the available tooling, but those may be extended as well to add requested support (if tools are internal or open-sourced).

-

Security Filtering

-

Some objects in the OpenAPI Specification MAY be declared and remain empty, or be completely removed, even though they are inherently the core of the API documentation.

+

4.10 Security Filtering

+

Some objects in the OpenAPI Specification MAY be declared and remain empty, or be completely removed, even though they are inherently the core of the API documentation.

The reasoning is to allow an additional layer of access control over the documentation. -While not part of the specification itself, certain libraries MAY choose to allow access to parts of the documentation based on some form of authentication/authorization.

+While not part of the specification itself, certain libraries MAY choose to allow access to parts of the documentation based on some form of authentication/authorization.

Two examples of this:

    -
  1. The Paths Object MAY be present but empty. It may be counterintuitive, but this may tell the viewer that they got to the right place, but can’t access any documentation. They would still have access to at least the Info Object which may contain additional information regarding authentication.
  2. -
  3. The Path Item Object MAY be empty. In this case, the viewer will be aware that the path exists, but will not be able to see any of its operations or parameters. This is different from hiding the path itself from the Paths Object, because the user will be aware of its existence. This allows the documentation provider to finely control what the viewer can see.
  4. +
  5. The Paths Object MAY be present but empty. It may be counterintuitive, but this may tell the viewer that they got to the right place, but can’t access any documentation. They would still have access to at least the Info Object which may contain additional information regarding authentication.
  6. +
  7. The Path Item Object MAY be empty. In this case, the viewer will be aware that the path exists, but will not be able to see any of its operations or parameters. This is different from hiding the path itself from the Paths Object, because the user will be aware of its existence. This allows the documentation provider to finely control what the viewer can see.
-

Appendix A: Revision History

+

A. Appendix A: Revision History

@@ -4081,3 +4312,311 @@
+

B. References

B.1 Normative references

+ +
[RFC1866]
+ Hypertext Markup Language - 2.0. T. Berners-Lee; D. Connolly. IETF. November 1995. Historic. URL: https://www.rfc-editor.org/rfc/rfc1866 +
[RFC2045]
+ Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies. N. Freed; N. Borenstein. IETF. November 1996. Draft Standard. URL: https://www.rfc-editor.org/rfc/rfc2045 +
[RFC2119]
+ Key words for use in RFCs to Indicate Requirement Levels. S. Bradner. IETF. March 1997. Best Current Practice. URL: https://www.rfc-editor.org/rfc/rfc2119 +
[RFC3986]
+ Uniform Resource Identifier (URI): Generic Syntax. T. Berners-Lee; R. Fielding; L. Masinter. IETF. January 2005. Internet Standard. URL: https://www.rfc-editor.org/rfc/rfc3986 +
[RFC4648]
+ The Base16, Base32, and Base64 Data Encodings. S. Josefsson. IETF. October 2006. Proposed Standard. URL: https://www.rfc-editor.org/rfc/rfc4648 +
[RFC6570]
+ URI Template. J. Gregorio; R. Fielding; M. Hadley; M. Nottingham; D. Orchard. IETF. March 2012. Proposed Standard. URL: https://www.rfc-editor.org/rfc/rfc6570 +
[RFC6749]
+ The OAuth 2.0 Authorization Framework. D. Hardt, Ed.. IETF. October 2012. Proposed Standard. URL: https://www.rfc-editor.org/rfc/rfc6749 +
[RFC6838]
+ Media Type Specifications and Registration Procedures. N. Freed; J. Klensin; T. Hansen. IETF. January 2013. Best Current Practice. URL: https://www.rfc-editor.org/rfc/rfc6838 +
[RFC6901]
+ JavaScript Object Notation (JSON) Pointer. P. Bryan, Ed.; K. Zyp; M. Nottingham, Ed.. IETF. April 2013. Proposed Standard. URL: https://www.rfc-editor.org/rfc/rfc6901 +
[RFC7159]
+ The JavaScript Object Notation (JSON) Data Interchange Format. T. Bray, Ed.. IETF. March 2014. Proposed Standard. URL: https://www.rfc-editor.org/rfc/rfc7159 +
[RFC7230]
+ Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing. R. Fielding, Ed.; J. Reschke, Ed.. IETF. June 2014. Proposed Standard. URL: https://httpwg.org/specs/rfc7230.html +
[RFC7231]
+ Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content. R. Fielding, Ed.; J. Reschke, Ed.. IETF. June 2014. Proposed Standard. URL: https://httpwg.org/specs/rfc7231.html +
[RFC7235]
+ Hypertext Transfer Protocol (HTTP/1.1): Authentication. R. Fielding, Ed.; J. Reschke, Ed.. IETF. June 2014. Proposed Standard. URL: https://httpwg.org/specs/rfc7235.html +
[RFC7578]
+ Returning Values from Forms: multipart/form-data. L. Masinter. IETF. July 2015. Proposed Standard. URL: https://www.rfc-editor.org/rfc/rfc7578 +
[RFC8174]
+ Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words. B. Leiba. IETF. May 2017. Best Current Practice. URL: https://www.rfc-editor.org/rfc/rfc8174 +
+
\ No newline at end of file diff --git a/oas/v2.0.html b/oas/v2.0.html index e8b9f6559c..02413fe9a6 100644 --- a/oas/v2.0.html +++ b/oas/v2.0.html @@ -1,21 +1,229 @@ -OpenAPI Specification v2.0 | Introduction, Definitions, & More - + + + + + +OpenAPI Specification v2.0 + + + + + + + + -

OpenAPI Specification v2.0

What is the OpenAPI Specification?

The OpenAPI Specification (OAS) defines a standard, programming language-agnostic interface description for HTTP APIs, which allows both humans and computers to discover and understand the capabilities of a service without requiring access to source code, additional documentation, or inspection of network traffic. When properly defined via OpenAPI, a consumer can understand and interact with the remote service with a minimal amount of implementation logic. Similar to what interface descriptions have done for lower-level programming, the OpenAPI Specification removes guesswork in calling a service.

Status of This Document

The source-of-truth for the specification is the GitHub markdown file referenced above.
-

OpenAPI Specification

-

(fka Swagger RESTful API Documentation Specification)

-

Version 2.0

-

The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in [!RFC2119].

+ + + + + +
+

+

OpenAPI Specification v2.0

Version 2.0

+

+
+ More details about this document +
+ +
Latest published version:
+ https://spec.openapis.org/oas/latest.html +
+
Latest editor's draft:
https://github.com/OAI/OpenAPI-Specification/
+ + + + + + +
Editors:
+ Jeremy Whitlock +
+ Marsh Gardiner +
+ Ron Ratovsky +
+ Tony Tam +
+ + + + +
Participate
+ GitHub OAI/OpenAPI-Specification +
+ File a bug +
+ Commit history +
+ Pull requests +
+
+
+ + + +
+

What is the OpenAPI Specification?

The OpenAPI Specification (OAS) defines a standard, programming language-agnostic interface description for HTTP APIs, which allows both humans and computers to discover and understand the capabilities of a service without requiring access to source code, additional documentation, or inspection of network traffic. When properly defined via OpenAPI, a consumer can understand and interact with the remote service with a minimal amount of implementation logic. Similar to what interface descriptions have done for lower-level programming, the OpenAPI Specification removes guesswork in calling a service.

Status of This Document

The source-of-truth for the specification is the GitHub markdown file referenced above.
+

1. OpenAPI Specification

+

2. (fka Swagger RESTful API Documentation Specification)

+

2.1 Version 2.0

+

The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in [RFC2119].

The Swagger specification is licensed under The Apache License, Version 2.0.

-

Introductions

+

3. Introductions

Swagger™ is a project used to describe and document RESTful APIs.

The Swagger specification defines a set of files required to describe such an API. These files can then be used by the Swagger-UI project to display the API and Swagger-Codegen to generate clients in various languages. Additional utilities can also take advantage of the resulting files, such as testing tools.

-

Revision History

+

4. Revision History

@@ -47,13 +255,13 @@
-

Definitions

-

Path Templating

+

5. Definitions

+

5.1 Path Templating

Path templating refers to the usage of curly braces ({}) to mark a section of a URL path as replaceable using path parameters.

-

Mime Types

-

Mime type definitions are spread across several resources. The mime type definitions should be in compliance with [[!RFC6838]].

+

5.2 Mime Types

+

Mime type definitions are spread across several resources. The mime type definitions should be in compliance with [RFC6838].

Some examples of possible mime type definitions:

-

+

   text/plain; charset=utf-8
   application/json
   application/vnd.github+json
@@ -65,28 +273,28 @@
   application/vnd.github.v3.diff
   application/vnd.github.v3.patch
 
-

HTTP Status Codes

-

The HTTP Status Codes are used to indicate the status of the executed operation. The available status codes are described by [[!RFC7231]] and in the IANA Status Code Registry.

-

Specification

-

Format

+

5.3 HTTP Status Codes

+

The HTTP Status Codes are used to indicate the status of the executed operation. The available status codes are described by [RFC7231] and in the IANA Status Code Registry.

+

6. Specification

+

6.1 Format

The files describing the RESTful API in accordance with the Swagger specification are represented as JSON objects and conform to the JSON standards. YAML, being a superset of JSON, can be used as well to represent a Swagger specification file.

For example, if a field is said to have an array value, the JSON array representation will be used:


 {
-   "field" : [...]
+   "field" : [...]
 }
 

While the API is described using JSON it does not impose a JSON input/output to the API itself.

All field names in the specification are case sensitive.

The schema exposes two types of fields. Fixed fields, which have a declared name, and Patterned fields, which declare a regex pattern for the field name. Patterned fields can have multiple occurrences as long as each has a unique name.

-

File Structure

+

6.2 File Structure

The Swagger representation of the API is made of a single file. However, parts of the definitions can be split into separate files, at the discretion of the user. This is applicable for $ref fields in the specification as follows from the JSON Schema definitions.

By convention, the Swagger specification file is named swagger.json.

-

Data Types

+

6.3 Data Types

Primitive data types in the Swagger Specification are based on the types supported by the JSON-Schema Draft 4. Models are described using the Schema Object which is a subset of JSON Schema Draft 4.

-

An additional primitive data type "file" is used by the Parameter Object and the Response Object to set the parameter type or the response as being a file.

-

Primitives have an optional modifier property format. Swagger uses several known formats to more finely define the data type being used. However, the format property is an open string-valued property, and can have any value to support documentation needs. Formats such as "email", "uuid", etc., can be used even though they are not defined by this specification. Types that are not accompanied by a format property follow their definition from the JSON Schema (except for file type which is defined above). The formats defined by the Swagger Specification are:

+

An additional primitive data type "file" is used by the Parameter Object and the Response Object to set the parameter type or the response as being a file.

+

Primitives have an optional modifier property format. Swagger uses several known formats to more finely define the data type being used. However, the format property is an open string-valued property, and can have any value to support documentation needs. Formats such as "email", "uuid", etc., can be used even though they are not defined by this specification. Types that are not accompanied by a format property follow their definition from the JSON Schema (except for file type which is defined above). The formats defined by the Swagger Specification are:

@@ -149,13 +357,13 @@ - + - + @@ -165,10 +373,10 @@
date string dateAs defined by full-date - [!RFC3339]As defined by full-date - [RFC3339]
dateTime string date-timeAs defined by date-time - [!RFC3339]As defined by date-time - [RFC3339]
password
-

Schema

-

Swagger Object

+

6.4 Schema

+

6.4.1 Swagger Object

This is the root document object for the API specification. It combines what previously was the Resource Listing and API Declaration (version 1.2 and earlier) together into one document.

-

Fixed Fields

+
6.4.1.1 Fixed Fields
@@ -179,83 +387,83 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
swaggerswagger stringRequired. Specifies the Swagger Specification version being used. It can be used by the Swagger UI and other clients to interpret the API listing. The value MUST be "2.0".Required. Specifies the Swagger Specification version being used. It can be used by the Swagger UI and other clients to interpret the API listing. The value MUST be "2.0".
infoinfo Info Object Required. Provides metadata about the API. The metadata can be used by the clients if needed.
hosthost stringThe host (name or ip) serving the API. This MUST be the host only and does not include the scheme nor sub-paths. It MAY include a port. If the host is not included, the host serving the documentation is to be used (including the port). The host does not support path templating.The host (name or ip) serving the API. This MUST be the host only and does not include the scheme nor sub-paths. It MAY include a port. If the host is not included, the host serving the documentation is to be used (including the port). The host does not support path templating.
basePathbasePath stringThe base path on which the API is served, which is relative to the host. If it is not included, the API is served directly under the host. The value MUST start with a leading slash (/). The basePath does not support path templating.The base path on which the API is served, which is relative to the host. If it is not included, the API is served directly under the host. The value MUST start with a leading slash (/). The basePath does not support path templating.
schemesschemes [string]The transfer protocol of the API. Values MUST be from the list: "http", "https", "ws", "wss". If the schemes is not included, the default scheme to be used is the one used to access the Swagger definition itself.The transfer protocol of the API. Values MUST be from the list: "http", "https", "ws", "wss". If the schemes is not included, the default scheme to be used is the one used to access the Swagger definition itself.
consumesconsumes [string]A list of MIME types the APIs can consume. This is global to all APIs but can be overridden on specific API calls. Value MUST be as described under Mime Types.A list of MIME types the APIs can consume. This is global to all APIs but can be overridden on specific API calls. Value MUST be as described under Mime Types.
producesproduces [string]A list of MIME types the APIs can produce. This is global to all APIs but can be overridden on specific API calls. Value MUST be as described under Mime Types.A list of MIME types the APIs can produce. This is global to all APIs but can be overridden on specific API calls. Value MUST be as described under Mime Types.
pathspaths Paths Object Required. The available paths and operations for the API.
definitionsdefinitions Definitions Object An object to hold data types produced and consumed by operations.
parametersparameters Parameters Definitions Object An object to hold parameters that can be used across operations. This property does not define global parameters for all operations.
responsesresponses Responses Definitions Object An object to hold responses that can be used across operations. This property does not define global responses for all operations.
securityDefinitionssecurityDefinitions Security Definitions Object Security scheme definitions that can be used across the specification.
securitysecurity [Security Requirement Object] A declaration of which security schemes are applied for the API as a whole. The list of values describes alternative security schemes that can be used (that is, there is a logical OR between the security requirements). Individual operations can override this definition.
tagstags [Tag Object]A list of tags used by the specification with additional metadata. The order of the tags can be used to reflect on their order by the parsing tools. Not all tags that are used by the Operation Object must be declared. The tags that are not declared may be organized randomly or based on the tools’ logic. Each tag name in the list MUST be unique.A list of tags used by the specification with additional metadata. The order of the tags can be used to reflect on their order by the parsing tools. Not all tags that are used by the Operation Object must be declared. The tags that are not declared may be organized randomly or based on the tools’ logic. Each tag name in the list MUST be unique.
externalDocsexternalDocs External Documentation Object Additional external documentation.
-

Patterned Objects

+
6.4.1.2 Patterned Objects
@@ -266,15 +474,15 @@ - + - +
^x-^x- AnyAllows extensions to the Swagger Schema. The field name MUST begin with x-, for example, x-internal-id. The value can be null, a primitive, an array or an object. See Vendor Extensions for further details.Allows extensions to the Swagger Schema. The field name MUST begin with x-, for example, x-internal-id. The value can be null, a primitive, an array or an object. See Vendor Extensions for further details.
-

Info Object

+

6.4.2 Info Object

The object provides metadata about the API. The metadata can be used by the clients if needed, and can be presented in the Swagger-UI for convenience.

-

Fixed Fields

+
6.4.2.1 Fixed Fields
@@ -285,38 +493,38 @@ - + - + - + - + - + - +
titletitle string Required. The title of the application.
descriptiondescription string A short description of the application. GFM syntax can be used for rich text representation.
termsOfServicetermsOfService string The Terms of Service for the API.
contactcontact Contact Object The contact information for the exposed API.
licenselicense License Object The license information for the exposed API.
versionversion string Required Provides the version of the application API (not to be confused with the specification version).
-

Patterned Objects

+
6.4.2.2 Patterned Objects
@@ -327,28 +535,28 @@ - + - +
^x-^x- AnyAllows extensions to the Swagger Schema. The field name MUST begin with x-, for example, x-internal-id. The value can be null, a primitive, an array or an object. See Vendor Extensions for further details.Allows extensions to the Swagger Schema. The field name MUST begin with x-, for example, x-internal-id. The value can be null, a primitive, an array or an object. See Vendor Extensions for further details.
-

Info Object Example:

+
6.4.2.3 Info Object Example:

 {
-  "title": "Swagger Sample App",
-  "description": "This is a sample server Petstore server.",
-  "termsOfService": "http://swagger.io/terms/",
-  "contact": {
-    "name": "API Support",
-    "url": "http://www.swagger.io/support",
-    "email": "support@swagger.io"
+  "title": "Swagger Sample App",
+  "description": "This is a sample server Petstore server.",
+  "termsOfService": "http://swagger.io/terms/",
+  "contact": {
+    "name": "API Support",
+    "url": "http://www.swagger.io/support",
+    "email": "support@swagger.io"
   },
-  "license": {
-    "name": "Apache 2.0",
-    "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
+  "license": {
+    "name": "Apache 2.0",
+    "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
   },
-  "version": "1.0.1"
+  "version": "1.0.1"
 }
 

@@ -364,9 +572,9 @@
   url: http://www.apache.org/licenses/LICENSE-2.0.html
 version: 1.0.1
 
-

Contact Object

+

6.4.3 Contact Object

Contact information for the exposed API.

-

Fixed Fields

+
6.4.3.1 Fixed Fields
@@ -377,23 +585,23 @@ - + - + - + - + - +
namename string The identifying name of the contact person/organization.
urlurl stringThe URL pointing to the contact information. MUST be in the format of a URL.The URL pointing to the contact information. MUST be in the format of a URL.
emailemail stringThe email address of the contact person/organization. MUST be in the format of an email address.The email address of the contact person/organization. MUST be in the format of an email address.
-

Patterned Objects

+
6.4.3.2 Patterned Objects
@@ -404,18 +612,18 @@ - + - +
^x-^x- AnyAllows extensions to the Swagger Schema. The field name MUST begin with x-, for example, x-internal-id. The value can be null, a primitive, an array or an object. See Vendor Extensions for further details.Allows extensions to the Swagger Schema. The field name MUST begin with x-, for example, x-internal-id. The value can be null, a primitive, an array or an object. See Vendor Extensions for further details.
-

Contact Object Example:

+
6.4.3.3 Contact Object Example:

 {
-  "name": "API Support",
-  "url": "http://www.swagger.io/support",
-  "email": "support@swagger.io"
+  "name": "API Support",
+  "url": "http://www.swagger.io/support",
+  "email": "support@swagger.io"
 }
 

@@ -423,9 +631,9 @@
 url: http://www.swagger.io/support
 email: support@swagger.io
 
-

License Object

+

6.4.4 License Object

License information for the exposed API.

-

Fixed Fields

+
6.4.4.1 Fixed Fields
@@ -436,18 +644,18 @@ - + - + - +
namename string Required. The license name used for the API.
urlurl stringA URL to the license used for the API. MUST be in the format of a URL.A URL to the license used for the API. MUST be in the format of a URL.
-

Patterned Objects

+
6.4.4.2 Patterned Objects
@@ -458,27 +666,27 @@ - + - +
^x-^x- AnyAllows extensions to the Swagger Schema. The field name MUST begin with x-, for example, x-internal-id. The value can be null, a primitive, an array or an object. See Vendor Extensions for further details.Allows extensions to the Swagger Schema. The field name MUST begin with x-, for example, x-internal-id. The value can be null, a primitive, an array or an object. See Vendor Extensions for further details.
-

License Object Example:

+
6.4.4.3 License Object Example:

 {
-  "name": "Apache 2.0",
-  "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
+  "name": "Apache 2.0",
+  "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
 }
 

 name: Apache 2.0
 url: http://www.apache.org/licenses/LICENSE-2.0.html
 
-

Paths Object

+

6.4.5 Paths Object

Holds the relative paths to the individual endpoints. The path is appended to the basePath in order to construct the full URL. The Paths may be empty, due to ACL constraints.

-

Patterned Fields

+
6.4.5.1 Patterned Fields
@@ -489,33 +697,33 @@ - + - + - + - +
/{path}/{path} Path Item ObjectA relative path to an individual endpoint. The field name MUST begin with a slash. The path is appended to the basePath in order to construct the full URL. Path templating is allowed.A relative path to an individual endpoint. The field name MUST begin with a slash. The path is appended to the basePath in order to construct the full URL. Path templating is allowed.
^x-^x- AnyAllows extensions to the Swagger Schema. The field name MUST begin with x-, for example, x-internal-id. The value can be null, a primitive, an array or an object. See Vendor Extensions for further details.Allows extensions to the Swagger Schema. The field name MUST begin with x-, for example, x-internal-id. The value can be null, a primitive, an array or an object. See Vendor Extensions for further details.
-

Paths Object Example

+
6.4.5.2 Paths Object Example

 {
-  "/pets": {
-    "get": {
-      "description": "Returns all pets from the system that the user has access to",
-      "produces": [
-        "application/json"
+  "/pets": {
+    "get": {
+      "description": "Returns all pets from the system that the user has access to",
+      "produces": [
+        "application/json"
       ],
-      "responses": {
-        "200": {
-          "description": "A list of pets.",
-          "schema": {
-            "type": "array",
-            "items": {
-              "$ref": "#/definitions/pet"
+      "responses": {
+        "200": {
+          "description": "A list of pets.",
+          "schema": {
+            "type": "array",
+            "items": {
+              "$ref": "#/definitions/pet"
             }
           }
         }
@@ -531,17 +739,17 @@
     produces:
     - application/json
     responses:
-      '200':
+      '200':
         description: A list of pets.
         schema:
           type: array
           items:
-            $ref: '#/definitions/pet'
+            $ref: '#/definitions/pet'
 
-

Path Item Object

+

6.4.6 Path Item Object

Describes the operations available on a single path. A Path Item may be empty, due to ACL constraints. The path itself is still exposed to the documentation viewer but they will not know which operations and parameters are available.

-

Fixed Fields

+
6.4.6.1 Fixed Fields
@@ -552,53 +760,53 @@ - + - + - + - + - + - + - + - + - + - + - +
$ref$ref stringAllows for an external definition of this path item. The referenced structure MUST be in the format of a Path Item Object. If there are conflicts between the referenced definition and this Path Item’s definition, the behavior is undefined.Allows for an external definition of this path item. The referenced structure MUST be in the format of a Path Item Object. If there are conflicts between the referenced definition and this Path Item’s definition, the behavior is undefined.
getget Operation Object A definition of a GET operation on this path.
putput Operation Object A definition of a PUT operation on this path.
postpost Operation Object A definition of a POST operation on this path.
deletedelete Operation Object A definition of a DELETE operation on this path.
optionsoptions Operation Object A definition of a OPTIONS operation on this path.
headhead Operation Object A definition of a HEAD operation on this path.
patchpatch Operation Object A definition of a PATCH operation on this path.
parametersparameters [Parameter Object | Reference Object]A list of parameters that are applicable for all the operations described under this path. These parameters can be overridden at the operation level, but cannot be removed there. The list MUST NOT include duplicated parameters. A unique parameter is defined by a combination of a name and location. The list can use the Reference Object to link to parameters that are defined at the Swagger Object’s parameters. There can be one “body” parameter at most.A list of parameters that are applicable for all the operations described under this path. These parameters can be overridden at the operation level, but cannot be removed there. The list MUST NOT include duplicated parameters. A unique parameter is defined by a combination of a name and location. The list can use the Reference Object to link to parameters that are defined at the Swagger Object’s parameters. There can be one “body” parameter at most.
-

Patterned Fields

+
6.4.6.2 Patterned Fields
@@ -609,52 +817,52 @@ - + - +
^x-^x- AnyAllows extensions to the Swagger Schema. The field name MUST begin with x-, for example, x-internal-id. The value can be null, a primitive, an array or an object. See Vendor Extensions for further details.Allows extensions to the Swagger Schema. The field name MUST begin with x-, for example, x-internal-id. The value can be null, a primitive, an array or an object. See Vendor Extensions for further details.
-

Path Item Object Example

+
6.4.6.3 Path Item Object Example

 {
-  "get": {
-    "description": "Returns pets based on ID",
-    "summary": "Find pets by ID",
-    "operationId": "getPetsById",
-    "produces": [
-      "application/json",
-      "text/html"
+  "get": {
+    "description": "Returns pets based on ID",
+    "summary": "Find pets by ID",
+    "operationId": "getPetsById",
+    "produces": [
+      "application/json",
+      "text/html"
     ],
-    "responses": {
-      "200": {
-        "description": "pet response",
-        "schema": {
-          "type": "array",
-          "items": {
-            "$ref": "#/definitions/Pet"
+    "responses": {
+      "200": {
+        "description": "pet response",
+        "schema": {
+          "type": "array",
+          "items": {
+            "$ref": "#/definitions/Pet"
           }
         }
       },
-      "default": {
-        "description": "error payload",
-        "schema": {
-          "$ref": "#/definitions/ErrorModel"
+      "default": {
+        "description": "error payload",
+        "schema": {
+          "$ref": "#/definitions/ErrorModel"
         }
       }
     }
   },
-  "parameters": [
+  "parameters": [
     {
-      "name": "id",
-      "in": "path",
-      "description": "ID of pet to use",
-      "required": true,
-      "type": "array",
-      "items": {
-        "type": "string"
+      "name": "id",
+      "in": "path",
+      "description": "ID of pet to use",
+      "required": true,
+      "type": "array",
+      "items": {
+        "type": "string"
       },
-      "collectionFormat": "csv"
+      "collectionFormat": "csv"
     }
   ]
 }
@@ -668,16 +876,16 @@
   - application/json
   - text/html
   responses:
-    '200':
+    '200':
       description: pet response
       schema:
         type: array
         items:
-          $ref: '#/definitions/Pet'
+          $ref: '#/definitions/Pet'
     default:
       description: error payload
       schema:
-        $ref: '#/definitions/ErrorModel'
+        $ref: '#/definitions/ErrorModel'
 parameters:
 - name: id
   in: path
@@ -688,9 +896,9 @@
     type: string
   collectionFormat: csv
 
-

Operation Object

+

6.4.7 Operation Object

Describes a single API operation on a path.

-

Fixed Fields

+
6.4.7.1 Fixed Fields
@@ -701,68 +909,68 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
tagstags [string] A list of tags for API documentation control. Tags can be used for logical grouping of operations by resources or any other qualifier.
summarysummary stringA short summary of what the operation does. For maximum readability in the swagger-ui, this field SHOULD be less than 120 characters.A short summary of what the operation does. For maximum readability in the swagger-ui, this field SHOULD be less than 120 characters.
descriptiondescription string A verbose explanation of the operation behavior. GFM syntax can be used for rich text representation.
externalDocsexternalDocs External Documentation Object Additional external documentation for this operation.
operationIdoperationId stringUnique string used to identify the operation. The id MUST be unique among all operations described in the API. Tools and libraries MAY use the operationId to uniquely identify an operation, therefore, it is recommended to follow common programming naming conventions.Unique string used to identify the operation. The id MUST be unique among all operations described in the API. Tools and libraries MAY use the operationId to uniquely identify an operation, therefore, it is recommended to follow common programming naming conventions.
consumesconsumes [string]A list of MIME types the operation can consume. This overrides the consumes definition at the Swagger Object. An empty value MAY be used to clear the global definition. Value MUST be as described under Mime Types.A list of MIME types the operation can consume. This overrides the consumes definition at the Swagger Object. An empty value MAY be used to clear the global definition. Value MUST be as described under Mime Types.
producesproduces [string]A list of MIME types the operation can produce. This overrides the produces definition at the Swagger Object. An empty value MAY be used to clear the global definition. Value MUST be as described under Mime Types.A list of MIME types the operation can produce. This overrides the produces definition at the Swagger Object. An empty value MAY be used to clear the global definition. Value MUST be as described under Mime Types.
parametersparameters [Parameter Object | Reference Object]A list of parameters that are applicable for this operation. If a parameter is already defined at the Path Item, the new definition will override it, but can never remove it. The list MUST NOT include duplicated parameters. A unique parameter is defined by a combination of a name and location. The list can use the Reference Object to link to parameters that are defined at the Swagger Object’s parameters. There can be one “body” parameter at most.A list of parameters that are applicable for this operation. If a parameter is already defined at the Path Item, the new definition will override it, but can never remove it. The list MUST NOT include duplicated parameters. A unique parameter is defined by a combination of a name and location. The list can use the Reference Object to link to parameters that are defined at the Swagger Object’s parameters. There can be one “body” parameter at most.
responsesresponses Responses Object Required. The list of possible responses as they are returned from executing this operation.
schemesschemes [string]The transfer protocol for the operation. Values MUST be from the list: "http", "https", "ws", "wss". The value overrides the Swagger Object schemes definition.The transfer protocol for the operation. Values MUST be from the list: "http", "https", "ws", "wss". The value overrides the Swagger Object schemes definition.
deprecateddeprecated boolean Declares this operation to be deprecated. Usage of the declared operation should be refrained. Default value is false.
securitysecurity [Security Requirement Object] A declaration of which security schemes are applied for this operation. The list of values describes alternative security schemes that can be used (that is, there is a logical OR between the security requirements). This definition overrides any declared top-level security. To remove a top-level security declaration, an empty array can be used.
-

Patterned Objects

+
6.4.7.2 Patterned Objects
@@ -773,64 +981,64 @@ - + - +
^x-^x- AnyAllows extensions to the Swagger Schema. The field name MUST begin with x-, for example, x-internal-id. The value can be null, a primitive, an array or an object. See Vendor Extensions for further details.Allows extensions to the Swagger Schema. The field name MUST begin with x-, for example, x-internal-id. The value can be null, a primitive, an array or an object. See Vendor Extensions for further details.
-

Operation Object Example

+
6.4.7.3 Operation Object Example

 {
-  "tags": [
-    "pet"
+  "tags": [
+    "pet"
   ],
-  "summary": "Updates a pet in the store with form data",
-  "description": "",
-  "operationId": "updatePetWithForm",
-  "consumes": [
-    "application/x-www-form-urlencoded"
+  "summary": "Updates a pet in the store with form data",
+  "description": "",
+  "operationId": "updatePetWithForm",
+  "consumes": [
+    "application/x-www-form-urlencoded"
   ],
-  "produces": [
-    "application/json",
-    "application/xml"
+  "produces": [
+    "application/json",
+    "application/xml"
   ],
-  "parameters": [
+  "parameters": [
     {
-      "name": "petId",
-      "in": "path",
-      "description": "ID of pet that needs to be updated",
-      "required": true,
-      "type": "string"
+      "name": "petId",
+      "in": "path",
+      "description": "ID of pet that needs to be updated",
+      "required": true,
+      "type": "string"
     },
     {
-      "name": "name",
-      "in": "formData",
-      "description": "Updated name of the pet",
-      "required": false,
-      "type": "string"
+      "name": "name",
+      "in": "formData",
+      "description": "Updated name of the pet",
+      "required": false,
+      "type": "string"
     },
     {
-      "name": "status",
-      "in": "formData",
-      "description": "Updated status of the pet",
-      "required": false,
-      "type": "string"
+      "name": "status",
+      "in": "formData",
+      "description": "Updated status of the pet",
+      "required": false,
+      "type": "string"
     }
   ],
-  "responses": {
-    "200": {
-      "description": "Pet updated."
+  "responses": {
+    "200": {
+      "description": "Pet updated."
     },
-    "405": {
-      "description": "Invalid input"
+    "405": {
+      "description": "Invalid input"
     }
   },
-  "security": [
+  "security": [
     {
-      "petstore_auth": [
-        "write:pets",
-        "read:pets"
+      "petstore_auth": [
+        "write:pets",
+        "read:pets"
       ]
     }
   ]
@@ -840,7 +1048,7 @@
 tags:
 - pet
 summary: Updates a pet in the store with form data
-description: ""
+description: ""
 operationId: updatePetWithForm
 consumes:
 - application/x-www-form-urlencoded
@@ -864,18 +1072,18 @@
   required: false
   type: string
 responses:
-  '200':
+  '200':
     description: Pet updated.
-  '405':
+  '405':
     description: Invalid input
 security:
 - petstore_auth:
   - write:pets
   - read:pets
 
-

External Documentation Object

+

6.4.8 External Documentation Object

Allows referencing an external resource for extended documentation.

-

Fixed Fields

+
6.4.8.1 Fixed Fields
@@ -886,18 +1094,18 @@ - + - + - +
descriptiondescription string A short description of the target documentation. GFM syntax can be used for rich text representation.
urlurl stringRequired. The URL for the target documentation. Value MUST be in the format of a URL.Required. The URL for the target documentation. Value MUST be in the format of a URL.
-

Patterned Objects

+
6.4.8.2 Patterned Objects
@@ -908,24 +1116,24 @@ - + - +
^x-^x- AnyAllows extensions to the Swagger Schema. The field name MUST begin with x-, for example, x-internal-id. The value can be null, a primitive, an array or an object. See Vendor Extensions for further details.Allows extensions to the Swagger Schema. The field name MUST begin with x-, for example, x-internal-id. The value can be null, a primitive, an array or an object. See Vendor Extensions for further details.
-

External Documentation Object Example

+
6.4.8.3 External Documentation Object Example

 {
-  "description": "Find more info here",
-  "url": "https://swagger.io"
+  "description": "Find more info here",
+  "url": "https://swagger.io"
 }
 

 description: Find more info here
 url: https://swagger.io
 
-

Parameter Object

+

6.4.9 Parameter Object

Describes a single operation parameter.

A unique parameter is defined by a combination of a name and location.

There are five possible parameter types.

@@ -937,11 +1145,11 @@
  • Form - Used to describe the payload of an HTTP request when either application/x-www-form-urlencoded, multipart/form-data or both are used as the content type of the request (in Swagger’s definition, the consumes property of an operation). This is the only parameter type that can be used to send files, thus supporting the file type. Since form parameters are sent in the payload, they cannot be declared together with a body parameter for the same operation. Form parameters have a different format based on the content-type used (for further details, consult http://www.w3.org/TR/html401/interact/forms.html#h-17.13.4):
    • application/x-www-form-urlencoded - Similar to the format of Query parameters but as a payload. For example, foo=1&bar=swagger - both foo and bar are form parameters. This is normally used for simple parameters that are being transferred.
    • -
    • multipart/form-data - each parameter takes a section in the payload with an internal header. For example, for the header Content-Disposition: form-data; name="submit-name" the name of the parameter is submit-name. This type of form parameters is more commonly used for file transfers.
    • +
    • multipart/form-data - each parameter takes a section in the payload with an internal header. For example, for the header Content-Disposition: form-data; name="submit-name" the name of the parameter is submit-name. This type of form parameters is more commonly used for file transfers.
  • -

    Fixed Fields

    +
    6.4.9.1 Fixed Fields
    @@ -952,28 +1160,28 @@ - + - + - + - + - + - +
    namename stringRequired. The name of the parameter. Parameter names are case sensitive.
    • If in is "path", the name field MUST correspond to the associated path segment from the path field in the Paths Object. See Path Templating for further information.
    • For all other cases, the name corresponds to the parameter name used based on the in property.
    Required. The name of the parameter. Parameter names are case sensitive.
    • If in is "path", the name field MUST correspond to the associated path segment from the path field in the Paths Object. See Path Templating for further information.
    • For all other cases, the name corresponds to the parameter name used based on the in property.
    inin string Required. The location of the parameter. Possible values are “query”, “header”, “path”, “formData” or “body”.
    descriptiondescription string A brief description of the parameter. This could contain examples of use. GFM syntax can be used for rich text representation.
    requiredrequired booleanDetermines whether this parameter is mandatory. If the parameter is in “path”, this property is required and its value MUST be true. Otherwise, the property MAY be included and its default value is false.Determines whether this parameter is mandatory. If the parameter is in “path”, this property is required and its value MUST be true. Otherwise, the property MAY be included and its default value is false.
    -

    If in is "body":

    +

    If in is "body":

    @@ -984,13 +1192,13 @@ - +
    schemaschema Schema Object Required. The schema defining the type used for the body parameter.
    -

    If in is any value other than "body":

    +

    If in is any value other than "body":

    @@ -1001,98 +1209,98 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
    typetype stringRequired. The type of the parameter. Since the parameter is not located at the request body, it is limited to simple types (that is, not an object). The value MUST be one of "string", "number", "integer", "boolean", "array" or "file". If type is "file", the consumes MUST be either "multipart/form-data", " application/x-www-form-urlencoded" or both and the parameter MUST be in "formData".Required. The type of the parameter. Since the parameter is not located at the request body, it is limited to simple types (that is, not an object). The value MUST be one of "string", "number", "integer", "boolean", "array" or "file". If type is "file", the consumes MUST be either "multipart/form-data", " application/x-www-form-urlencoded" or both and the parameter MUST be in "formData".
    formatformat string The extending format for the previously mentioned type. See Data Type Formats for further details.
    allowEmptyValueallowEmptyValue boolean Sets the ability to pass empty-valued parameters. This is valid only for either query or formData parameters and allows you to send a parameter with a name only or an empty value. Default value is false.
    itemsitems Items Object Required if type is “array”. Describes the type of items in the array.
    collectionFormatcollectionFormat stringDetermines the format of the array if type array is used. Possible values are:
    • csv - comma separated values foo,bar.
    • ssv - space separated values foo bar.
    • tsv - tab separated values foo\tbar.
    • pipes - pipe separated values foo|bar.
    • multi - corresponds to multiple parameter instances instead of multiple values for a single instance foo=bar&foo=baz. This is valid only for parameters in “query” or “formData”.
    Default value is csv.
    Determines the format of the array if type array is used. Possible values are:
    • csv - comma separated values foo,bar.
    • ssv - space separated values foo bar.
    • tsv - tab separated values foo\tbar.
    • pipes - pipe separated values foo|bar.
    • multi - corresponds to multiple parameter instances instead of multiple values for a single instance foo=bar&foo=baz. This is valid only for parameters in “query” or “formData”.
    Default value is csv.
    defaultdefault *Declares the value of the parameter that the server will use if none is provided, for example a “count” to control the number of results per page might default to 100 if not supplied by the client in the request. (Note: “default” has no meaning for required parameters.) See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2. Unlike JSON Schema this value MUST conform to the defined type for this parameter.Declares the value of the parameter that the server will use if none is provided, for example a “count” to control the number of results per page might default to 100 if not supplied by the client in the request. (Note: “default” has no meaning for required parameters.) See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2. Unlike JSON Schema this value MUST conform to the defined type for this parameter.
    maximummaximum number See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.2.
    exclusiveMaximumexclusiveMaximum boolean See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.2.
    minimumminimum number See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.3.
    exclusiveMinimumexclusiveMinimum boolean See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.3.
    maxLengthmaxLength integer See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.1.
    minLengthminLength integer See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.2.
    patternpattern string See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.3.
    maxItemsmaxItems integer See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.3.2.
    minItemsminItems integer See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.3.3.
    uniqueItemsuniqueItems boolean See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.3.4.
    enumenum [*] See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1.
    multipleOfmultipleOf number See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.1.
    -

    Patterned Fields

    +
    6.4.9.2 Patterned Fields
    @@ -1103,23 +1311,23 @@ - + - +
    ^x-^x- AnyAllows extensions to the Swagger Schema. The field name MUST begin with x-, for example, x-internal-id. The value can be null, a primitive, an array or an object. See Vendor Extensions for further details.Allows extensions to the Swagger Schema. The field name MUST begin with x-, for example, x-internal-id. The value can be null, a primitive, an array or an object. See Vendor Extensions for further details.
    -

    Parameter Object Examples

    -
    Body Parameters
    +
    6.4.9.3 Parameter Object Examples
    +
    6.4.9.3.1 Body Parameters

    A body parameter with a referenced schema definition (normally for a model definition):

    
     {
    -  "name": "user",
    -  "in": "body",
    -  "description": "user to add to the system",
    -  "required": true,
    -  "schema": {
    -    "$ref": "#/definitions/User"
    +  "name": "user",
    +  "in": "body",
    +  "description": "user to add to the system",
    +  "required": true,
    +  "schema": {
    +    "$ref": "#/definitions/User"
       }
     }
     
    @@ -1129,19 +1337,19 @@ description: user to add to the system required: true schema: - $ref: '#/definitions/User' + $ref: '#/definitions/User'

    A body parameter that is an array of string values:

    
     {
    -  "name": "user",
    -  "in": "body",
    -  "description": "user to add to the system",
    -  "required": true,
    -  "schema": {
    -    "type": "array",
    -    "items": {
    -      "type": "string"
    +  "name": "user",
    +  "in": "body",
    +  "description": "user to add to the system",
    +  "required": true,
    +  "schema": {
    +    "type": "array",
    +    "items": {
    +      "type": "string"
         }
       }
     }
    @@ -1156,20 +1364,20 @@
       items:
         type: string
     
    -
    Other Parameters
    +
    6.4.9.3.2 Other Parameters

    A header parameter with an array of 64 bit integer numbers:

    
     {
    -  "name": "token",
    -  "in": "header",
    -  "description": "token to be passed as a header",
    -  "required": true,
    -  "type": "array",
    -  "items": {
    -    "type": "integer",
    -    "format": "int64"
    +  "name": "token",
    +  "in": "header",
    +  "description": "token to be passed as a header",
    +  "required": true,
    +  "type": "array",
    +  "items": {
    +    "type": "integer",
    +    "format": "int64"
       },
    -  "collectionFormat": "csv"
    +  "collectionFormat": "csv"
     }
     
    
    @@ -1186,11 +1394,11 @@
     

    A path parameter of a string value:

    
     {
    -  "name": "username",
    -  "in": "path",
    -  "description": "username to fetch",
    -  "required": true,
    -  "type": "string"
    +  "name": "username",
    +  "in": "path",
    +  "description": "username to fetch",
    +  "required": true,
    +  "type": "string"
     }
     
    
    @@ -1203,15 +1411,15 @@
     

    An optional query parameter of a string value, allowing multiple values by repeating the query parameter:

    
     {
    -  "name": "id",
    -  "in": "query",
    -  "description": "ID of the object to fetch",
    -  "required": false,
    -  "type": "array",
    -  "items": {
    -    "type": "string"
    +  "name": "id",
    +  "in": "query",
    +  "description": "ID of the object to fetch",
    +  "required": false,
    +  "type": "array",
    +  "items": {
    +    "type": "string"
       },
    -  "collectionFormat": "multi"
    +  "collectionFormat": "multi"
     }
     
    
    @@ -1227,11 +1435,11 @@
     

    A form data with file type for a file upload:

    
     {
    -  "name": "avatar",
    -  "in": "formData",
    -  "description": "The avatar of the user",
    -  "required": true,
    -  "type": "file"
    +  "name": "avatar",
    +  "in": "formData",
    +  "description": "The avatar of the user",
    +  "required": true,
    +  "type": "file"
     }
     
    
    @@ -1241,9 +1449,9 @@
     required: true
     type: file
     
    -

    Items Object

    -

    A limited subset of JSON-Schema’s items object. It is used by parameter definitions that are not located in "body".

    -

    Fixed Fields

    +

    6.4.10 Items Object

    +

    A limited subset of JSON-Schema’s items object. It is used by parameter definitions that are not located in "body".

    +
    6.4.10.1 Fixed Fields
    @@ -1254,93 +1462,93 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
    typetype stringRequired. The internal type of the array. The value MUST be one of "string", "number", "integer", "boolean", or "array". Files and models are not allowed.Required. The internal type of the array. The value MUST be one of "string", "number", "integer", "boolean", or "array". Files and models are not allowed.
    formatformat string The extending format for the previously mentioned type. See Data Type Formats for further details.
    itemsitems Items Object Required if type is “array”. Describes the type of items in the array.
    collectionFormatcollectionFormat stringDetermines the format of the array if type array is used. Possible values are:
    • csv - comma separated values foo,bar.
    • ssv - space separated values foo bar.
    • tsv - tab separated values foo\tbar.
    • pipes - pipe separated values foo|bar.
    Default value is csv.
    Determines the format of the array if type array is used. Possible values are:
    • csv - comma separated values foo,bar.
    • ssv - space separated values foo bar.
    • tsv - tab separated values foo\tbar.
    • pipes - pipe separated values foo|bar.
    Default value is csv.
    defaultdefault *Declares the value of the item that the server will use if none is provided. (Note: “default” has no meaning for required items.) See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2. Unlike JSON Schema this value MUST conform to the defined type for the data type.Declares the value of the item that the server will use if none is provided. (Note: “default” has no meaning for required items.) See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2. Unlike JSON Schema this value MUST conform to the defined type for the data type.
    maximummaximum number See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.2.
    exclusiveMaximumexclusiveMaximum boolean See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.2.
    minimumminimum number See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.3.
    exclusiveMinimumexclusiveMinimum boolean See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.3.
    maxLengthmaxLength integer See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.1.
    minLengthminLength integer See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.2.
    patternpattern string See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.3.
    maxItemsmaxItems integer See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.3.2.
    minItemsminItems integer See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.3.3.
    uniqueItemsuniqueItems boolean See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.3.4.
    enumenum [*] See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1.
    multipleOfmultipleOf number See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.1.
    -

    Patterned Objects

    +
    6.4.10.2 Patterned Objects
    @@ -1351,18 +1559,18 @@ - + - +
    ^x-^x- AnyAllows extensions to the Swagger Schema. The field name MUST begin with x-, for example, x-internal-id. The value can be null, a primitive, an array or an object. See Vendor Extensions for further details.Allows extensions to the Swagger Schema. The field name MUST begin with x-, for example, x-internal-id. The value can be null, a primitive, an array or an object. See Vendor Extensions for further details.
    -

    Items Object Examples

    +
    6.4.10.3 Items Object Examples

    Items must be of type string and have the minimum length of 2 characters:

    
     {
    -    "type": "string",
    -    "minLength": 2
    +    "type": "string",
    +    "minLength": 2
     }
     
    
    @@ -1372,11 +1580,11 @@
     

    An array of arrays, the internal array being of type integer, numbers must be between 0 and 63 (inclusive):

    
     {
    -    "type": "array",
    -    "items": {
    -        "type": "integer",
    -        "minimum": 0,
    -        "maximum": 63
    +    "type": "array",
    +    "items": {
    +        "type": "integer",
    +        "minimum": 0,
    +        "maximum": 63
         }
     }
     
    @@ -1387,11 +1595,11 @@ minimum: 0 maximum: 63
    -

    Responses Object

    +

    6.4.11 Responses Object

    A container for the expected responses of an operation. The container maps a HTTP response code to the expected response. It is not expected from the documentation to necessarily cover all possible HTTP response codes, since they may not be known in advance. However, it is expected from the documentation to cover a successful operation response and any known errors.

    The default can be used as the default response object for all HTTP codes that are not covered individually by the specification.

    -

    The Responses Object MUST contain at least one response code, and it SHOULD be the response for a successful operation call.

    -

    Fixed Fields

    +

    The Responses Object MUST contain at least one response code, and it SHOULD be the response for a successful operation call.

    +
    6.4.11.1 Fixed Fields
    @@ -1402,13 +1610,13 @@ - +
    defaultdefault Response Object | Reference Object The documentation of responses other than the ones declared for specific HTTP response codes. It can be used to cover undeclared responses. Reference Object can be used to link to a response that is defined at the Swagger Object’s responses section.
    -

    Patterned Fields

    +
    6.4.11.2 Patterned Fields
    @@ -1419,48 +1627,48 @@ - + - + - +
    {HTTP Status Code}{HTTP Status Code} Response Object | Reference Object Any HTTP status code can be used as the property name (one property per HTTP status code). Describes the expected response for that HTTP status code. Reference Object can be used to link to a response that is defined at the Swagger Object’s responses section.
    ^x-^x- AnyAllows extensions to the Swagger Schema. The field name MUST begin with x-, for example, x-internal-id. The value can be null, a primitive, an array or an object. See Vendor Extensions for further details.Allows extensions to the Swagger Schema. The field name MUST begin with x-, for example, x-internal-id. The value can be null, a primitive, an array or an object. See Vendor Extensions for further details.
    -

    Responses Object Example

    +
    6.4.11.3 Responses Object Example

    A 200 response for successful operation and a default response for others (implying an error):

    
     {
    -  "200": {
    -    "description": "a pet to be returned",
    -    "schema": {
    -      "$ref": "#/definitions/Pet"
    +  "200": {
    +    "description": "a pet to be returned",
    +    "schema": {
    +      "$ref": "#/definitions/Pet"
         }
       },
    -  "default": {
    -    "description": "Unexpected error",
    -    "schema": {
    -      "$ref": "#/definitions/ErrorModel"
    +  "default": {
    +    "description": "Unexpected error",
    +    "schema": {
    +      "$ref": "#/definitions/ErrorModel"
         }
       }
     }
     
    
    -'200':
    +'200':
       description: a pet to be returned
       schema:
    -    $ref: '#/definitions/Pet'
    +    $ref: '#/definitions/Pet'
     default:
       description: Unexpected error
       schema:
    -    $ref: '#/definitions/ErrorModel'
    +    $ref: '#/definitions/ErrorModel'
     
    -

    Response Object

    +

    6.4.12 Response Object

    Describes a single response from an API Operation.

    -

    Fixed Fields

    +
    6.4.12.1 Fixed Fields
    @@ -1471,28 +1679,28 @@ - + - + - + - + - +
    descriptiondescription string Required. A short description of the response. GFM syntax can be used for rich text representation.
    schemaschema Schema ObjectA definition of the response structure. It can be a primitive, an array or an object. If this field does not exist, it means no content is returned as part of the response. As an extension to the Schema Object, its root type value may also be "file". This SHOULD be accompanied by a relevant produces mime-type.A definition of the response structure. It can be a primitive, an array or an object. If this field does not exist, it means no content is returned as part of the response. As an extension to the Schema Object, its root type value may also be "file". This SHOULD be accompanied by a relevant produces mime-type.
    headersheaders Headers Object A list of headers that are sent with the response.
    examplesexamples Example Object An example of the response message.
    -

    Patterned Objects

    +
    6.4.12.2 Patterned Objects
    @@ -1503,21 +1711,21 @@ - + - +
    ^x-^x- AnyAllows extensions to the Swagger Schema. The field name MUST begin with x-, for example, x-internal-id. The value can be null, a primitive, an array or an object. See Vendor Extensions for further details.Allows extensions to the Swagger Schema. The field name MUST begin with x-, for example, x-internal-id. The value can be null, a primitive, an array or an object. See Vendor Extensions for further details.
    -

    Response Object Examples

    +
    6.4.12.3 Response Object Examples

    Response of an array of a complex type:

    
     {
    -  "description": "A complex object array response",
    -  "schema": {
    -    "type": "array",
    -    "items": {
    -      "$ref": "#/definitions/VeryComplexType"
    +  "description": "A complex object array response",
    +  "schema": {
    +    "type": "array",
    +    "items": {
    +      "$ref": "#/definitions/VeryComplexType"
         }
       }
     }
    @@ -1527,14 +1735,14 @@
     schema:
       type: array
       items:
    -    $ref: '#/definitions/VeryComplexType'
    +    $ref: '#/definitions/VeryComplexType'
     

    Response with a string type:

    
     {
    -  "description": "A simple string response",
    -  "schema": {
    -    "type": "string"
    +  "description": "A simple string response",
    +  "schema": {
    +    "type": "string"
       }
     }
     
    @@ -1546,22 +1754,22 @@

    Response with headers:

    
     {
    -  "description": "A simple string response",
    -  "schema": {
    -    "type": "string"
    +  "description": "A simple string response",
    +  "schema": {
    +    "type": "string"
       },
    -  "headers": {
    -    "X-Rate-Limit-Limit": {
    -      "description": "The number of allowed requests in the current period",
    -      "type": "integer"
    +  "headers": {
    +    "X-Rate-Limit-Limit": {
    +      "description": "The number of allowed requests in the current period",
    +      "type": "integer"
         },
    -    "X-Rate-Limit-Remaining": {
    -      "description": "The number of remaining requests in the current period",
    -      "type": "integer"
    +    "X-Rate-Limit-Remaining": {
    +      "description": "The number of remaining requests in the current period",
    +      "type": "integer"
         },
    -    "X-Rate-Limit-Reset": {
    -      "description": "The number of seconds left in the current period",
    -      "type": "integer"
    +    "X-Rate-Limit-Reset": {
    +      "description": "The number of seconds left in the current period",
    +      "type": "integer"
         }
       }
     }
    @@ -1584,15 +1792,15 @@
     

    Response with no return value:

    
     {
    -  "description": "object created"
    +  "description": "object created"
     }
     
    
     description: object created
     
    -

    Headers Object

    +

    6.4.13 Headers Object

    Lists the headers that can be sent as part of a response.

    -

    Patterned Fields

    +
    6.4.13.1 Patterned Fields
    @@ -1603,27 +1811,27 @@ - +
    {name}{name} Header Object The name of the property corresponds to the name of the header. The value describes the type of the header.
    -

    Headers Object Example

    +
    6.4.13.2 Headers Object Example

    Rate-limit headers:

    
     {
    -    "X-Rate-Limit-Limit": {
    -        "description": "The number of allowed requests in the current period",
    -        "type": "integer"
    +    "X-Rate-Limit-Limit": {
    +        "description": "The number of allowed requests in the current period",
    +        "type": "integer"
         },
    -    "X-Rate-Limit-Remaining": {
    -        "description": "The number of remaining requests in the current period",
    -        "type": "integer"
    +    "X-Rate-Limit-Remaining": {
    +        "description": "The number of remaining requests in the current period",
    +        "type": "integer"
         },
    -    "X-Rate-Limit-Reset": {
    -        "description": "The number of seconds left in the current period",
    -        "type": "integer"
    +    "X-Rate-Limit-Reset": {
    +        "description": "The number of seconds left in the current period",
    +        "type": "integer"
         }
     }
     
    @@ -1638,9 +1846,9 @@ description: The number of seconds left in the current period type: integer
    -

    Example Object

    +

    6.4.14 Example Object

    Allows sharing examples for operation responses.

    -

    Patterned Fields

    +
    6.4.14.1 Patterned Fields
    @@ -1651,22 +1859,22 @@ - + - +
    {mime type}{mime type} AnyThe name of the property MUST be one of the Operation produces values (either implicit or inherited). The value SHOULD be an example of what such a response would look like.The name of the property MUST be one of the Operation produces values (either implicit or inherited). The value SHOULD be an example of what such a response would look like.
    -

    Example Object Example

    +
    6.4.14.2 Example Object Example

    Example response for application/json mimetype of a Pet data type:

    
     {
    -  "application/json": {
    -    "name": "Puma",
    -    "type": "Dog",
    -    "color": "Black",
    -    "gender": "Female",
    -    "breed": "Mixed"
    +  "application/json": {
    +    "name": "Puma",
    +    "type": "Dog",
    +    "color": "Black",
    +    "gender": "Female",
    +    "breed": "Mixed"
       }
     }
     
    @@ -1678,7 +1886,7 @@ gender: Female breed: Mixed
    -

    Header Object

    +

    6.4.15 Header Object

    @@ -1689,98 +1897,98 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
    descriptiondescription string A short description of the header.
    typetype stringRequired. The type of the object. The value MUST be one of "string", "number", "integer", "boolean", or "array".Required. The type of the object. The value MUST be one of "string", "number", "integer", "boolean", or "array".
    formatformat string The extending format for the previously mentioned type. See Data Type Formats for further details.
    itemsitems Items Object Required if type is “array”. Describes the type of items in the array.
    collectionFormatcollectionFormat stringDetermines the format of the array if type array is used. Possible values are:
    • csv - comma separated values foo,bar.
    • ssv - space separated values foo bar.
    • tsv - tab separated values foo\tbar.
    • pipes - pipe separated values foo|bar.
    Default value is csv.
    Determines the format of the array if type array is used. Possible values are:
    • csv - comma separated values foo,bar.
    • ssv - space separated values foo bar.
    • tsv - tab separated values foo\tbar.
    • pipes - pipe separated values foo|bar.
    Default value is csv.
    defaultdefault *Declares the value of the header that the server will use if none is provided. (Note: “default” has no meaning for required headers.) See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2. Unlike JSON Schema this value MUST conform to the defined type for the header.Declares the value of the header that the server will use if none is provided. (Note: “default” has no meaning for required headers.) See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2. Unlike JSON Schema this value MUST conform to the defined type for the header.
    maximummaximum number See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.2.
    exclusiveMaximumexclusiveMaximum boolean See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.2.
    minimumminimum number See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.3.
    exclusiveMinimumexclusiveMinimum boolean See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.3.
    maxLengthmaxLength integer See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.1.
    minLengthminLength integer See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.2.
    patternpattern string See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.3.
    maxItemsmaxItems integer See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.3.2.
    minItemsminItems integer See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.3.3.
    uniqueItemsuniqueItems boolean https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.3.4.
    enumenum [*] See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1.
    multipleOfmultipleOf number See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.1.
    -

    Patterned Objects

    +
    6.4.15.1 Patterned Objects
    @@ -1791,27 +1999,27 @@ - + - +
    ^x-^x- AnyAllows extensions to the Swagger Schema. The field name MUST begin with x-, for example, x-internal-id. The value can be null, a primitive, an array or an object. See Vendor Extensions for further details.Allows extensions to the Swagger Schema. The field name MUST begin with x-, for example, x-internal-id. The value can be null, a primitive, an array or an object. See Vendor Extensions for further details.
    -

    Header Object Example

    +
    6.4.15.2 Header Object Example

    A simple header with of an integer type:

    
     {
    -  "description": "The number of allowed requests in the current period",
    -  "type": "integer"
    +  "description": "The number of allowed requests in the current period",
    +  "type": "integer"
     }
     
    
     description: The number of allowed requests in the current period
     type: integer
     
    -

    Tag Object

    +

    6.4.16 Tag Object

    Allows adding meta data to a single tag that is used by the Operation Object. It is not mandatory to have a Tag Object per tag used there.

    -

    Fixed Fields

    +
    6.4.16.1 Fixed Fields
    @@ -1822,23 +2030,23 @@ - + - + - +
    namename string Required. The name of the tag.
    descriptiondescription string A short description for the tag. GFM syntax can be used for rich text representation.
    externalDocsexternalDocs External Documentation Object Additional external documentation for this tag.
    -

    Patterned Fields

    +
    6.4.16.2 Patterned Fields
    @@ -1849,27 +2057,27 @@ - + - +
    ^x-^x- AnyAllows extensions to the Swagger Schema. The field name MUST begin with x-, for example, x-internal-id. The value can be null, a primitive, an array or an object. See Vendor Extensions for further details.Allows extensions to the Swagger Schema. The field name MUST begin with x-, for example, x-internal-id. The value can be null, a primitive, an array or an object. See Vendor Extensions for further details.
    -

    Tag Object Example

    +
    6.4.16.3 Tag Object Example
    
     {
    -	"name": "pet",
    -	"description": "Pets operations"
    +	"name": "pet",
    +	"description": "Pets operations"
     }
     
    
     name: pet
     description: Pets operations
     
    -

    Reference Object

    +

    6.4.17 Reference Object

    A simple object to allow referencing other definitions in the specification. It can be used to reference parameters and responses that are defined at the top level for reuse.

    The Reference Object is a JSON Reference that uses a JSON Pointer as its value. For this specification, only canonical dereferencing is supported.

    -

    Fixed Fields

    +
    6.4.17.1 Fixed Fields
    @@ -1880,40 +2088,40 @@ - +
    $ref$ref string Required. The reference string.
    -

    Reference Object Example

    +
    6.4.17.2 Reference Object Example
    
     {
    -	"$ref": "#/definitions/Pet"
    +	"$ref": "#/definitions/Pet"
     }
     
    
    -$ref: '#/definitions/Pet'
    +$ref: '#/definitions/Pet'
     
    -

    Relative Schema File Example

    +
    6.4.17.3 Relative Schema File Example
    
     {
    -  "$ref": "Pet.json"
    +  "$ref": "Pet.json"
     }
     
    
    -$ref: 'Pet.yaml'
    +$ref: 'Pet.yaml'
     
    -

    Relative Files With Embedded Schema Example

    +
    6.4.17.4 Relative Files With Embedded Schema Example
    
     {
    -  "$ref": "definitions.json#/Pet"
    +  "$ref": "definitions.json#/Pet"
     }
     
    
    -$ref: 'definitions.yaml#/Pet'
    +$ref: 'definitions.yaml#/Pet'
     
    -

    Schema Object

    +

    6.4.18 Schema Object

    The Schema Object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. This object is based on the JSON Schema Specification Draft 4 and uses a predefined subset of it. On top of this subset, there are extensions provided by this specification to allow for more complete documentation.

    Further information about the properties can be found in JSON Schema Core and JSON Schema Validation. Unless stated otherwise, the property definitions follow the JSON Schema specification as referenced here.

    The following properties are taken directly from the JSON Schema definition and follow the same specifications:

    @@ -1922,7 +2130,7 @@
  • format (See Data Type Formats for further details)
  • title
  • description (GFM syntax can be used for rich text representation)
  • -
  • default (Unlike JSON Schema, the value MUST conform to the defined type for the Schema Object)
  • +
  • default (Unlike JSON Schema, the value MUST conform to the defined type for the Schema Object)
  • multipleOf
  • maximum
  • exclusiveMaximum
  • @@ -1948,7 +2156,7 @@
  • additionalProperties
  • Other than the JSON Schema subset fields, the following fields may be used for further schema documentation.

    -

    Fixed Fields

    +
    6.4.18.1 Fixed Fields
    @@ -1959,33 +2167,33 @@ - + - + - + - + - + - + - + - +
    discriminatordiscriminator stringAdds support for polymorphism. The discriminator is the schema property name that is used to differentiate between other schema that inherit this schema. The property name used MUST be defined at this schema and it MUST be in the required property list. When used, the value MUST be the name of this schema or any schema that inherits it.Adds support for polymorphism. The discriminator is the schema property name that is used to differentiate between other schema that inherit this schema. The property name used MUST be defined at this schema and it MUST be in the required property list. When used, the value MUST be the name of this schema or any schema that inherits it.
    readOnlyreadOnly booleanRelevant only for Schema "properties" definitions. Declares the property as “read only”. This means that it MAY be sent as part of a response but MUST NOT be sent as part of the request. Properties marked as readOnly being true SHOULD NOT be in the required list of the defined schema. Default value is false.Relevant only for Schema "properties" definitions. Declares the property as “read only”. This means that it MAY be sent as part of a response but MUST NOT be sent as part of the request. Properties marked as readOnly being true SHOULD NOT be in the required list of the defined schema. Default value is false.
    xmlxml XML ObjectThis MAY be used only on properties schemas. It has no effect on root schemas. Adds Additional metadata to describe the XML representation format of this property.This MAY be used only on properties schemas. It has no effect on root schemas. Adds Additional metadata to describe the XML representation format of this property.
    externalDocsexternalDocs External Documentation Object Additional external documentation for this schema.
    exampleexample Any A free-form property to include an example of an instance for this schema.
    -

    Patterned Objects

    +
    6.4.18.2 Patterned Objects
    @@ -1996,48 +2204,48 @@ - + - +
    ^x-^x- AnyAllows extensions to the Swagger Schema. The field name MUST begin with x-, for example, x-internal-id. The value can be null, a primitive, an array or an object. See Vendor Extensions for further details.Allows extensions to the Swagger Schema. The field name MUST begin with x-, for example, x-internal-id. The value can be null, a primitive, an array or an object. See Vendor Extensions for further details.
    -
    Composition and Inheritance (Polymorphism)
    +
    6.4.18.2.1 Composition and Inheritance (Polymorphism)

    Swagger allows combining and extending model definitions using the allOf property of JSON Schema, in effect offering model composition. allOf takes in an array of object definitions that are validated independently but together compose a single object.

    -

    While composition offers model extensibility, it does not imply a hierarchy between the models. To support polymorphism, Swagger adds the support of the discriminator field. When used, the discriminator will be the name of the property used to decide which schema definition is used to validate the structure of the model. As such, the discriminator field MUST be a required field. The value of the chosen property has to be the friendly name given to the model under the definitions property. As such, inline schema definitions, which do not have a given id, cannot be used in polymorphism.

    -
    XML Modeling
    +

    While composition offers model extensibility, it does not imply a hierarchy between the models. To support polymorphism, Swagger adds the support of the discriminator field. When used, the discriminator will be the name of the property used to decide which schema definition is used to validate the structure of the model. As such, the discriminator field MUST be a required field. The value of the chosen property has to be the friendly name given to the model under the definitions property. As such, inline schema definitions, which do not have a given id, cannot be used in polymorphism.

    +
    6.4.18.2.2 XML Modeling

    The xml property allows extra definitions when translating the JSON definition to XML. The XML Object contains additional information about the available options.

    -

    Schema Object Examples

    -
    Primitive Sample
    +
    6.4.18.3 Schema Object Examples
    +
    6.4.18.3.1 Primitive Sample

    Unlike previous versions of Swagger, Schema definitions can be used to describe primitive and arrays as well.

    
     {
    -    "type": "string",
    -    "format": "email"
    +    "type": "string",
    +    "format": "email"
     }
     
    
     type: string
     format: email
     
    -
    Simple Model
    +
    6.4.18.3.2 Simple Model
    
     {
    -  "type": "object",
    -  "required": [
    -    "name"
    +  "type": "object",
    +  "required": [
    +    "name"
       ],
    -  "properties": {
    -    "name": {
    -      "type": "string"
    +  "properties": {
    +    "name": {
    +      "type": "string"
         },
    -    "address": {
    -      "$ref": "#/definitions/Address"
    +    "address": {
    +      "$ref": "#/definitions/Address"
         },
    -    "age": {
    -      "type": "integer",
    -      "format": "int32",
    -      "minimum": 0
    +    "age": {
    +      "type": "integer",
    +      "format": "int32",
    +      "minimum": 0
         }
       }
     }
    @@ -2050,19 +2258,19 @@
       name:
         type: string
       address:
    -    $ref: '#/definitions/Address'
    +    $ref: '#/definitions/Address'
       age:
         type: integer
         format: int32
         minimum: 0
     
    -
    Model with Map/Dictionary Properties
    +
    6.4.18.3.3 Model with Map/Dictionary Properties

    For a simple string to string mapping:

    
     {
    -  "type": "object",
    -  "additionalProperties": {
    -    "type": "string"
    +  "type": "object",
    +  "additionalProperties": {
    +    "type": "string"
       }
     }
     
    @@ -2074,36 +2282,36 @@

    For a string to model mapping:

    
     {
    -  "type": "object",
    -  "additionalProperties": {
    -    "$ref": "#/definitions/ComplexModel"
    +  "type": "object",
    +  "additionalProperties": {
    +    "$ref": "#/definitions/ComplexModel"
       }
     }
     
    
     type: object
     additionalProperties:
    -  $ref: '#/definitions/ComplexModel'
    +  $ref: '#/definitions/ComplexModel'
     
    -
    Model with Example
    +
    6.4.18.3.4 Model with Example
    
     {
    -  "type": "object",
    -  "properties": {
    -    "id": {
    -      "type": "integer",
    -      "format": "int64"
    +  "type": "object",
    +  "properties": {
    +    "id": {
    +      "type": "integer",
    +      "format": "int64"
         },
    -    "name": {
    -      "type": "string"
    +    "name": {
    +      "type": "string"
         }
       },
    -  "required": [
    -    "name"
    +  "required": [
    +    "name"
       ],
    -  "example": {
    -    "name": "Puma",
    -    "id": 1
    +  "example": {
    +    "name": "Puma",
    +    "id": 1
       }
     }
     
    @@ -2121,40 +2329,40 @@ name: Puma id: 1 -
    Models with Composition
    +
    6.4.18.3.5 Models with Composition
    
     {
    -  "definitions": {
    -    "ErrorModel": {
    -      "type": "object",
    -      "required": [
    -        "message",
    -        "code"
    +  "definitions": {
    +    "ErrorModel": {
    +      "type": "object",
    +      "required": [
    +        "message",
    +        "code"
           ],
    -      "properties": {
    -        "message": {
    -          "type": "string"
    +      "properties": {
    +        "message": {
    +          "type": "string"
             },
    -        "code": {
    -          "type": "integer",
    -          "minimum": 100,
    -          "maximum": 600
    +        "code": {
    +          "type": "integer",
    +          "minimum": 100,
    +          "maximum": 600
             }
           }
         },
    -    "ExtendedErrorModel": {
    -      "allOf": [
    +    "ExtendedErrorModel": {
    +      "allOf": [
             {
    -          "$ref": "#/definitions/ErrorModel"
    +          "$ref": "#/definitions/ErrorModel"
             },
             {
    -          "type": "object",
    -          "required": [
    -            "rootCause"
    +          "type": "object",
    +          "required": [
    +            "rootCause"
               ],
    -          "properties": {
    -            "rootCause": {
    -              "type": "string"
    +          "properties": {
    +            "rootCause": {
    +              "type": "string"
                 }
               }
             }
    @@ -2179,7 +2387,7 @@
             maximum: 600
       ExtendedErrorModel:
         allOf:
    -    - $ref: '#/definitions/ErrorModel'
    +    - $ref: '#/definitions/ErrorModel'
         - type: object
           required:
           - rootCause
    @@ -2187,72 +2395,72 @@
             rootCause:
               type: string
     
    -
    Models with Polymorphism Support
    +
    6.4.18.3.6 Models with Polymorphism Support
    
     {
    -  "definitions": {
    -    "Pet": {
    -      "type": "object",
    -      "discriminator": "petType",
    -      "properties": {
    -        "name": {
    -          "type": "string"
    +  "definitions": {
    +    "Pet": {
    +      "type": "object",
    +      "discriminator": "petType",
    +      "properties": {
    +        "name": {
    +          "type": "string"
             },
    -        "petType": {
    -          "type": "string"
    +        "petType": {
    +          "type": "string"
             }
           },
    -      "required": [
    -        "name",
    -        "petType"
    +      "required": [
    +        "name",
    +        "petType"
           ]
         },
    -    "Cat": {
    -      "description": "A representation of a cat",
    -      "allOf": [
    +    "Cat": {
    +      "description": "A representation of a cat",
    +      "allOf": [
             {
    -          "$ref": "#/definitions/Pet"
    +          "$ref": "#/definitions/Pet"
             },
             {
    -          "type": "object",
    -          "properties": {
    -            "huntingSkill": {
    -              "type": "string",
    -              "description": "The measured skill for hunting",
    -              "default": "lazy",
    -              "enum": [
    -                "clueless",
    -                "lazy",
    -                "adventurous",
    -                "aggressive"
    +          "type": "object",
    +          "properties": {
    +            "huntingSkill": {
    +              "type": "string",
    +              "description": "The measured skill for hunting",
    +              "default": "lazy",
    +              "enum": [
    +                "clueless",
    +                "lazy",
    +                "adventurous",
    +                "aggressive"
                   ]
                 }
               },
    -          "required": [
    -            "huntingSkill"
    +          "required": [
    +            "huntingSkill"
               ]
             }
           ]
         },
    -    "Dog": {
    -      "description": "A representation of a dog",
    -      "allOf": [
    +    "Dog": {
    +      "description": "A representation of a dog",
    +      "allOf": [
             {
    -          "$ref": "#/definitions/Pet"
    +          "$ref": "#/definitions/Pet"
             },
             {
    -          "type": "object",
    -          "properties": {
    -            "packSize": {
    -              "type": "integer",
    -              "format": "int32",
    -              "description": "the size of the pack the dog is from",
    -              "default": 0,
    -              "minimum": 0
    +          "type": "object",
    +          "properties": {
    +            "packSize": {
    +              "type": "integer",
    +              "format": "int32",
    +              "description": "the size of the pack the dog is from",
    +              "default": 0,
    +              "minimum": 0
                 }
               },
    -          "required": [
    -            "packSize"
    +          "required": [
    +            "packSize"
               ]
             }
           ]
    @@ -2276,7 +2484,7 @@
       Cat:
         description: A representation of a cat
         allOf:
    -    - $ref: '#/definitions/Pet'
    +    - $ref: '#/definitions/Pet'
         - type: object
           properties:
             huntingSkill:
    @@ -2293,7 +2501,7 @@
       Dog:
         description: A representation of a dog
         allOf:
    -    - $ref: '#/definitions/Pet'
    +    - $ref: '#/definitions/Pet'
         - type: object
           properties:
             packSize:
    @@ -2305,10 +2513,10 @@
           required:
           - packSize
     
    -

    XML Object

    +

    6.4.19 XML Object

    A metadata object that allows for more fine-tuned XML model definitions.

    When using arrays, XML element names are not inferred (for singular/plural forms) and the name property should be used to add that information. See examples for expected behavior.

    -

    Fixed Fields

    +
    6.4.19.1 Fixed Fields
    @@ -2319,33 +2527,33 @@ - + - + - + - + - + - + - +
    namename string Replaces the name of the element/attribute used for the described schema property. When defined within the Items Object (items), it will affect the name of the individual XML elements within the list. When defined alongside type being array (outside the items), it will affect the wrapping element and only if wrapped is true. If wrapped is false, it will be ignored.
    namespacenamespace stringThe URL of the namespace definition. Value SHOULD be in the form of a URL.The URL of the namespace definition. Value SHOULD be in the form of a URL.
    prefixprefix string The prefix to be used for the name.
    attributeattribute boolean Declares whether the property definition translates to an attribute instead of an element. Default value is false.
    wrappedwrapped booleanMAY be used only for an array definition. Signifies whether the array is wrapped (for example, <books><book/><book/></books>) or unwrapped (<book/><book/>). Default value is false. The definition takes effect only when defined alongside type being array (outside the items).MAY be used only for an array definition. Signifies whether the array is wrapped (for example, <books><book/><book/></books>) or unwrapped (<book/><book/>). Default value is false. The definition takes effect only when defined alongside type being array (outside the items).
    -

    Patterned Objects

    +
    6.4.19.2 Patterned Objects
    @@ -2356,20 +2564,20 @@ - + - +
    ^x-^x- AnyAllows extensions to the Swagger Schema. The field name MUST begin with x-, for example, x-internal-id. The value can be null, a primitive, an array or an object. See Vendor Extensions for further details.Allows extensions to the Swagger Schema. The field name MUST begin with x-, for example, x-internal-id. The value can be null, a primitive, an array or an object. See Vendor Extensions for further details.
    -

    XML Object Examples

    +
    6.4.19.3 XML Object Examples

    The examples of the XML object definitions are included inside a property definition of a Schema Object with a sample of the XML representation of it.

    -
    No XML Element
    +
    6.4.19.3.1 No XML Element

    Basic string property:

    
     {
    -    "animals": {
    -        "type": "string"
    +    "animals": {
    +        "type": "string"
         }
     }
     
    @@ -2383,10 +2591,10 @@

    Basic string array property (wrapped is false by default):

    
     {
    -    "animals": {
    -        "type": "array",
    -        "items": {
    -            "type": "string"
    +    "animals": {
    +        "type": "array",
    +        "items": {
    +            "type": "string"
             }
         }
     }
    @@ -2402,13 +2610,13 @@
     <animals>...</animals>
     <animals>...</animals>
     
    -
    XML Name Replacement
    +
    6.4.19.3.2 XML Name Replacement
    
     {
    -  "animals": {
    -    "type": "string",
    -    "xml": {
    -      "name": "animal"
    +  "animals": {
    +    "type": "string",
    +    "xml": {
    +      "name": "animal"
         }
       }
     }
    @@ -2422,25 +2630,25 @@
     
    
     <animal>...</animal>
     
    -
    XML Attribute, Prefix and Namespace
    +
    6.4.19.3.3 XML Attribute, Prefix and Namespace

    In this example, a full model definition is shown.

    
     {
    -  "Person": {
    -    "type": "object",
    -    "properties": {
    -      "id": {
    -        "type": "integer",
    -        "format": "int32",
    -        "xml": {
    -          "attribute": true
    +  "Person": {
    +    "type": "object",
    +    "properties": {
    +      "id": {
    +        "type": "integer",
    +        "format": "int32",
    +        "xml": {
    +          "attribute": true
             }
           },
    -      "name": {
    -        "type": "string",
    -        "xml": {
    -          "namespace": "http://swagger.io/schema/sample",
    -          "prefix": "sample"
    +      "name": {
    +        "type": "string",
    +        "xml": {
    +          "namespace": "http://swagger.io/schema/sample",
    +          "prefix": "sample"
             }
           }
         }
    @@ -2463,20 +2671,20 @@
             prefix: sample
     
    
    -<Person id="123">
    -    <sample:name xmlns:sample="http://swagger.io/schema/sample">example</sample:name>
    +<Person id="123">
    +    <sample:name xmlns:sample="http://swagger.io/schema/sample">example</sample:name>
     </Person>
     
    -
    XML Arrays
    +
    6.4.19.3.4 XML Arrays

    Changing the element names:

    
     {
    -  "animals": {
    -    "type": "array",
    -    "items": {
    -      "type": "string",
    -      "xml": {
    -        "name": "animal"
    +  "animals": {
    +    "type": "array",
    +    "items": {
    +      "type": "string",
    +      "xml": {
    +        "name": "animal"
           }
         }
       }
    @@ -2497,16 +2705,16 @@
     

    The external name property has no effect on the XML:

    
     {
    -  "animals": {
    -    "type": "array",
    -    "items": {
    -      "type": "string",
    -      "xml": {
    -        "name": "animal"
    +  "animals": {
    +    "type": "array",
    +    "items": {
    +      "type": "string",
    +      "xml": {
    +        "name": "animal"
           }
         },
    -    "xml": {
    -      "name": "aliens"
    +    "xml": {
    +      "name": "aliens"
         }
       }
     }
    @@ -2528,13 +2736,13 @@
     

    Even when the array is wrapped, if no name is explicitly defined, the same name will be used both internally and externally:

    
     {
    -  "animals": {
    -    "type": "array",
    -    "items": {
    -      "type": "string"
    +  "animals": {
    +    "type": "array",
    +    "items": {
    +      "type": "string"
         },
    -    "xml": {
    -      "wrapped": true
    +    "xml": {
    +      "wrapped": true
         }
       }
     }
    @@ -2556,16 +2764,16 @@
     

    To overcome the above example, the following definition can be used:

    
     {
    -  "animals": {
    -    "type": "array",
    -    "items": {
    -      "type": "string",
    -      "xml": {
    -        "name": "animal"
    +  "animals": {
    +    "type": "array",
    +    "items": {
    +      "type": "string",
    +      "xml": {
    +        "name": "animal"
           }
         },
    -    "xml": {
    -      "wrapped": true
    +    "xml": {
    +      "wrapped": true
         }
       }
     }
    @@ -2589,17 +2797,17 @@
     

    Affecting both internal and external names:

    
     {
    -  "animals": {
    -    "type": "array",
    -    "items": {
    -      "type": "string",
    -      "xml": {
    -        "name": "animal"
    +  "animals": {
    +    "type": "array",
    +    "items": {
    +      "type": "string",
    +      "xml": {
    +        "name": "animal"
           }
         },
    -    "xml": {
    -      "name": "aliens",
    -      "wrapped": true
    +    "xml": {
    +      "name": "aliens",
    +      "wrapped": true
         }
       }
     }
    @@ -2624,14 +2832,14 @@
     

    If we change the external element but not the internal ones:

    
     {
    -  "animals": {
    -    "type": "array",
    -    "items": {
    -      "type": "string"
    +  "animals": {
    +    "type": "array",
    +    "items": {
    +      "type": "string"
         },
    -    "xml": {
    -      "name": "aliens",
    -      "wrapped": true
    +    "xml": {
    +      "name": "aliens",
    +      "wrapped": true
         }
       }
     }
    @@ -2651,9 +2859,9 @@
       <aliens>value</aliens>
     </aliens>
     
    -

    Definitions Object

    +

    6.4.20 Definitions Object

    An object to hold data types that can be consumed and produced by operations. These data types can be primitives, arrays or models.

    -

    Patterned Fields

    +
    6.4.20.1 Patterned Fields
    @@ -2664,36 +2872,36 @@ - +
    {name}{name} Schema Object A single definition, mapping a “name” to the schema it defines.
    -

    Definitions Object Example

    +
    6.4.20.2 Definitions Object Example
    
     {
    -  "Category": {
    -    "type": "object",
    -    "properties": {
    -      "id": {
    -        "type": "integer",
    -        "format": "int64"
    +  "Category": {
    +    "type": "object",
    +    "properties": {
    +      "id": {
    +        "type": "integer",
    +        "format": "int64"
           },
    -      "name": {
    -        "type": "string"
    +      "name": {
    +        "type": "string"
           }
         }
       },
    -  "Tag": {
    -    "type": "object",
    -    "properties": {
    -      "id": {
    -        "type": "integer",
    -        "format": "int64"
    +  "Tag": {
    +    "type": "object",
    +    "properties": {
    +      "id": {
    +        "type": "integer",
    +        "format": "int64"
           },
    -      "name": {
    -        "type": "string"
    +      "name": {
    +        "type": "string"
           }
         }
       }
    @@ -2717,10 +2925,10 @@
         name:
           type: string
     
    -

    Parameters Definitions Object

    +

    6.4.21 Parameters Definitions Object

    An object to hold parameters to be reused across operations. Parameter definitions can be referenced to the ones defined here.

    This does not define global operation parameters.

    -

    Patterned Fields

    +
    6.4.21.1 Patterned Fields
    @@ -2731,30 +2939,30 @@ - +
    {name}{name} Parameter Object A single parameter definition, mapping a “name” to the parameter it defines.
    -

    Parameters Definition Object Example

    +
    6.4.21.2 Parameters Definition Object Example
    
     {
    -  "skipParam": {
    -    "name": "skip",
    -    "in": "query",
    -    "description": "number of items to skip",
    -    "required": true,
    -    "type": "integer",
    -    "format": "int32"
    +  "skipParam": {
    +    "name": "skip",
    +    "in": "query",
    +    "description": "number of items to skip",
    +    "required": true,
    +    "type": "integer",
    +    "format": "int32"
       },
    -  "limitParam": {
    -    "name": "limit",
    -    "in": "query",
    -    "description": "max records to return",
    -    "required": true,
    -    "type": "integer",
    -    "format": "int32"
    +  "limitParam": {
    +    "name": "limit",
    +    "in": "query",
    +    "description": "max records to return",
    +    "required": true,
    +    "type": "integer",
    +    "format": "int32"
       }
     }
     
    @@ -2774,10 +2982,10 @@ type: integer format: int32
    -

    Responses Definitions Object

    +

    6.4.22 Responses Definitions Object

    An object to hold responses to be reused across operations. Response definitions can be referenced to the ones defined here.

    This does not define global operation responses.

    -

    Patterned Fields

    +
    6.4.22.1 Patterned Fields
    @@ -2788,25 +2996,25 @@ - +
    {name}{name} Response Object A single response definition, mapping a “name” to the response it defines.
    -

    Responses Definitions Object Example

    +
    6.4.22.2 Responses Definitions Object Example
    
     {
    -  "NotFound": {
    -    "description": "Entity not found."
    +  "NotFound": {
    +    "description": "Entity not found."
       },
    -  "IllegalInput": {
    -  	"description": "Illegal input for operation."
    +  "IllegalInput": {
    +  	"description": "Illegal input for operation."
       },
    -  "GeneralError": {
    -  	"description": "General Error",
    -  	"schema": {
    -  		"$ref": "#/definitions/GeneralError"
    +  "GeneralError": {
    +  	"description": "General Error",
    +  	"schema": {
    +  		"$ref": "#/definitions/GeneralError"
       	}
       }
     }
    @@ -2819,11 +3027,11 @@
     GeneralError:
       description: General Error
       schema:
    -    $ref: '#/definitions/GeneralError'
    +    $ref: '#/definitions/GeneralError'
     
    -

    Security Definitions Object

    +

    6.4.23 Security Definitions Object

    A declaration of the security schemes available to be used in the specification. This does not enforce the security schemes on the operations and only serves to provide the relevant details for each scheme.

    -

    Patterned Fields

    +
    6.4.23.1 Patterned Fields
    @@ -2834,27 +3042,27 @@ - +
    {name}{name} Security Scheme Object A single security scheme definition, mapping a “name” to the scheme it defines.
    -

    Security Definitions Object Example

    +
    6.4.23.2 Security Definitions Object Example
    
     {
    -  "api_key": {
    -    "type": "apiKey",
    -    "name": "api_key",
    -    "in": "header"
    +  "api_key": {
    +    "type": "apiKey",
    +    "name": "api_key",
    +    "in": "header"
       },
    -  "petstore_auth": {
    -    "type": "oauth2",
    -    "authorizationUrl": "http://swagger.io/api/oauth/dialog",
    -    "flow": "implicit",
    -    "scopes": {
    -      "write:pets": "modify pets in your account",
    -      "read:pets": "read your pets"
    +  "petstore_auth": {
    +    "type": "oauth2",
    +    "authorizationUrl": "http://swagger.io/api/oauth/dialog",
    +    "flow": "implicit",
    +    "scopes": {
    +      "write:pets": "modify pets in your account",
    +      "read:pets": "read your pets"
         }
       }
     }
    @@ -2872,9 +3080,9 @@
         write:pets: modify pets in your account
         read:pets: read your pets
     
    -

    Security Scheme Object

    +

    6.4.24 Security Scheme Object

    Allows the definition of a security scheme that can be used by the operations. Supported schemes are basic authentication, an API key (either as a header or as a query parameter) and OAuth2’s common flows (implicit, password, application and access code).

    -

    Fixed Fields

    +
    6.4.24.1 Fixed Fields
    @@ -2886,56 +3094,56 @@ - + - + - + - + - + - + - + - + - + - - + + - + - - + + - +
    typetype string AnyRequired. The type of the security scheme. Valid values are "basic", "apiKey" or "oauth2".Required. The type of the security scheme. Valid values are "basic", "apiKey" or "oauth2".
    descriptiondescription string Any A short description for security scheme.
    namename string apiKey Required. The name of the header or query parameter to be used.
    inin string apiKeyRequired The location of the API key. Valid values are "query" or "header".Required The location of the API key. Valid values are "query" or "header".
    flowflow string oauth2Required. The flow used by the OAuth2 security scheme. Valid values are "implicit", "password", "application" or "accessCode".Required. The flow used by the OAuth2 security scheme. Valid values are "implicit", "password", "application" or "accessCode".
    authorizationUrlauthorizationUrl stringoauth2 ("implicit", "accessCode")Required. The authorization URL to be used for this flow. This SHOULD be in the form of a URL.oauth2 ("implicit", "accessCode")Required. The authorization URL to be used for this flow. This SHOULD be in the form of a URL.
    tokenUrltokenUrl stringoauth2 ("password", "application", "accessCode")Required. The token URL to be used for this flow. This SHOULD be in the form of a URL.oauth2 ("password", "application", "accessCode")Required. The token URL to be used for this flow. This SHOULD be in the form of a URL.
    scopesscopes Scopes Object oauth2 Required. The available scopes for the OAuth2 security scheme.
    -

    Patterned Fields

    +
    6.4.24.2 Patterned Fields
    @@ -2946,28 +3154,28 @@ - + - +
    ^x-^x- AnyAllows extensions to the Swagger Schema. The field name MUST begin with x-, for example, x-internal-id. The value can be null, a primitive, an array or an object. See Vendor Extensions for further details.Allows extensions to the Swagger Schema. The field name MUST begin with x-, for example, x-internal-id. The value can be null, a primitive, an array or an object. See Vendor Extensions for further details.
    -

    Security Scheme Object Example

    -
    Basic Authentication Sample
    +
    6.4.24.3 Security Scheme Object Example
    +
    6.4.24.3.1 Basic Authentication Sample
    
     {
    -  "type": "basic"
    +  "type": "basic"
     }
     
    
     type: basic
     
    -
    API Key Sample
    +
    6.4.24.3.2 API Key Sample
    
     {
    -  "type": "apiKey",
    -  "name": "api_key",
    -  "in": "header"
    +  "type": "apiKey",
    +  "name": "api_key",
    +  "in": "header"
     }
     
    
    @@ -2975,15 +3183,15 @@
     name: api_key
     in: header
     
    -
    Implicit OAuth2 Sample
    +
    6.4.24.3.3 Implicit OAuth2 Sample
    
     {
    -  "type": "oauth2",
    -  "authorizationUrl": "http://swagger.io/api/oauth/dialog",
    -  "flow": "implicit",
    -  "scopes": {
    -    "write:pets": "modify pets in your account",
    -    "read:pets": "read your pets"
    +  "type": "oauth2",
    +  "authorizationUrl": "http://swagger.io/api/oauth/dialog",
    +  "flow": "implicit",
    +  "scopes": {
    +    "write:pets": "modify pets in your account",
    +    "read:pets": "read your pets"
       }
     }
     
    @@ -2995,9 +3203,9 @@ write:pets: modify pets in your account read:pets: read your pets
    -

    Scopes Object

    +

    6.4.25 Scopes Object

    Lists the available scopes for an OAuth2 security scheme.

    -

    Patterned Fields

    +
    6.4.25.1 Patterned Fields
    @@ -3008,13 +3216,13 @@ - +
    {name}{name} string Maps between a name of a scope to a short description of it (as the value of the property).
    -

    Patterned Objects

    +
    6.4.25.2 Patterned Objects
    @@ -3025,27 +3233,27 @@ - + - +
    ^x-^x- AnyAllows extensions to the Swagger Schema. The field name MUST begin with x-, for example, x-internal-id. The value can be null, a primitive, an array or an object. See Vendor Extensions for further details.Allows extensions to the Swagger Schema. The field name MUST begin with x-, for example, x-internal-id. The value can be null, a primitive, an array or an object. See Vendor Extensions for further details.
    -

    Scopes Object Example

    +
    6.4.25.3 Scopes Object Example
    
     {
    -  "write:pets": "modify pets in your account",
    -  "read:pets": "read your pets"
    +  "write:pets": "modify pets in your account",
    +  "read:pets": "read your pets"
     }
     
    
     write:pets: modify pets in your account
     read:pets: read your pets
     
    -

    Security Requirement Object

    +

    6.4.26 Security Requirement Object

    Lists the required security schemes to execute this operation. The object can have multiple security schemes declared in it which are all required (that is, there is a logical AND between the schemes).

    -

    The name used for each property MUST correspond to a security scheme declared in the Security Definitions.

    -

    Patterned Fields

    +

    The name used for each property MUST correspond to a security scheme declared in the Security Definitions.

    +
    6.4.26.1 Patterned Fields
    @@ -3056,28 +3264,28 @@ - + - +
    {name}{name} [string]Each name must correspond to a security scheme which is declared in the Security Definitions. If the security scheme is of type "oauth2", then the value is a list of scope names required for the execution. For other security scheme types, the array MUST be empty.Each name must correspond to a security scheme which is declared in the Security Definitions. If the security scheme is of type "oauth2", then the value is a list of scope names required for the execution. For other security scheme types, the array MUST be empty.
    -

    Security Requirement Object Examples

    -
    Non-OAuth2 Security Requirement
    +
    6.4.26.2 Security Requirement Object Examples
    +
    6.4.26.2.1 Non-OAuth2 Security Requirement
    
     {
    -  "api_key": []
    +  "api_key": []
     }
     
    
     api_key: []
     
    -
    OAuth2 Security Requirement
    +
    6.4.26.2.2 OAuth2 Security Requirement
    
     {
    -  "petstore_auth": [
    -    "write:pets",
    -    "read:pets"
    +  "petstore_auth": [
    +    "write:pets",
    +    "read:pets"
       ]
     }
     
    @@ -3086,11 +3294,11 @@ - write:pets - read:pets -

    Specification Extensions

    +

    6.5 Specification Extensions

    While the Swagger Specification tries to accommodate most use cases, additional data can be added to extend the specification at certain points.

    -

    The extensions properties are always prefixed by "x-" and can have any valid JSON format value.

    +

    The extensions properties are always prefixed by "x-" and can have any valid JSON format value.

    The extensions may or may not be supported by the available tooling, but those may be extended as well to add requested support (if tools are internal or open-sourced).

    -

    Security Filtering

    +

    6.6 Security Filtering

    Some objects in the Swagger specification may be declared and remain empty, or completely be removed, even though they are inherently the core of the API documentation.

    The reasoning behind it is to allow an additional layer of access control over the documentation itself. While not part of the specification itself, certain libraries may choose to allow access to parts of the documentation based on some form of authentication/authorization.

    Two examples for this:

    @@ -3099,3 +3307,275 @@
  • The Path Item Object may be empty. In this case, the viewer will be aware that the path exists, but will not be able to see any of its operations or parameters. This is different than hiding the path itself from the Paths Object so the user will not be aware of its existence. This allows the documentation provider a finer control over what the viewer can see.
  • +

    A. References

    A.1 Normative references

    + +
    [RFC6838]
    + Media Type Specifications and Registration Procedures. N. Freed; J. Klensin; T. Hansen. IETF. January 2013. Best Current Practice. URL: https://www.rfc-editor.org/rfc/rfc6838 +
    [RFC7231]
    + Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content. R. Fielding, Ed.; J. Reschke, Ed.. IETF. June 2014. Proposed Standard. URL: https://httpwg.org/specs/rfc7231.html +
    +
    \ No newline at end of file diff --git a/oas/v3.0.0.html b/oas/v3.0.0.html index 7328c9e7ac..907c6d4c3f 100644 --- a/oas/v3.0.0.html +++ b/oas/v3.0.0.html @@ -1,30 +1,246 @@ -OpenAPI Specification v3.0.0 | Introduction, Definitions, & More - + + + + + +OpenAPI Specification v3.0.0 + + + + + + + + -

    OpenAPI Specification v3.0.0

    What is the OpenAPI Specification?

    The OpenAPI Specification (OAS) defines a standard, programming language-agnostic interface description for HTTP APIs, which allows both humans and computers to discover and understand the capabilities of a service without requiring access to source code, additional documentation, or inspection of network traffic. When properly defined via OpenAPI, a consumer can understand and interact with the remote service with a minimal amount of implementation logic. Similar to what interface descriptions have done for lower-level programming, the OpenAPI Specification removes guesswork in calling a service.

    Status of This Document

    The source-of-truth for the specification is the GitHub markdown file referenced above.
    -

    OpenAPI Specification

    -

    Version 3.0.0

    -

    The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “NOT RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in BCP 14 [[!RFC2119]] [[!RFC8174]] when, and only when, they appear in all capitals, as shown here.

    + + + + + +
    +

    +

    OpenAPI Specification v3.0.0

    Version 3.0.0

    +

    +
    + More details about this document +
    + +
    Latest published version:
    + https://spec.openapis.org/oas/latest.html +
    +
    Latest editor's draft:
    https://github.com/OAI/OpenAPI-Specification/
    + + + + + + +
    Editors:
    + Jeremy Whitlock +
    + Marsh Gardiner +
    + Ron Ratovsky +
    + Tony Tam +
    +
    + Former editor: +
    + Jason Harmon +
    + + + +
    Participate
    + GitHub OAI/OpenAPI-Specification +
    + File a bug +
    + Commit history +
    + Pull requests +
    +
    +
    + + + +
    +

    What is the OpenAPI Specification?

    The OpenAPI Specification (OAS) defines a standard, programming language-agnostic interface description for HTTP APIs, which allows both humans and computers to discover and understand the capabilities of a service without requiring access to source code, additional documentation, or inspection of network traffic. When properly defined via OpenAPI, a consumer can understand and interact with the remote service with a minimal amount of implementation logic. Similar to what interface descriptions have done for lower-level programming, the OpenAPI Specification removes guesswork in calling a service.

    Status of This Document

    The source-of-truth for the specification is the GitHub markdown file referenced above.
    +

    1. OpenAPI Specification

    +

    1.1 Version 3.0.0

    +

    The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “NOT RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.

    This document is licensed under The Apache License, Version 2.0.

    -

    Introduction

    +

    2. Introduction

    The OpenAPI Specification (OAS) defines a standard, language-agnostic interface to RESTful APIs which allows both humans and computers to discover and understand the capabilities of the service without access to source code, documentation, or through network traffic inspection. When properly defined, a consumer can understand and interact with the remote service with a minimal amount of implementation logic.

    An OpenAPI definition can then be used by documentation generation tools to display the API, code generation tools to generate servers and clients in various programming languages, testing tools, and many other use cases.

    - -

    Definitions

    -

    OpenAPI Document

    + +

    3. Definitions

    +

    3.1 OpenAPI Document

    A document (or set of documents) that defines or describes an API. An OpenAPI definition uses and conforms to the OpenAPI Specification.

    -

    Path Templating

    +

    3.2 Path Templating

    Path templating refers to the usage of curly braces ({}) to mark a section of a URL path as replaceable using path parameters.

    -

    Media Types

    +

    3.3 Media Types

    Media type definitions are spread across several resources. -The media type definitions SHOULD be in compliance with [[!RFC6838]].

    +The media type definitions SHOULD be in compliance with [RFC6838].

    Some examples of possible media type definitions:

    -
    
    +
    
       text/plain; charset=utf-8
       application/json
       application/vnd.github+json
    @@ -36,45 +252,45 @@
       application/vnd.github.v3.diff
       application/vnd.github.v3.patch
     
    -

    HTTP Status Codes

    +

    3.4 HTTP Status Codes

    The HTTP Status Codes are used to indicate the status of the executed operation. -The available status codes are defined by [[!RFC7231]] and registered status codes are listed in the IANA Status Code Registry.

    -

    Specification

    -

    Versions

    +The available status codes are defined by [RFC7231] and registered status codes are listed in the IANA Status Code Registry.

    +

    4. Specification

    +

    4.1 Versions

    The OpenAPI Specification is versioned using Semantic Versioning 2.0.0 (semver) and follows the semver specification.

    -

    The major.minor portion of the semver (for example 3.0) SHALL designate the OAS feature set. Typically, .patch versions address errors in this document, not the feature set. Tooling which supports OAS 3.0 SHOULD be compatible with all OAS 3.0.* versions. The patch version SHOULD NOT be considered by tooling, making no distinction between 3.0.0 and 3.0.1 for example.

    -

    Subsequent minor version releases of the OpenAPI Specification (incrementing the minor version number) SHOULD NOT interfere with tooling developed to a lower minor version and same major version. Thus a hypothetical 3.1.0 specification SHOULD be usable with tooling designed for 3.0.0.

    -

    An OpenAPI document compatible with OAS 3.*.* contains a required openapi field which designates the semantic version of the OAS that it uses. (OAS 2.0 documents contain a top-level version field named swagger and value "2.0".)

    -

    Format

    +

    The major.minor portion of the semver (for example 3.0) SHALL designate the OAS feature set. Typically, .patch versions address errors in this document, not the feature set. Tooling which supports OAS 3.0 SHOULD be compatible with all OAS 3.0.* versions. The patch version SHOULD NOT be considered by tooling, making no distinction between 3.0.0 and 3.0.1 for example.

    +

    Subsequent minor version releases of the OpenAPI Specification (incrementing the minor version number) SHOULD NOT interfere with tooling developed to a lower minor version and same major version. Thus a hypothetical 3.1.0 specification SHOULD be usable with tooling designed for 3.0.0.

    +

    An OpenAPI document compatible with OAS 3.*.* contains a required openapi field which designates the semantic version of the OAS that it uses. (OAS 2.0 documents contain a top-level version field named swagger and value "2.0".)

    +

    4.2 Format

    An OpenAPI document that conforms to the OpenAPI Specification is itself a JSON object, which may be represented either in JSON or YAML format.

    For example, if a field has an array value, the JSON array representation will be used:

    
     {
    -   "field": [ 1, 2, 3 ]
    +   "field": [ 1, 2, 3 ]
     }
     

    All field names in the specification are case sensitive.

    The schema exposes two types of fields: Fixed fields, which have a declared name, and Patterned fields, which declare a regex pattern for the field name.

    -

    Patterned fields MUST have unique names within the containing object.

    -

    In order to preserve the ability to round-trip between YAML and JSON formats, YAML version 1.2 is RECOMMENDED along with some additional constraints:

    +

    Patterned fields MUST have unique names within the containing object.

    +

    In order to preserve the ability to round-trip between YAML and JSON formats, YAML version 1.2 is RECOMMENDED along with some additional constraints:

    Note: While APIs may be defined by OpenAPI documents in either YAML or JSON format, the API request and response bodies and other content are not required to be JSON or YAML.

    -

    Document Structure

    -

    An OpenAPI document MAY be made up of a single document or be divided into multiple, connected parts at the discretion of the user. In the latter case, $ref fields MUST be used in the specification to reference those parts as follows from the JSON Schema definitions.

    -

    It is RECOMMENDED that the root OpenAPI document be named: openapi.json or openapi.yaml.

    -

    Data Types

    +

    4.3 Document Structure

    +

    An OpenAPI document MAY be made up of a single document or be divided into multiple, connected parts at the discretion of the user. In the latter case, $ref fields MUST be used in the specification to reference those parts as follows from the JSON Schema definitions.

    +

    It is RECOMMENDED that the root OpenAPI document be named: openapi.json or openapi.yaml.

    +

    4.4 Data Types

    Primitive data types in the OAS are based on the types supported by the JSON Schema Specification Wright Draft 00. Note that integer as a type is also supported and is defined as a JSON number without a fraction or exponent part. null is not supported as a type (see nullable for an alternative solution). Models are defined using the Schema Object, which is an extended subset of JSON Schema Specification Wright Draft 00.

    -

    Primitives have an optional modifier property: format. +

    Primitives have an optional modifier property: format. OAS uses several known formats to define in fine detail the data type being used. However, to support documentation needs, the format property is an open string-valued property, and can have any value. -Formats such as "email", "uuid", and so on, MAY be used even though undefined by this specification. -Types that are not accompanied by a format property follow the type definition in the JSON Schema. Tools that do not recognize a specific format MAY default back to the type alone, as if the format is not specified.

    +Formats such as "email", "uuid", and so on, MAY be used even though undefined by this specification. +Types that are not accompanied by a format property follow the type definition in the JSON Schema. Tools that do not recognize a specific format MAY default back to the type alone, as if the format is not specified.

    The formats defined by the OAS are:

    @@ -138,13 +354,13 @@ - + - + @@ -154,18 +370,18 @@
    date string dateAs defined by full-date - [!RFC3339]As defined by full-date - [RFC3339]
    dateTime string date-timeAs defined by date-time - [!RFC3339]As defined by date-time - [RFC3339]
    password
    -

    Rich Text Formatting

    +

    4.5 Rich Text Formatting

    Throughout the specification description fields are noted as supporting CommonMark markdown formatting. -Where OpenAPI tooling renders rich text it MUST support, at a minimum, markdown syntax as described by CommonMark 0.27. Tooling MAY choose to ignore some CommonMark features to address security concerns.

    -

    Relative References in URLs

    -

    Unless specified otherwise, all properties that are URLs MAY be relative references as defined by [[!RFC3986]]. +Where OpenAPI tooling renders rich text it MUST support, at a minimum, markdown syntax as described by CommonMark 0.27. Tooling MAY choose to ignore some CommonMark features to address security concerns.

    +

    4.6 Relative References in URLs

    +

    Unless specified otherwise, all properties that are URLs MAY be relative references as defined by [RFC3986]. Relative references are resolved using the URLs defined in the Server Object as a Base URI.

    Relative references used in $ref are processed as per JSON Reference, using the URL of the current document as the base URI. See also the Reference Object.

    -

    Schema

    -

    In the following description, if a field is not explicitly REQUIRED or described with a MUST or SHALL, it can be considered OPTIONAL.

    -

    OpenAPI Object

    +

    4.7 Schema

    +

    In the following description, if a field is not explicitly REQUIRED or described with a MUST or SHALL, it can be considered OPTIONAL.

    +

    4.7.1 OpenAPI Object

    This is the root document object of the OpenAPI document.

    -

    Fixed Fields

    +
    4.7.1.1 Fixed Fields
    @@ -176,52 +392,52 @@ - + - + - + - + - + - + - + - + - + - + - + - +
    openapiopenapi stringREQUIRED. This string MUST be the semantic version number of the OpenAPI Specification version that the OpenAPI document uses. The openapi field SHOULD be used by tooling specifications and clients to interpret the OpenAPI document. This is not related to the API info.version string.REQUIRED. This string MUST be the semantic version number of the OpenAPI Specification version that the OpenAPI document uses. The openapi field SHOULD be used by tooling specifications and clients to interpret the OpenAPI document. This is not related to the API info.version string.
    infoinfo Info ObjectREQUIRED. Provides metadata about the API. The metadata MAY be used by tooling as required.REQUIRED. Provides metadata about the API. The metadata MAY be used by tooling as required.
    serversservers [Server Object] An array of Server Objects, which provide connectivity information to a target server. If the servers property is not provided, or is an empty array, the default value would be a Server Object with a url value of /.
    pathspaths Paths ObjectREQUIRED. The available paths and operations for the API.REQUIRED. The available paths and operations for the API.
    componentscomponents Components Object An element to hold various schemas for the specification.
    securitysecurity [Security Requirement Object] A declaration of which security mechanisms can be used across the API. The list of values includes alternative security requirement objects that can be used. Only one of the security requirement objects need to be satisfied to authorize a request. Individual operations can override this definition.
    tagstags [Tag Object]A list of tags used by the specification with additional metadata. The order of the tags can be used to reflect on their order by the parsing tools. Not all tags that are used by the Operation Object must be declared. The tags that are not declared MAY be organized randomly or based on the tools’ logic. Each tag name in the list MUST be unique.A list of tags used by the specification with additional metadata. The order of the tags can be used to reflect on their order by the parsing tools. Not all tags that are used by the Operation Object must be declared. The tags that are not declared MAY be organized randomly or based on the tools’ logic. Each tag name in the list MUST be unique.
    externalDocsexternalDocs External Documentation Object Additional external documentation.
    -

    This object MAY be extended with Specification Extensions.

    -

    Info Object

    +

    This object MAY be extended with Specification Extensions.

    +

    4.7.2 Info Object

    The object provides metadata about the API. -The metadata MAY be used by the clients if needed, and MAY be presented in editing or documentation generation tools for convenience.

    -

    Fixed Fields

    +The metadata MAY be used by the clients if needed, and MAY be presented in editing or documentation generation tools for convenience.

    +
    4.7.2.1 Fixed Fields
    @@ -232,54 +448,54 @@ - + - + - + - + - + - + - + - + - + - +
    titletitle stringREQUIRED. The title of the application.REQUIRED. The title of the application.
    descriptiondescription stringA short description of the application. CommonMark syntax MAY be used for rich text representation.A short description of the application. CommonMark syntax MAY be used for rich text representation.
    termsOfServicetermsOfService stringA URL to the Terms of Service for the API. MUST be in the format of a URL.A URL to the Terms of Service for the API. MUST be in the format of a URL.
    contactcontact Contact Object The contact information for the exposed API.
    licenselicense License Object The license information for the exposed API.
    versionversion stringREQUIRED. The version of the OpenAPI document (which is distinct from the OpenAPI Specification version or the API implementation version).REQUIRED. The version of the OpenAPI document (which is distinct from the OpenAPI Specification version or the API implementation version).
    -

    This object MAY be extended with Specification Extensions.

    -

    Info Object Example:

    +

    This object MAY be extended with Specification Extensions.

    +
    4.7.2.2 Info Object Example:
    
     {
    -  "title": "Sample Pet Store App",
    -  "description": "This is a sample server for a pet store.",
    -  "termsOfService": "http://example.com/terms/",
    -  "contact": {
    -    "name": "API Support",
    -    "url": "http://www.example.com/support",
    -    "email": "support@example.com"
    +  "title": "Sample Pet Store App",
    +  "description": "This is a sample server for a pet store.",
    +  "termsOfService": "http://example.com/terms/",
    +  "contact": {
    +    "name": "API Support",
    +    "url": "http://www.example.com/support",
    +    "email": "support@example.com"
       },
    -  "license": {
    -    "name": "Apache 2.0",
    -    "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
    +  "license": {
    +    "name": "Apache 2.0",
    +    "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
       },
    -  "version": "1.0.1"
    +  "version": "1.0.1"
     }
     
    
    @@ -295,9 +511,9 @@
       url: http://www.apache.org/licenses/LICENSE-2.0.html
     version: 1.0.1
     
    -

    Contact Object

    +

    4.7.3 Contact Object

    Contact information for the exposed API.

    -

    Fixed Fields

    +
    4.7.3.1 Fixed Fields
    @@ -308,29 +524,29 @@ - + - + - + - + - +
    namename string The identifying name of the contact person/organization.
    urlurl stringThe URL pointing to the contact information. MUST be in the format of a URL.The URL pointing to the contact information. MUST be in the format of a URL.
    emailemail stringThe email address of the contact person/organization. MUST be in the format of an email address.The email address of the contact person/organization. MUST be in the format of an email address.
    -

    This object MAY be extended with Specification Extensions.

    -

    Contact Object Example:

    +

    This object MAY be extended with Specification Extensions.

    +
    4.7.3.2 Contact Object Example:
    
     {
    -  "name": "API Support",
    -  "url": "http://www.example.com/support",
    -  "email": "support@example.com"
    +  "name": "API Support",
    +  "url": "http://www.example.com/support",
    +  "email": "support@example.com"
     }
     
    
    @@ -338,9 +554,9 @@
     url: http://www.example.com/support
     email: support@example.com
     
    -

    License Object

    +

    4.7.4 License Object

    License information for the exposed API.

    -

    Fixed Fields

    +
    4.7.4.1 Fixed Fields
    @@ -351,32 +567,32 @@ - + - + - + - +
    namename stringREQUIRED. The license name used for the API.REQUIRED. The license name used for the API.
    urlurl stringA URL to the license used for the API. MUST be in the format of a URL.A URL to the license used for the API. MUST be in the format of a URL.
    -

    This object MAY be extended with Specification Extensions.

    -

    License Object Example:

    +

    This object MAY be extended with Specification Extensions.

    +
    4.7.4.2 License Object Example:
    
     {
    -  "name": "Apache 2.0",
    -  "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
    +  "name": "Apache 2.0",
    +  "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
     }
     
    
     name: Apache 2.0
     url: http://www.apache.org/licenses/LICENSE-2.0.html
     
    -

    Server Object

    +

    4.7.5 Server Object

    An object representing a Server.

    -

    Fixed Fields

    +
    4.7.5.1 Fixed Fields
    @@ -387,29 +603,29 @@ - + - + - + - + - +
    urlurl stringREQUIRED. A URL to the target host. This URL supports Server Variables and MAY be relative, to indicate that the host location is relative to the location where the OpenAPI document is being served. Variable substitutions will be made when a variable is named in {brackets}.REQUIRED. A URL to the target host. This URL supports Server Variables and MAY be relative, to indicate that the host location is relative to the location where the OpenAPI document is being served. Variable substitutions will be made when a variable is named in {brackets}.
    descriptiondescription stringAn optional string describing the host designated by the URL. CommonMark syntax MAY be used for rich text representation.An optional string describing the host designated by the URL. CommonMark syntax MAY be used for rich text representation.
    variablesvariables Map[string, Server Variable Object] A map between a variable name and its value. The value is used for substitution in the server’s URL template.
    -

    This object MAY be extended with Specification Extensions.

    -

    Server Object Example

    +

    This object MAY be extended with Specification Extensions.

    +
    4.7.5.2 Server Object Example

    A single server would be described as:

    
     {
    -  "url": "https://development.gigantic-server.com/v1",
    -  "description": "Development server"
    +  "url": "https://development.gigantic-server.com/v1",
    +  "description": "Development server"
     }
     
    
    @@ -419,18 +635,18 @@
     

    The following shows how multiple servers can be described, for example, at the OpenAPI Object’s servers:

    
     {
    -  "servers": [
    +  "servers": [
         {
    -      "url": "https://development.gigantic-server.com/v1",
    -      "description": "Development server"
    +      "url": "https://development.gigantic-server.com/v1",
    +      "description": "Development server"
         },
         {
    -      "url": "https://staging.gigantic-server.com/v1",
    -      "description": "Staging server"
    +      "url": "https://staging.gigantic-server.com/v1",
    +      "description": "Staging server"
         },
         {
    -      "url": "https://api.gigantic-server.com/v1",
    -      "description": "Production server"
    +      "url": "https://api.gigantic-server.com/v1",
    +      "description": "Production server"
         }
       ]
     }
    @@ -447,24 +663,24 @@
     

    The following shows how variables can be used for a server configuration:

    
     {
    -  "servers": [
    +  "servers": [
         {
    -      "url": "https://{username}.gigantic-server.com:{port}/{basePath}",
    -      "description": "The production API server",
    -      "variables": {
    -        "username": {
    -          "default": "demo",
    -          "description": "this value is assigned by the service provider, in this example `gigantic-server.com`"
    +      "url": "https://{username}.gigantic-server.com:{port}/{basePath}",
    +      "description": "The production API server",
    +      "variables": {
    +        "username": {
    +          "default": "demo",
    +          "description": "this value is assigned by the service provider, in this example `gigantic-server.com`"
             },
    -        "port": {
    -          "enum": [
    -            "8443",
    -            "443"
    +        "port": {
    +          "enum": [
    +            "8443",
    +            "443"
               ],
    -          "default": "8443"
    +          "default": "8443"
             },
    -        "basePath": {
    -          "default": "v2"
    +        "basePath": {
    +          "default": "v2"
             }
           }
         }
    @@ -482,16 +698,16 @@
           description: this value is assigned by the service provider, in this example `gigantic-server.com`
         port:
           enum:
    -        - '8443'
    -        - '443'
    -      default: '8443'
    +        - '8443'
    +        - '443'
    +      default: '8443'
         basePath:
           # open meaning there is the opportunity to use special base paths as assigned by the provider, default is `v2`
           default: v2
     
    -

    Server Variable Object

    +

    4.7.6 Server Variable Object

    An object representing a Server Variable for server URL template substitution.

    -

    Fixed Fields

    +
    4.7.6.1 Fixed Fields
    @@ -502,27 +718,27 @@ - + - + - + - + - +
    enumenum [string] An enumeration of string values to be used if the substitution options are from a limited set.
    defaultdefault stringREQUIRED. The default value to use for substitution, and to send, if an alternate value is not supplied. Unlike the Schema Object’s default, this value MUST be provided by the consumer.REQUIRED. The default value to use for substitution, and to send, if an alternate value is not supplied. Unlike the Schema Object’s default, this value MUST be provided by the consumer.
    descriptiondescription stringAn optional description for the server variable. CommonMark syntax MAY be used for rich text representation.An optional description for the server variable. CommonMark syntax MAY be used for rich text representation.
    -

    This object MAY be extended with Specification Extensions.

    -

    Components Object

    +

    This object MAY be extended with Specification Extensions.

    +

    4.7.7 Components Object

    Holds a set of reusable objects for different aspects of the OAS. All objects defined within the components object will have no effect on the API unless they are explicitly referenced from properties outside the components object.

    -

    Fixed Fields

    +
    4.7.7.1 Fixed Fields
    @@ -533,145 +749,145 @@ - + - + - + - + - + - + - + - + - +
    schemas schemas Map[string, Schema Object | Reference Object] An object to hold reusable Schema Objects.
    responses responses Map[string, Response Object | Reference Object] An object to hold reusable Response Objects.
    parameters parameters Map[string, Parameter Object | Reference Object] An object to hold reusable Parameter Objects.
    examples examples Map[string, Example Object | Reference Object] An object to hold reusable Example Objects.
    requestBodies requestBodies Map[string, Request Body Object | Reference Object] An object to hold reusable Request Body Objects.
    headers headers Map[string, Header Object | Reference Object] An object to hold reusable Header Objects.
    securitySchemes securitySchemes Map[string, Security Scheme Object | Reference Object] An object to hold reusable Security Scheme Objects.
    links links Map[string, Link Object | Reference Object] An object to hold reusable Link Objects.
    callbacks callbacks Map[string, Callback Object | Reference Object] An object to hold reusable Callback Objects.
    -

    This object MAY be extended with Specification Extensions.

    -

    All the fixed fields declared above are objects that MUST use keys that match the regular expression: ^[a-zA-Z0-9\.\-_]+$.

    +

    This object MAY be extended with Specification Extensions.

    +

    All the fixed fields declared above are objects that MUST use keys that match the regular expression: ^[a-zA-Z0-9\.\-_]+$.

    Field Name Examples:

    -
    
    +
    
     User
     User_1
     User_Name
     user-name
     my.org.User
     
    -

    Components Object Example

    +
    4.7.7.2 Components Object Example
    
    -"components": {
    -  "schemas": {
    -    "Category": {
    -      "type": "object",
    -      "properties": {
    -        "id": {
    -          "type": "integer",
    -          "format": "int64"
    +"components": {
    +  "schemas": {
    +    "Category": {
    +      "type": "object",
    +      "properties": {
    +        "id": {
    +          "type": "integer",
    +          "format": "int64"
             },
    -        "name": {
    -          "type": "string"
    +        "name": {
    +          "type": "string"
             }
           }
         },
    -    "Tag": {
    -      "type": "object",
    -      "properties": {
    -        "id": {
    -          "type": "integer",
    -          "format": "int64"
    +    "Tag": {
    +      "type": "object",
    +      "properties": {
    +        "id": {
    +          "type": "integer",
    +          "format": "int64"
             },
    -        "name": {
    -          "type": "string"
    +        "name": {
    +          "type": "string"
             }
           }
         }
       },
    -  "parameters": {
    -    "skipParam": {
    -      "name": "skip",
    -      "in": "query",
    -      "description": "number of items to skip",
    -      "required": true,
    -      "schema": {
    -        "type": "integer",
    -        "format": "int32"
    +  "parameters": {
    +    "skipParam": {
    +      "name": "skip",
    +      "in": "query",
    +      "description": "number of items to skip",
    +      "required": true,
    +      "schema": {
    +        "type": "integer",
    +        "format": "int32"
           }
         },
    -    "limitParam": {
    -      "name": "limit",
    -      "in": "query",
    -      "description": "max records to return",
    -      "required": true,
    -      "schema" : {
    -        "type": "integer",
    -        "format": "int32"
    +    "limitParam": {
    +      "name": "limit",
    +      "in": "query",
    +      "description": "max records to return",
    +      "required": true,
    +      "schema" : {
    +        "type": "integer",
    +        "format": "int32"
           }
         }
       },
    -  "responses": {
    -    "NotFound": {
    -      "description": "Entity not found."
    +  "responses": {
    +    "NotFound": {
    +      "description": "Entity not found."
         },
    -    "IllegalInput": {
    -      "description": "Illegal input for operation."
    +    "IllegalInput": {
    +      "description": "Illegal input for operation."
         },
    -    "GeneralError": {
    -      "description": "General Error",
    -      "content": {
    -        "application/json": {
    -          "schema": {
    -            "$ref": "#/components/schemas/GeneralError"
    +    "GeneralError": {
    +      "description": "General Error",
    +      "content": {
    +        "application/json": {
    +          "schema": {
    +            "$ref": "#/components/schemas/GeneralError"
               }
             }
           }
         }
       },
    -  "securitySchemes": {
    -    "api_key": {
    -      "type": "apiKey",
    -      "name": "api_key",
    -      "in": "header"
    +  "securitySchemes": {
    +    "api_key": {
    +      "type": "apiKey",
    +      "name": "api_key",
    +      "in": "header"
         },
    -    "petstore_auth": {
    -      "type": "oauth2",
    -      "flows": {
    -        "implicit": {
    -          "authorizationUrl": "http://example.org/api/oauth/dialog",
    -          "scopes": {
    -            "write:pets": "modify pets in your account",
    -            "read:pets": "read your pets"
    +    "petstore_auth": {
    +      "type": "oauth2",
    +      "flows": {
    +        "implicit": {
    +          "authorizationUrl": "http://example.org/api/oauth/dialog",
    +          "scopes": {
    +            "write:pets": "modify pets in your account",
    +            "read:pets": "read your pets"
               }
             }
           }
    @@ -725,7 +941,7 @@
           content:
             application/json:
               schema:
    -            $ref: '#/components/schemas/GeneralError'
    +            $ref: '#/components/schemas/GeneralError'
       securitySchemes:
         api_key:
           type: apiKey
    @@ -740,10 +956,10 @@
                 write:pets: modify pets in your account
                 read:pets: read your pets
     
    -

    Paths Object

    +

    4.7.8 Paths Object

    Holds the relative paths to the individual endpoints and their operations. -The path is appended to the URL from the Server Object in order to construct the full URL. The Paths MAY be empty, due to ACL constraints.

    -

    Patterned Fields

    +The path is appended to the URL from the Server Object in order to construct the full URL. The Paths MAY be empty, due to ACL constraints.

    +
    4.7.8.1 Patterned Fields
    @@ -754,44 +970,44 @@ - + - +
    /{path}/{path} Path Item ObjectA relative path to an individual endpoint. The field name MUST begin with a slash. The path is appended (no relative URL resolution) to the expanded URL from the Server Object’s url field in order to construct the full URL. Path templating is allowed. When matching URLs, concrete (non-templated) paths would be matched before their templated counterparts. Templated paths with the same hierarchy but different templated names MUST NOT exist as they are identical. In case of ambiguous matching, it’s up to the tooling to decide which one to use.A relative path to an individual endpoint. The field name MUST begin with a slash. The path is appended (no relative URL resolution) to the expanded URL from the Server Object’s url field in order to construct the full URL. Path templating is allowed. When matching URLs, concrete (non-templated) paths would be matched before their templated counterparts. Templated paths with the same hierarchy but different templated names MUST NOT exist as they are identical. In case of ambiguous matching, it’s up to the tooling to decide which one to use.
    -

    This object MAY be extended with Specification Extensions.

    -

    Path Templating Matching

    +

    This object MAY be extended with Specification Extensions.

    +
    4.7.8.2 Path Templating Matching

    Assuming the following paths, the concrete definition, /pets/mine, will be matched first if used:

    -
    
    +
    
       /pets/{petId}
       /pets/mine
     

    The following paths are considered identical and invalid:

    -
    
    +
    
       /pets/{petId}
       /pets/{name}
     

    The following may lead to ambiguous resolution:

    -
    
    +
    
       /{entity}/me
       /books/{id}
     
    -

    Paths Object Example

    +
    4.7.8.3 Paths Object Example
    
     {
    -  "/pets": {
    -    "get": {
    -      "description": "Returns all pets from the system that the user has access to",
    -      "responses": {
    -        "200": {         
    -          "description": "A list of pets.",
    -          "content": {
    -            "application/json": {
    -              "schema": {
    -                "type": "array",
    -                "items": {
    -                  "$ref": "#/components/schemas/pet"
    +  "/pets": {
    +    "get": {
    +      "description": "Returns all pets from the system that the user has access to",
    +      "responses": {
    +        "200": {         
    +          "description": "A list of pets.",
    +          "content": {
    +            "application/json": {
    +              "schema": {
    +                "type": "array",
    +                "items": {
    +                  "$ref": "#/components/schemas/pet"
                     }
                   }
                 }
    @@ -807,20 +1023,20 @@
       get:
         description: Returns all pets from the system that the user has access to
         responses:
    -      '200':
    +      '200':
             description: A list of pets.
             content:
               application/json:
                 schema:
                   type: array
                   items:
    -                $ref: '#/components/schemas/pet'
    +                $ref: '#/components/schemas/pet'
     
    -

    Path Item Object

    +

    4.7.9 Path Item Object

    Describes the operations available on a single path. -A Path Item MAY be empty, due to ACL constraints. +A Path Item MAY be empty, due to ACL constraints. The path itself is still exposed to the documentation viewer but they will not know which operations and parameters are available.

    -

    Fixed Fields

    +
    4.7.9.1 Fixed Fields
    @@ -831,119 +1047,119 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
    $ref$ref stringAllows for an external definition of this path item. The referenced structure MUST be in the format of a Path Item Object. If there are conflicts between the referenced definition and this Path Item’s definition, the behavior is undefined.Allows for an external definition of this path item. The referenced structure MUST be in the format of a Path Item Object. If there are conflicts between the referenced definition and this Path Item’s definition, the behavior is undefined.
    summarysummary string An optional, string summary, intended to apply to all operations in this path.
    descriptiondescription stringAn optional, string description, intended to apply to all operations in this path. CommonMark syntax MAY be used for rich text representation.An optional, string description, intended to apply to all operations in this path. CommonMark syntax MAY be used for rich text representation.
    getget Operation Object A definition of a GET operation on this path.
    putput Operation Object A definition of a PUT operation on this path.
    postpost Operation Object A definition of a POST operation on this path.
    deletedelete Operation Object A definition of a DELETE operation on this path.
    optionsoptions Operation Object A definition of a OPTIONS operation on this path.
    headhead Operation Object A definition of a HEAD operation on this path.
    patchpatch Operation Object A definition of a PATCH operation on this path.
    tracetrace Operation Object A definition of a TRACE operation on this path.
    serversservers [Server Object] An alternative server array to service all operations in this path.
    parametersparameters [Parameter Object | Reference Object]A list of parameters that are applicable for all the operations described under this path. These parameters can be overridden at the operation level, but cannot be removed there. The list MUST NOT include duplicated parameters. A unique parameter is defined by a combination of a name and location. The list can use the Reference Object to link to parameters that are defined at the OpenAPI Object’s components/parameters.A list of parameters that are applicable for all the operations described under this path. These parameters can be overridden at the operation level, but cannot be removed there. The list MUST NOT include duplicated parameters. A unique parameter is defined by a combination of a name and location. The list can use the Reference Object to link to parameters that are defined at the OpenAPI Object’s components/parameters.
    -

    This object MAY be extended with Specification Extensions.

    -

    Path Item Object Example

    +

    This object MAY be extended with Specification Extensions.

    +
    4.7.9.2 Path Item Object Example
    
     {
    -  "get": {
    -    "description": "Returns pets based on ID",
    -    "summary": "Find pets by ID",
    -    "operationId": "getPetsById",
    -    "responses": {
    -      "200": {
    -        "description": "pet response",
    -        "content": {
    -          "*/*": {
    -            "schema": {
    -              "type": "array",
    -              "items": {
    -                "$ref": "#/components/schemas/Pet"
    +  "get": {
    +    "description": "Returns pets based on ID",
    +    "summary": "Find pets by ID",
    +    "operationId": "getPetsById",
    +    "responses": {
    +      "200": {
    +        "description": "pet response",
    +        "content": {
    +          "*/*": {
    +            "schema": {
    +              "type": "array",
    +              "items": {
    +                "$ref": "#/components/schemas/Pet"
                   }
                 }
               }
             }
           },
    -      "default": {
    -        "description": "error payload",
    -        "content": {
    -          "text/html": {
    -            "schema": {
    -              "$ref": "#/components/schemas/ErrorModel"
    +      "default": {
    +        "description": "error payload",
    +        "content": {
    +          "text/html": {
    +            "schema": {
    +              "$ref": "#/components/schemas/ErrorModel"
                 }
               }
             }
           }
         }
       },
    -  "parameters": [
    +  "parameters": [
         {
    -      "name": "id",
    -      "in": "path",
    -      "description": "ID of pet to use",
    -      "required": true,
    -      "schema": {
    -        "type": "array",
    -        "items": {
    -          "type": "string"
    +      "name": "id",
    +      "in": "path",
    +      "description": "ID of pet to use",
    +      "required": true,
    +      "schema": {
    +        "type": "array",
    +        "items": {
    +          "type": "string"
             }
           },
    -      "style": "simple"
    +      "style": "simple"
         }
       ]
     }
    @@ -954,20 +1170,20 @@
       summary: Find pets by ID
       operationId: getPetsById
       responses:
    -    '200':
    +    '200':
           description: pet response
           content:
    -        '*/*' :
    +        '*/*' :
               schema:
                 type: array
                 items:
    -              $ref: '#/components/schemas/Pet'
    +              $ref: '#/components/schemas/Pet'
         default:
           description: error payload
           content:
    -        'text/html':
    +        'text/html':
               schema:
    -            $ref: '#/components/schemas/ErrorModel'
    +            $ref: '#/components/schemas/ErrorModel'
     parameters:
     - name: id
       in: path
    @@ -979,9 +1195,9 @@
         items:
           type: string 
     
    -

    Operation Object

    +

    4.7.10 Operation Object

    Describes a single API operation on a path.

    -

    Fixed Fields

    +
    4.7.10.1 Fixed Fields
    @@ -992,128 +1208,128 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
    tagstags [string] A list of tags for API documentation control. Tags can be used for logical grouping of operations by resources or any other qualifier.
    summarysummary string A short summary of what the operation does.
    descriptiondescription stringA verbose explanation of the operation behavior. CommonMark syntax MAY be used for rich text representation.A verbose explanation of the operation behavior. CommonMark syntax MAY be used for rich text representation.
    externalDocsexternalDocs External Documentation Object Additional external documentation for this operation.
    operationIdoperationId stringUnique string used to identify the operation. The id MUST be unique among all operations described in the API. Tools and libraries MAY use the operationId to uniquely identify an operation, therefore, it is RECOMMENDED to follow common programming naming conventions.Unique string used to identify the operation. The id MUST be unique among all operations described in the API. Tools and libraries MAY use the operationId to uniquely identify an operation, therefore, it is RECOMMENDED to follow common programming naming conventions.
    parametersparameters [Parameter Object | Reference Object]A list of parameters that are applicable for this operation. If a parameter is already defined at the Path Item, the new definition will override it but can never remove it. The list MUST NOT include duplicated parameters. A unique parameter is defined by a combination of a name and location. The list can use the Reference Object to link to parameters that are defined at the OpenAPI Object’s components/parameters.A list of parameters that are applicable for this operation. If a parameter is already defined at the Path Item, the new definition will override it but can never remove it. The list MUST NOT include duplicated parameters. A unique parameter is defined by a combination of a name and location. The list can use the Reference Object to link to parameters that are defined at the OpenAPI Object’s components/parameters.
    requestBodyrequestBody Request Body Object | Reference ObjectThe request body applicable for this operation. The requestBody is only supported in HTTP methods where the HTTP 1.1 specification [[!RFC7231]] has explicitly defined semantics for request bodies. In other cases where the HTTP spec is vague, requestBody SHALL be ignored by consumers.The request body applicable for this operation. The requestBody is only supported in HTTP methods where the HTTP 1.1 specification [RFC7231] has explicitly defined semantics for request bodies. In other cases where the HTTP spec is vague, requestBody SHALL be ignored by consumers.
    responsesresponses Responses ObjectREQUIRED. The list of possible responses as they are returned from executing this operation.REQUIRED. The list of possible responses as they are returned from executing this operation.
    callbackscallbacks Map[string, Callback Object | Reference Object] A map of possible out-of band callbacks related to the parent operation. The key is a unique identifier for the Callback Object. Each value in the map is a Callback Object that describes a request that may be initiated by the API provider and the expected responses. The key value used to identify the callback object is an expression, evaluated at runtime, that identifies a URL to use for the callback operation.
    deprecateddeprecated booleanDeclares this operation to be deprecated. Consumers SHOULD refrain from usage of the declared operation. Default value is false.Declares this operation to be deprecated. Consumers SHOULD refrain from usage of the declared operation. Default value is false.
    securitysecurity [Security Requirement Object] A declaration of which security mechanisms can be used for this operation. The list of values includes alternative security requirement objects that can be used. Only one of the security requirement objects need to be satisfied to authorize a request. This definition overrides any declared top-level security. To remove a top-level security declaration, an empty array can be used.
    serversservers [Server Object] An alternative server array to service this operation. If an alternative server object is specified at the Path Item Object or Root level, it will be overridden by this value.
    -

    This object MAY be extended with Specification Extensions.

    -

    Operation Object Example

    +

    This object MAY be extended with Specification Extensions.

    +
    4.7.10.2 Operation Object Example
    
     {
    -  "tags": [
    -    "pet"
    +  "tags": [
    +    "pet"
       ],
    -  "summary": "Updates a pet in the store with form data",
    -  "operationId": "updatePetWithForm",
    -  "parameters": [
    +  "summary": "Updates a pet in the store with form data",
    +  "operationId": "updatePetWithForm",
    +  "parameters": [
         {
    -      "name": "petId",
    -      "in": "path",
    -      "description": "ID of pet that needs to be updated",
    -      "required": true,
    -      "schema": {
    -        "type": "string"
    +      "name": "petId",
    +      "in": "path",
    +      "description": "ID of pet that needs to be updated",
    +      "required": true,
    +      "schema": {
    +        "type": "string"
           }
         }
       ],
    -  "requestBody": {
    -    "content": {
    -      "application/x-www-form-urlencoded": {
    -        "schema": {
    -          "type": "object",
    -           "properties": {
    -              "name": {
    -                "description": "Updated name of the pet",
    -                "type": "string"
    +  "requestBody": {
    +    "content": {
    +      "application/x-www-form-urlencoded": {
    +        "schema": {
    +          "type": "object",
    +           "properties": {
    +              "name": {
    +                "description": "Updated name of the pet",
    +                "type": "string"
                   },
    -              "status": {
    -                "description": "Updated status of the pet",
    -                "type": "string"
    +              "status": {
    +                "description": "Updated status of the pet",
    +                "type": "string"
                  }
                },
    -        "required": ["status"]
    +        "required": ["status"]
             }
           }
         }
       },
    -  "responses": {
    -    "200": {
    -      "description": "Pet updated.",
    -      "content": {
    -        "application/json": {},
    -        "application/xml": {}
    +  "responses": {
    +    "200": {
    +      "description": "Pet updated.",
    +      "content": {
    +        "application/json": {},
    +        "application/xml": {}
           }
         },
    -    "405": {
    -      "description": "Invalid input",
    -      "content": {
    -        "application/json": {},
    -        "application/xml": {}
    +    "405": {
    +      "description": "Invalid input",
    +      "content": {
    +        "application/json": {},
    +        "application/xml": {}
           }
         }
       },
    -  "security": [
    +  "security": [
         {
    -      "petstore_auth": [
    -        "write:pets",
    -        "read:pets"
    +      "petstore_auth": [
    +        "write:pets",
    +        "read:pets"
           ]
         }
       ]
    @@ -1133,7 +1349,7 @@
         type: string
     requestBody:
       content:
    -    'application/x-www-form-urlencoded':
    +    'application/x-www-form-urlencoded':
           schema:
            properties:
               name:
    @@ -1145,24 +1361,24 @@
            required:
              - status
     responses:
    -  '200':
    +  '200':
         description: Pet updated.
         content:
    -      'application/json': {}
    -      'application/xml': {}
    -  '405':
    +      'application/json': {}
    +      'application/xml': {}
    +  '405':
         description: Invalid input
         content:
    -      'application/json': {}
    -      'application/xml': {}
    +      'application/json': {}
    +      'application/xml': {}
     security:
     - petstore_auth:
       - write:pets
       - read:pets
     
    -

    External Documentation Object

    +

    4.7.11 External Documentation Object

    Allows referencing an external resource for extended documentation.

    -

    Fixed Fields

    +
    4.7.11.1 Fixed Fields
    @@ -1173,41 +1389,41 @@ - + - + - + - +
    descriptiondescription stringA short description of the target documentation. CommonMark syntax MAY be used for rich text representation.A short description of the target documentation. CommonMark syntax MAY be used for rich text representation.
    urlurl stringREQUIRED. The URL for the target documentation. Value MUST be in the format of a URL.REQUIRED. The URL for the target documentation. Value MUST be in the format of a URL.
    -

    This object MAY be extended with Specification Extensions.

    -

    External Documentation Object Example

    +

    This object MAY be extended with Specification Extensions.

    +
    4.7.11.2 External Documentation Object Example
    
     {
    -  "description": "Find more info here",
    -  "url": "https://example.com"
    +  "description": "Find more info here",
    +  "url": "https://example.com"
     }
     
    
     description: Find more info here
     url: https://example.com
     
    -

    Parameter Object

    +

    4.7.12 Parameter Object

    Describes a single operation parameter.

    A unique parameter is defined by a combination of a name and location.

    -

    Parameter Locations

    +
    4.7.12.1 Parameter Locations

    There are four possible parameter locations specified by the in field:

    • path - Used together with Path Templating, where the parameter value is actually part of the operation’s URL. This does not include the host or base path of the API. For example, in /items/{itemId}, the path parameter is itemId.
    • query - Parameters that are appended to the URL. For example, in /items?id=###, the query parameter is id.
    • -
    • header - Custom headers that are expected as part of the request. Note that [[!RFC7230]] states header names are case insensitive.
    • +
    • header - Custom headers that are expected as part of the request. Note that [RFC7230] states header names are case insensitive.
    • cookie - Used to pass a specific cookie value to the API.
    -

    Fixed Fields

    +
    4.7.12.2 Fixed Fields
    @@ -1218,34 +1434,34 @@ - + - + - + - + - + - + - + - + - + - + - + - +
    namename stringREQUIRED. The name of the parameter. Parameter names are case sensitive.
    • If in is "path", the name field MUST correspond to the associated path segment from the path field in the Paths Object. See Path Templating for further information.
    • If in is "header" and the name field is "Accept", "Content-Type" or "Authorization", the parameter definition SHALL be ignored.
    • For all other cases, the name corresponds to the parameter name used by the in property.
    REQUIRED. The name of the parameter. Parameter names are case sensitive.
    • If in is "path", the name field MUST correspond to the associated path segment from the path field in the Paths Object. See Path Templating for further information.
    • If in is "header" and the name field is "Accept", "Content-Type" or "Authorization", the parameter definition SHALL be ignored.
    • For all other cases, the name corresponds to the parameter name used by the in property.
    inin stringREQUIRED. The location of the parameter. Possible values are “query”, “header”, “path” or “cookie”.REQUIRED. The location of the parameter. Possible values are “query”, “header”, “path” or “cookie”.
    descriptiondescription stringA brief description of the parameter. This could contain examples of use. CommonMark syntax MAY be used for rich text representation.A brief description of the parameter. This could contain examples of use. CommonMark syntax MAY be used for rich text representation.
    requiredrequired booleanDetermines whether this parameter is mandatory. If the parameter location is “path”, this property is REQUIRED and its value MUST be true. Otherwise, the property MAY be included and its default value is false.Determines whether this parameter is mandatory. If the parameter location is “path”, this property is REQUIRED and its value MUST be true. Otherwise, the property MAY be included and its default value is false.
    deprecated deprecated booleanSpecifies that a parameter is deprecated and SHOULD be transitioned out of usage.Specifies that a parameter is deprecated and SHOULD be transitioned out of usage.
    allowEmptyValue allowEmptyValue booleanSets the ability to pass empty-valued parameters. This is valid only for query parameters and allows sending a parameter with an empty value. Default value is false. If style is used, and if behavior is n/a (cannot be serialized), the value of allowEmptyValue SHALL be ignored.Sets the ability to pass empty-valued parameters. This is valid only for query parameters and allows sending a parameter with an empty value. Default value is false. If style is used, and if behavior is n/a (cannot be serialized), the value of allowEmptyValue SHALL be ignored.
    @@ -1261,40 +1477,40 @@ - style +style string Describes how the parameter value will be serialized depending on the type of the parameter value. Default values (based on value of in): for query - form; for path - simple; for header - simple; for cookie - form. - explode +explode boolean When this is true, parameter values of type array or object generate separate parameters for each value of the array or key-value pair of the map. For other types of parameters this property has no effect. When style is form, the default value is true. For all other styles, the default value is false. - allowReserved +allowReserved boolean -Determines whether the parameter value SHOULD allow reserved characters, as defined by [[!RFC3986]] :/?#[]@!$&'()*+,;= to be included without percent-encoding. This property only applies to parameters with an in value of query. The default value is false. +Determines whether the parameter value SHOULD allow reserved characters, as defined by [RFC3986] :/?#[]@!$&'()*+,;= to be included without percent-encoding. This property only applies to parameters with an in value of query. The default value is false. - schema +schema Schema Object | Reference Object The schema defining the type used for the parameter. - example +example Any -Example of the media type. The example SHOULD match the specified schema and encoding properties if present. The example object is mutually exclusive of the examples object. Furthermore, if referencing a schema which contains an example, the example value SHALL override the example provided by the schema. To represent examples of media types that cannot naturally be represented in JSON or YAML, a string value can contain the example with escaping where necessary. +Example of the media type. The example SHOULD match the specified schema and encoding properties if present. The example object is mutually exclusive of the examples object. Furthermore, if referencing a schema which contains an example, the example value SHALL override the example provided by the schema. To represent examples of media types that cannot naturally be represented in JSON or YAML, a string value can contain the example with escaping where necessary. - examples +examples Map[ string, Example Object | Reference Object] -Examples of the media type. Each example SHOULD contain a value in the correct format as specified in the parameter encoding. The examples object is mutually exclusive of the example object. Furthermore, if referencing a schema which contains an example, the examples value SHALL override the example provided by the schema. +Examples of the media type. Each example SHOULD contain a value in the correct format as specified in the parameter encoding. The examples object is mutually exclusive of the example object. Furthermore, if referencing a schema which contains an example, the examples value SHALL override the example provided by the schema.

    For more complex scenarios, the content property can define the media type and schema of the parameter. -A parameter MUST contain either a schema property, or a content property, but not both. -When example or examples are provided in conjunction with the schema object, the example MUST follow the prescribed serialization strategy for the parameter.

    +A parameter MUST contain either a schema property, or a content property, but not both. +When example or examples are provided in conjunction with the schema object, the example MUST follow the prescribed serialization strategy for the parameter.

    @@ -1305,13 +1521,13 @@ - + - +
    contentcontent Map[string, Media Type Object]A map containing the representations for the parameter. The key is the media type and the value describes it. The map MUST only contain one entry.A map containing the representations for the parameter. The key is the media type and the value describes it. The map MUST only contain one entry.
    -

    Style Values

    +
    4.7.12.3 Style Values

    In order to support common ways of serializing simple parameters, a set of style values are defined.

    @@ -1327,25 +1543,25 @@ - + - + - + - + @@ -1367,12 +1583,12 @@
    matrix primitive, array, object pathPath-style parameters defined by [[!RFC6570]]Path-style parameters defined by [RFC6570]
    label primitive, array, object pathLabel style parameters defined by [[!RFC6570]]Label style parameters defined by [RFC6570]
    form primitive, array, object query, cookieForm style parameters defined by [[!RFC6570]]. This option replaces collectionFormat with a csv (when explode is false) or multi (when explode is true) value from OpenAPI 2.0.Form style parameters defined by [RFC6570]. This option replaces collectionFormat with a csv (when explode is false) or multi (when explode is true) value from OpenAPI 2.0.
    simple array path, headerSimple style parameters defined by [[!RFC6570]]. This option replaces collectionFormat with a csv value from OpenAPI 2.0.Simple style parameters defined by [RFC6570]. This option replaces collectionFormat with a csv value from OpenAPI 2.0.
    spaceDelimited
    -

    Style Examples

    +
    4.7.12.4 Style Examples

    Assume a parameter named color has one of the following values:

    -
    
    -   string -> "blue"
    -   array -> ["blue","black","brown"]
    -   object -> { "R": 100, "G": 200, "B": 150 }
    +
    
    +   string -> "blue"
    +   array -> ["blue","black","brown"]
    +   object -> { "R": 100, "G": 200, "B": 150 }
     

    The following table shows examples of rendering differences for each value.

    @@ -1473,27 +1689,27 @@ - +
    n/a n/a n/acolor[R]=100&color[G]=200&color[B]=150color[R]=100&color[G]=200&color[B]=150
    -

    This object MAY be extended with Specification Extensions.

    -

    Parameter Object Examples

    +

    This object MAY be extended with Specification Extensions.

    +
    4.7.12.5 Parameter Object Examples

    A header parameter with an array of 64 bit integer numbers:

    
     {
    -  "name": "token",
    -  "in": "header",
    -  "description": "token to be passed as a header",
    -  "required": true,
    -  "schema": {
    -    "type": "array",
    -    "items": {
    -      "type": "integer",
    -      "format": "int64"
    +  "name": "token",
    +  "in": "header",
    +  "description": "token to be passed as a header",
    +  "required": true,
    +  "schema": {
    +    "type": "array",
    +    "items": {
    +      "type": "integer",
    +      "format": "int64"
         }
       },
    -  "style": "simple"
    +  "style": "simple"
     }
     
    
    @@ -1511,12 +1727,12 @@
     

    A path parameter of a string value:

    
     {
    -  "name": "username",
    -  "in": "path",
    -  "description": "username to fetch",
    -  "required": true,
    -  "schema": {
    -    "type": "string"
    +  "name": "username",
    +  "in": "path",
    +  "description": "username to fetch",
    +  "required": true,
    +  "schema": {
    +    "type": "string"
       }
     }
     
    @@ -1531,18 +1747,18 @@

    An optional query parameter of a string value, allowing multiple values by repeating the query parameter:

    
     {
    -  "name": "id",
    -  "in": "query",
    -  "description": "ID of the object to fetch",
    -  "required": false,
    -  "schema": {
    -    "type": "array",
    -    "items": {
    -      "type": "string"
    +  "name": "id",
    +  "in": "query",
    +  "description": "ID of the object to fetch",
    +  "required": false,
    +  "schema": {
    +    "type": "array",
    +    "items": {
    +      "type": "string"
         }
       },
    -  "style": "form",
    -  "explode": true
    +  "style": "form",
    +  "explode": true
     }
     
    
    @@ -1560,15 +1776,15 @@
     

    A free-form query parameter, allowing undefined parameters of a specific type:

    
     {
    -  "in": "query",
    -  "name": "freeForm",
    -  "schema": {
    -    "type": "object",
    -    "additionalProperties": {
    -      "type": "integer"
    +  "in": "query",
    +  "name": "freeForm",
    +  "schema": {
    +    "type": "object",
    +    "additionalProperties": {
    +      "type": "integer"
         },
       },
    -  "style": "form"
    +  "style": "form"
     }
     
    
    @@ -1583,22 +1799,22 @@
     

    A complex parameter using content to define serialization:

    
     {
    -  "in": "query",
    -  "name": "coordinates",
    -  "content": {
    -    "application/json": {
    -      "schema": {
    -        "type": "object",
    -        "required": [
    -          "lat",
    -          "long"
    +  "in": "query",
    +  "name": "coordinates",
    +  "content": {
    +    "application/json": {
    +      "schema": {
    +        "type": "object",
    +        "required": [
    +          "lat",
    +          "long"
             ],
    -        "properties": {
    -          "lat": {
    -            "type": "number"
    +        "properties": {
    +          "lat": {
    +            "type": "number"
               },
    -          "long": {
    -            "type": "number"
    +          "long": {
    +            "type": "number"
               }
             }
           }
    @@ -1622,9 +1838,9 @@
             long:
               type: number
     
    -

    Request Body Object

    +

    4.7.13 Request Body Object

    Describes a single request body.

    -

    Fixed Fields

    +
    4.7.13.1 Fixed Fields
    @@ -1635,64 +1851,64 @@ - + - + - + - + - +
    descriptiondescription stringA brief description of the request body. This could contain examples of use. CommonMark syntax MAY be used for rich text representation.A brief description of the request body. This could contain examples of use. CommonMark syntax MAY be used for rich text representation.
    contentcontent Map[string, Media Type Object]REQUIRED. The content of the request body. The key is a media type or media type range and the value describes it. For requests that match multiple keys, only the most specific key is applicable. e.g. text/plain overrides text/*REQUIRED. The content of the request body. The key is a media type or media type range and the value describes it. For requests that match multiple keys, only the most specific key is applicable. e.g. text/plain overrides text/*
    requiredrequired boolean Determines if the request body is required in the request. Defaults to false.
    -

    This object MAY be extended with Specification Extensions.

    -

    Request Body Examples

    +

    This object MAY be extended with Specification Extensions.

    +
    4.7.13.2 Request Body Examples

    A request body with a referenced model definition.

    
     {
    -  "description": "user to add to the system",
    -  "content": {
    -    "application/json": {
    -      "schema": {
    -        "$ref": "#/components/schemas/User"
    +  "description": "user to add to the system",
    +  "content": {
    +    "application/json": {
    +      "schema": {
    +        "$ref": "#/components/schemas/User"
           },
    -      "examples": {
    -          "user" : {
    -            "summary": "User Example",
    -            "externalValue": "http://foo.bar/examples/user-example.json"
    +      "examples": {
    +          "user" : {
    +            "summary": "User Example",
    +            "externalValue": "http://foo.bar/examples/user-example.json"
               }
             }
         },
    -    "application/xml": {
    -      "schema": {
    -        "$ref": "#/components/schemas/User"
    +    "application/xml": {
    +      "schema": {
    +        "$ref": "#/components/schemas/User"
           },
    -      "examples": {
    -          "user" : {
    -            "summary": "User example in XML",
    -            "externalValue": "http://foo.bar/examples/user-example.xml"
    +      "examples": {
    +          "user" : {
    +            "summary": "User example in XML",
    +            "externalValue": "http://foo.bar/examples/user-example.xml"
               }
             }
         },
    -    "text/plain": {
    -      "examples": {
    -        "user" : {
    -            "summary": "User example in Plain text",
    -            "externalValue": "http://foo.bar/examples/user-example.txt"
    +    "text/plain": {
    +      "examples": {
    +        "user" : {
    +            "summary": "User example in Plain text",
    +            "externalValue": "http://foo.bar/examples/user-example.txt"
             }
           }
         },
    -    "*/*": {
    -      "examples": {
    -        "user" : {
    -            "summary": "User example in other format",
    -            "externalValue": "http://foo.bar/examples/user-example.whatever"
    +    "*/*": {
    +      "examples": {
    +        "user" : {
    +            "summary": "User example in other format",
    +            "externalValue": "http://foo.bar/examples/user-example.whatever"
             }
           }
         }
    @@ -1702,41 +1918,41 @@
     
    
     description: user to add to the system
     content:
    -  'application/json':
    +  'application/json':
         schema:
    -      $ref: '#/components/schemas/User'
    +      $ref: '#/components/schemas/User'
         examples:
           user:
             summary: User Example
    -        externalValue: 'http://foo.bar/examples/user-example.json'
    -  'application/xml':
    +        externalValue: 'http://foo.bar/examples/user-example.json'
    +  'application/xml':
         schema:
    -      $ref: '#/components/schemas/User'
    +      $ref: '#/components/schemas/User'
         examples:
           user:
             summary: User Example in XML
    -        externalValue: 'http://foo.bar/examples/user-example.xml'
    -  'text/plain':
    +        externalValue: 'http://foo.bar/examples/user-example.xml'
    +  'text/plain':
         examples:
           user:
             summary: User example in text plain format
    -        externalValue: 'http://foo.bar/examples/user-example.txt'
    -  '*/*':
    +        externalValue: 'http://foo.bar/examples/user-example.txt'
    +  '*/*':
         examples:
           user:
             summary: User example in other format
    -        externalValue: 'http://foo.bar/examples/user-example.whatever'
    +        externalValue: 'http://foo.bar/examples/user-example.whatever'
     

    A body parameter that is an array of string values:

    
     {
    -  "description": "user to add to the system",
    -  "content": {
    -    "text/plain": {
    -      "schema": {
    -        "type": "array",
    -        "items": {
    -          "type": "string"
    +  "description": "user to add to the system",
    +  "content": {
    +    "text/plain": {
    +      "schema": {
    +        "type": "array",
    +        "items": {
    +          "type": "string"
             }
           }
         }
    @@ -1753,9 +1969,9 @@
           items:
             type: string
     
    -

    Media Type Object

    +

    4.7.14 Media Type Object

    Each Media Type Object provides schema and examples for the media type identified by its key.

    -

    Fixed Fields

    +
    4.7.14.1 Fixed Fields
    @@ -1766,58 +1982,58 @@ - + - + - + - + - + - + - +
    schemaschema Schema Object | Reference Object The schema defining the type used for the request body.
    exampleexample AnyExample of the media type. The example object SHOULD be in the correct format as specified by the media type. The example object is mutually exclusive of the examples object. Furthermore, if referencing a schema which contains an example, the example value SHALL override the example provided by the schema.Example of the media type. The example object SHOULD be in the correct format as specified by the media type. The example object is mutually exclusive of the examples object. Furthermore, if referencing a schema which contains an example, the example value SHALL override the example provided by the schema.
    examplesexamples Map[ string, Example Object | Reference Object]Examples of the media type. Each example object SHOULD match the media type and specified schema if present. The examples object is mutually exclusive of the example object. Furthermore, if referencing a schema which contains an example, the examples value SHALL override the example provided by the schema.Examples of the media type. Each example object SHOULD match the media type and specified schema if present. The examples object is mutually exclusive of the example object. Furthermore, if referencing a schema which contains an example, the examples value SHALL override the example provided by the schema.
    encodingencoding Map[string, Encoding Object]A map between a property name and its encoding information. The key, being the property name, MUST exist in the schema as a property. The encoding object SHALL only apply to requestBody objects when the media type is multipart or application/x-www-form-urlencoded.A map between a property name and its encoding information. The key, being the property name, MUST exist in the schema as a property. The encoding object SHALL only apply to requestBody objects when the media type is multipart or application/x-www-form-urlencoded.
    -

    This object MAY be extended with Specification Extensions.

    -

    Media Type Examples

    +

    This object MAY be extended with Specification Extensions.

    +
    4.7.14.2 Media Type Examples
    
     {
    -  "application/json": {
    -    "schema": {
    -         "$ref": "#/components/schemas/Pet"
    +  "application/json": {
    +    "schema": {
    +         "$ref": "#/components/schemas/Pet"
         },
    -    "examples": {
    -      "cat" : {
    -        "summary": "An example of a cat",
    -        "value":
    +    "examples": {
    +      "cat" : {
    +        "summary": "An example of a cat",
    +        "value":
               {
    -            "name": "Fluffy",
    -            "petType": "Cat",
    -            "color": "White",
    -            "gender": "male",
    -            "breed": "Persian"
    +            "name": "Fluffy",
    +            "petType": "Cat",
    +            "color": "White",
    +            "gender": "male",
    +            "breed": "Persian"
               }
           },
    -      "dog": {
    -        "summary": "An example of a dog with a cat's name",
    -        "value" :  {
    -          "name": "Puma",
    -          "petType": "Dog",
    -          "color": "Black",
    -          "gender": "Female",
    -          "breed": "Mixed"
    +      "dog": {
    +        "summary": "An example of a dog with a cat's name",
    +        "value" :  {
    +          "name": "Puma",
    +          "petType": "Dog",
    +          "color": "Black",
    +          "gender": "Female",
    +          "breed": "Mixed"
             },
    -      "frog": {
    -          "$ref": "#/components/examples/frog-example"
    +      "frog": {
    +          "$ref": "#/components/examples/frog-example"
             }
           }
         }
    @@ -1827,7 +2043,7 @@
     
    
     application/json:
       schema:
    -    $ref: "#/components/schemas/Pet"
    +    $ref: "#/components/schemas/Pet"
       examples:
         cat:
           summary: An example of a cat
    @@ -1838,7 +2054,7 @@
             gender: male
             breed: Persian
         dog:
    -      summary: An example of a dog with a cat's name
    +      summary: An example of a dog with a cat's name
           value:
             name: Puma
             petType: Dog
    @@ -1846,9 +2062,9 @@
             gender: Female
             breed: Mixed
         frog:
    -      $ref: "#/components/examples/frog-example"
    +      $ref: "#/components/examples/frog-example"
     
    -

    Considerations for File Uploads

    +
    4.7.14.3 Considerations for File Uploads

    In contrast with the 2.0 specification, file input/output content in OpenAPI is described with the same semantics as any other schema type. Specifically:

    
     # content transferred with base64 encoding
    @@ -1874,29 +2090,29 @@
             type: string
             format: binary
     
    -

    In addition, specific media types MAY be specified:

    +

    In addition, specific media types MAY be specified:

    
     # multiple, specific media types may be specified:
     requestBody:
       content:
           # a binary file of type png or jpeg
    -    'image/jpeg':
    +    'image/jpeg':
           schema:
             type: string
             format: binary
    -    'image/png':
    +    'image/png':
           schema:
             type: string
             format: binary       
     
    -

    To upload multiple files, a multipart media type MUST be used:

    +

    To upload multiple files, a multipart media type MUST be used:

    
     requestBody:
       content:
         multipart/form-data:
           schema:
             properties:
    -          # The property name 'file' will be used for all files.
    +          # The property name 'file' will be used for all files.
               file:
                 type: array
                 items:
    @@ -1904,8 +2120,8 @@
                   format: binary
     
     
    -

    Support for x-www-form-urlencoded Request Bodies

    -

    To submit content using form url encoding via [[!RFC1866]], the following +

    4.7.14.4 Support for x-www-form-urlencoded Request Bodies
    +

    To submit content using form url encoding via [RFC1866], the following definition may be used:

    
     requestBody:
    @@ -1922,11 +2138,11 @@
                 type: object
                 properties: {}
     
    -

    In this example, the contents in the requestBody MUST be stringified per [[!RFC1866]] when passed to the server. In addition, the address field complex object will be stringified.

    +

    In this example, the contents in the requestBody MUST be stringified per [RFC1866] when passed to the server. In addition, the address field complex object will be stringified.

    When passing complex objects in the application/x-www-form-urlencoded content type, the default serialization strategy of such properties is described in the Encoding Object’s style property as form.

    -

    Special Considerations for multipart Content

    -

    It is common to use multipart/form-data as a Content-Type when transferring request bodies to operations. In contrast to 2.0, a schema is REQUIRED to define the input parameters to the operation when using multipart content. This supports complex structures as well as supporting mechanisms for multiple file uploads.

    -

    When passing in multipart types, boundaries MAY be used to separate sections of the content being transferred — thus, the following default Content-Types are defined for multipart:

    +
    4.7.14.5 Special Considerations for multipart Content
    +

    It is common to use multipart/form-data as a Content-Type when transferring request bodies to operations. In contrast to 2.0, a schema is REQUIRED to define the input parameters to the operation when using multipart content. This supports complex structures as well as supporting mechanisms for multiple file uploads.

    +

    When passing in multipart types, boundaries MAY be used to separate sections of the content being transferred — thus, the following default Content-Types are defined for multipart:

    • If the property is a primitive, or an array of primitive values, the default Content-Type is text/plain
    • If the property is complex, or an array of complex values, the default Content-Type is application/json
    • @@ -1960,12 +2176,12 @@ # default Content-Type for arrays is based on the `inner` type (object shown, so `application/json` in this example) type: array items: - type: '#/components/schemas/Address' + type: '#/components/schemas/Address'

      An encoding attribute is introduced to give you control over the serialization of parts of multipart request bodies. This attribute is only applicable to multipart and application/x-www-form-urlencoded request bodies.

      -

    Encoding Object

    +

    4.7.15 Encoding Object

    A single encoding definition applied to a single schema property.

    -

    Fixed Fields

    +
    4.7.15.1 Fixed Fields
    @@ -1976,34 +2192,34 @@ - + - + - + - + - + - + - + - + - +
    contentTypecontentType string The Content-Type for encoding a specific property. Default value depends on the property type: for string with format being binaryapplication/octet-stream; for other primitive types – text/plain; for object - application/json; for array – the default is defined based on the inner type. The value can be a specific media type (e.g. application/json), a wildcard media type (e.g. image/*), or a comma-separated list of the two types.
    headersheaders Map[string, Header Object | Reference Object]A map allowing additional information to be provided as headers, for example Content-Disposition. Content-Type is described separately and SHALL be ignored in this section. This property SHALL be ignored if the request body media type is not a multipart.A map allowing additional information to be provided as headers, for example Content-Disposition. Content-Type is described separately and SHALL be ignored in this section. This property SHALL be ignored if the request body media type is not a multipart.
    stylestyle stringDescribes how a specific property value will be serialized depending on its type. See Parameter Object for details on the style property. The behavior follows the same values as query parameters, including default values. This property SHALL be ignored if the request body media type is not application/x-www-form-urlencoded.Describes how a specific property value will be serialized depending on its type. See Parameter Object for details on the style property. The behavior follows the same values as query parameters, including default values. This property SHALL be ignored if the request body media type is not application/x-www-form-urlencoded.
    explodeexplode booleanWhen this is true, property values of type array or object generate separate parameters for each value of the array, or key-value-pair of the map. For other types of properties this property has no effect. When style is form, the default value is true. For all other styles, the default value is false. This property SHALL be ignored if the request body media type is not application/x-www-form-urlencoded.When this is true, property values of type array or object generate separate parameters for each value of the array, or key-value-pair of the map. For other types of properties this property has no effect. When style is form, the default value is true. For all other styles, the default value is false. This property SHALL be ignored if the request body media type is not application/x-www-form-urlencoded.
    allowReservedallowReserved booleanDetermines whether the parameter value SHOULD allow reserved characters, as defined by [[!RFC3986]] :/?#[]@!$&'()*+,;= to be included without percent-encoding. The default value is false. This property SHALL be ignored if the request body media type is not application/x-www-form-urlencoded.Determines whether the parameter value SHOULD allow reserved characters, as defined by [RFC3986] :/?#[]@!$&'()*+,;= to be included without percent-encoding. The default value is false. This property SHALL be ignored if the request body media type is not application/x-www-form-urlencoded.
    -

    This object MAY be extended with Specification Extensions.

    -

    Encoding Object Example

    +

    This object MAY be extended with Specification Extensions.

    +
    4.7.15.2 Encoding Object Example
    
     requestBody:
       content:
    @@ -2041,16 +2257,16 @@
                   schema:
                     type: integer
     
    -

    Responses Object

    +

    4.7.16 Responses Object

    A container for the expected responses of an operation. The container maps a HTTP response code to the expected response.

    The documentation is not necessarily expected to cover all possible HTTP response codes because they may not be known in advance. However, documentation is expected to cover a successful operation response and any known errors.

    -

    The default MAY be used as a default response object for all HTTP codes +

    The default MAY be used as a default response object for all HTTP codes that are not covered individually by the specification.

    -

    The Responses Object MUST contain at least one response code, and it -SHOULD be the response for a successful operation call.

    -

    Fixed Fields

    +

    The Responses Object MUST contain at least one response code, and it +SHOULD be the response for a successful operation call.

    +
    4.7.16.1 Fixed Fields
    @@ -2061,13 +2277,13 @@ - +
    defaultdefault Response Object | Reference Object The documentation of responses other than the ones declared for specific HTTP response codes. Use this field to cover undeclared responses. A Reference Object can link to a response that the OpenAPI Object’s components/responses section defines.
    -

    Patterned Fields

    +
    4.7.16.2 Patterned Fields
    @@ -2078,33 +2294,33 @@ - + - +
    HTTP Status CodeHTTP Status Code Response Object | Reference ObjectAny HTTP status code can be used as the property name, but only one property per code, to describe the expected response for that HTTP status code. A Reference Object can link to a response that is defined in the OpenAPI Object’s components/responses section. This field MUST be enclosed in quotation marks (for example, “200”) for compatibility between JSON and YAML. To define a range of response codes, this field MAY contain the uppercase wildcard character X. For example, 2XX represents all response codes between [200-299]. The following range definitions are allowed: 1XX, 2XX, 3XX, 4XX, and 5XX. If a response range is defined using an explicit code, the explicit code definition takes precedence over the range definition for that code.Any HTTP status code can be used as the property name, but only one property per code, to describe the expected response for that HTTP status code. A Reference Object can link to a response that is defined in the OpenAPI Object’s components/responses section. This field MUST be enclosed in quotation marks (for example, “200”) for compatibility between JSON and YAML. To define a range of response codes, this field MAY contain the uppercase wildcard character X. For example, 2XX represents all response codes between [200-299]. The following range definitions are allowed: 1XX, 2XX, 3XX, 4XX, and 5XX. If a response range is defined using an explicit code, the explicit code definition takes precedence over the range definition for that code.
    -

    This object MAY be extended with Specification Extensions.

    -

    Responses Object Example

    +

    This object MAY be extended with Specification Extensions.

    +
    4.7.16.3 Responses Object Example

    A 200 response for a successful operation and a default response for others (implying an error):

    
     {
    -  "200": {
    -    "description": "a pet to be returned",
    -    "content": {
    -      "application/json": {
    -        "schema": {
    -          "$ref": "#/components/schemas/Pet"
    +  "200": {
    +    "description": "a pet to be returned",
    +    "content": {
    +      "application/json": {
    +        "schema": {
    +          "$ref": "#/components/schemas/Pet"
             }
           }
         }
       },
    -  "default": {
    -    "description": "Unexpected error",
    -    "content": {
    -      "application/json": {
    -        "schema": {
    -          "$ref": "#/components/schemas/ErrorModel"
    +  "default": {
    +    "description": "Unexpected error",
    +    "content": {
    +      "application/json": {
    +        "schema": {
    +          "$ref": "#/components/schemas/ErrorModel"
             }
           }
         }
    @@ -2112,23 +2328,23 @@
     }
     
    
    -'200':
    +'200':
       description: a pet to be returned
       content:
         application/json:
           schema:
    -        $ref: '#/components/schemas/Pet'
    +        $ref: '#/components/schemas/Pet'
     default:
       description: Unexpected error
       content:
         application/json:
           schema:
    -        $ref: '#/components/schemas/ErrorModel'
    +        $ref: '#/components/schemas/ErrorModel'
     
    -

    Response Object

    +

    4.7.17 Response Object

    Describes a single response from an API Operation, including design-time, static links to operations based on the response.

    -

    Fixed Fields

    +
    4.7.17.1 Fixed Fields
    @@ -2139,39 +2355,39 @@ - + - + - + - + - + - +
    descriptiondescription stringREQUIRED. A short description of the response. CommonMark syntax MAY be used for rich text representation.REQUIRED. A short description of the response. CommonMark syntax MAY be used for rich text representation.
    headersheaders Map[string, Header Object | Reference Object]Maps a header name to its definition. [[!RFC7230]] states header names are case insensitive. If a response header is defined with the name "Content-Type", it SHALL be ignored.Maps a header name to its definition. [RFC7230] states header names are case insensitive. If a response header is defined with the name "Content-Type", it SHALL be ignored.
    contentcontent Map[string, Media Type Object] A map containing descriptions of potential response payloads. The key is a media type or media type range and the value describes it. For responses that match multiple keys, only the most specific key is applicable. e.g. text/plain overrides text/*
    linkslinks Map[string, Link Object | Reference Object] A map of operations links that can be followed from the response. The key of the map is a short name for the link, following the naming constraints of the names for Component Objects.
    -

    This object MAY be extended with Specification Extensions.

    -

    Response Object Examples

    +

    This object MAY be extended with Specification Extensions.

    +
    4.7.17.2 Response Object Examples

    Response of an array of a complex type:

    
     {
    -  "description": "A complex object array response",
    -  "content": {
    -    "application/json": {
    -      "schema": {
    -        "type": "array",
    -        "items": {
    -          "$ref": "#/components/schemas/VeryComplexType"
    +  "description": "A complex object array response",
    +  "content": {
    +    "application/json": {
    +      "schema": {
    +        "type": "array",
    +        "items": {
    +          "$ref": "#/components/schemas/VeryComplexType"
             }
           }
         }
    @@ -2185,16 +2401,16 @@
         schema:
           type: array
           items:
    -        $ref: '#/components/schemas/VeryComplexType'
    +        $ref: '#/components/schemas/VeryComplexType'
     

    Response with a string type:

    
     {
    -  "description": "A simple string response",
    -  "content": {
    -    "text/plain": {
    -      "schema": {
    -        "type": "string"
    +  "description": "A simple string response",
    +  "content": {
    +    "text/plain": {
    +      "schema": {
    +        "type": "string"
           }
         }
       }
    @@ -2211,31 +2427,31 @@
     

    Plain text response with headers:

    
     {
    -  "description": "A simple string response",
    -  "content": {
    -    "text/plain": {
    -      "schema": {
    -        "type": "string"
    +  "description": "A simple string response",
    +  "content": {
    +    "text/plain": {
    +      "schema": {
    +        "type": "string"
           }
         }
       },
    -  "headers": {
    -    "X-Rate-Limit-Limit": {
    -      "description": "The number of allowed requests in the current period",
    -      "schema": {
    -        "type": "integer"
    +  "headers": {
    +    "X-Rate-Limit-Limit": {
    +      "description": "The number of allowed requests in the current period",
    +      "schema": {
    +        "type": "integer"
           }
         },
    -    "X-Rate-Limit-Remaining": {
    -      "description": "The number of remaining requests in the current period",
    -      "schema": {
    -        "type": "integer"
    +    "X-Rate-Limit-Remaining": {
    +      "description": "The number of remaining requests in the current period",
    +      "schema": {
    +        "type": "integer"
           }
         },
    -    "X-Rate-Limit-Reset": {
    -      "description": "The number of seconds left in the current period",
    -      "schema": {
    -        "type": "integer"
    +    "X-Rate-Limit-Reset": {
    +      "description": "The number of seconds left in the current period",
    +      "schema": {
    +        "type": "integer"
           }
         }
       }
    @@ -2247,7 +2463,7 @@
       text/plain:
         schema:
           type: string
    -    example: 'whoa!'
    +    example: 'whoa!'
     headers:
       X-Rate-Limit-Limit:
         description: The number of allowed requests in the current period
    @@ -2265,17 +2481,17 @@
     

    Response with no return value:

    
     {
    -  "description": "object created"
    +  "description": "object created"
     }
     
    
     description: object created
     
    -

    Callback Object

    +

    4.7.18 Callback Object

    A map of possible out-of band callbacks related to the parent operation. Each value in the map is a Path Item Object that describes a set of requests that may be initiated by the API provider and the expected responses. The key value used to identify the callback object is an expression, evaluated at runtime, that identifies a URL to use for the callback operation.

    -

    Patterned Fields

    +
    4.7.18.1 Patterned Fields
    @@ -2286,18 +2502,18 @@ - +
    {expression}{expression} Path Item Object A Path Item Object used to define a callback request and expected responses. A complete example is available.
    -

    This object MAY be extended with Specification Extensions.

    -

    Key Expression

    +

    This object MAY be extended with Specification Extensions.

    +
    4.7.18.2 Key Expression

    The key that identifies the Path Item Object is a runtime expression that can be evaluated in the context of a runtime HTTP request/response to identify the URL to be used for the callback request. A simple example might be $request.body#/url. However, using a runtime expression the complete HTTP message can be accessed. -This includes accessing any part of a body that a JSON Pointer [[!RFC6901]] can reference.

    +This includes accessing any part of a body that a JSON Pointer [RFC6901] can reference.

    For example, given the following HTTP request:

    
     POST /subscribe/myevent?queryUrl=http://clientdomain.com/stillrunning HTTP/1.1
    @@ -2306,11 +2522,11 @@
     Content-Length: 187
     
     {
    -  "failedUrl" : "http://clientdomain.com/failed",
    -  "successUrls" : [
    -    "http://clientdomain.com/fast",
    -    "http://clientdomain.com/medium",
    -    "http://clientdomain.com/slow"
    +  "failedUrl" : "http://clientdomain.com/failed",
    +  "successUrls" : [
    +    "http://clientdomain.com/fast",
    +    "http://clientdomain.com/medium",
    +    "http://clientdomain.com/slow"
       ]
     }
     
    @@ -2360,24 +2576,24 @@
     
     
     
    -

    Callback Object Example

    +
    4.7.18.3 Callback Object Example

    The following example shows a callback to the URL specified by the id and email property in the request body.

    
     myWebhook:
    -  'http://notificationServer.com?transactionId={$request.body#/id}&email={$request.body#/email}':
    +  'http://notificationServer.com?transactionId={$request.body#/id}&email={$request.body#/email}':
         post:
           requestBody:
             description: Callback payload
             content:
    -          'application/json':
    +          'application/json':
                 schema:
    -              $ref: '#/components/schemas/SomePayload'
    +              $ref: '#/components/schemas/SomePayload'
           responses:
    -        '200':
    +        '200':
               description: webhook successfully processed and no retries will be performed
     
    -

    Example Object

    -

    Fixed Fields

    +

    4.7.19 Example Object

    +
    4.7.19.1 Fixed Fields
    @@ -2388,32 +2604,32 @@ - + - + - + - + - +
    summarysummary string Short description for the example.
    descriptiondescription stringLong description for the example. CommonMark syntax MAY be used for rich text representation.Long description for the example. CommonMark syntax MAY be used for rich text representation.
    valuevalue Any Embedded literal example. The value field and externalValue field are mutually exclusive. To represent examples of media types that cannot naturally represented in JSON or YAML, use a string value to contain the example, escaping where necessary.
    externalValueexternalValue string A URL that points to the literal example. This provides the capability to reference examples that cannot easily be included in JSON or YAML documents. The value field and externalValue field are mutually exclusive.
    -

    This object MAY be extended with Specification Extensions.

    +

    This object MAY be extended with Specification Extensions.

    In all cases, the example value is expected to be compatible with the type schema -of its associated value. Tooling implementations MAY choose to +of its associated value. Tooling implementations MAY choose to validate compatibility automatically, and reject the example value(s) if incompatible.

    -

    Example Object Example

    +
    4.7.19.2 Example Object Example
    
     # in a model
     schemas:
    @@ -2427,57 +2643,57 @@
     # in a request body:
       requestBody:
         content:
    -      'application/json':
    +      'application/json':
             schema:
    -          $ref: '#/components/schemas/Address'
    +          $ref: '#/components/schemas/Address'
             examples:
               foo:
                 summary: A foo example
    -            value: {"foo": "bar"}
    +            value: {"foo": "bar"}
               bar:
                 summary: A bar example
    -            value: {"bar": "baz"}
    -      'application/xml':
    +            value: {"bar": "baz"}
    +      'application/xml':
             examples:
               xmlExample:
                 summary: This is an example in XML
    -            externalValue: 'http://example.org/examples/address-example.xml'
    -      'text/plain':
    +            externalValue: 'http://example.org/examples/address-example.xml'
    +      'text/plain':
             examples:
               textExample:
                 summary: This is a text example
    -            externalValue: 'http://foo.bar/examples/address-example.txt'
    +            externalValue: 'http://foo.bar/examples/address-example.txt'
     
     
     # in a parameter
       parameters:
    -    - name: 'zipCode'
    -      in: 'query'
    +    - name: 'zipCode'
    +      in: 'query'
           schema:
    -        type: 'string'
    -        format: 'zip-code'
    +        type: 'string'
    +        format: 'zip-code'
             examples:
               zip-example:
    -            $ref: '#/components/examples/zip-example'
    +            $ref: '#/components/examples/zip-example'
     
     # in a response
       responses:
    -    '200':
    +    '200':
           description: your car appointment has been booked
           content:
             application/json:
               schema:
    -            $ref: '#/components/schemas/SuccessResponse'
    +            $ref: '#/components/schemas/SuccessResponse'
               examples:
                 confirmation-success:
    -              $ref: '#/components/examples/confirmation-success'
    +              $ref: '#/components/examples/confirmation-success'
     
    -

    Link Object

    +

    4.7.21 Header Object

    The Header Object follows the structure of the Parameter Object with the following changes:

      -
    1. name MUST NOT be specified, it is given in the corresponding headers map.
    2. -
    3. in MUST NOT be specified, it is implicitly in header.
    4. -
    5. All traits that are affected by the location MUST be applicable to a location of header (for example, style).
    6. +
    7. name MUST NOT be specified, it is given in the corresponding headers map.
    8. +
    9. in MUST NOT be specified, it is implicitly in header.
    10. +
    11. All traits that are affected by the location MUST be applicable to a location of header (for example, style).
    -

    Header Object Example

    +
    4.7.21.1 Header Object Example

    A simple header of type integer:

    
     {
    -  "description": "The number of allowed requests in the current period",
    -  "schema": {
    -    "type": "integer"
    +  "description": "The number of allowed requests in the current period",
    +  "schema": {
    +    "type": "integer"
       }
     }
     
    @@ -2695,10 +2911,10 @@ schema: type: integer
    -

    Tag Object

    +

    4.7.22 Tag Object

    Adds metadata to a single tag that is used by the Operation Object. It is not mandatory to have a Tag Object per tag defined in the Operation Object instances.

    -

    Fixed Fields

    +
    4.7.22.1 Fixed Fields
    @@ -2709,41 +2925,41 @@ - + - + - + - + - +
    namename stringREQUIRED. The name of the tag.REQUIRED. The name of the tag.
    descriptiondescription stringA short description for the tag. CommonMark syntax MAY be used for rich text representation.A short description for the tag. CommonMark syntax MAY be used for rich text representation.
    externalDocsexternalDocs External Documentation Object Additional external documentation for this tag.
    -

    This object MAY be extended with Specification Extensions.

    -

    Tag Object Example

    +

    This object MAY be extended with Specification Extensions.

    +
    4.7.22.2 Tag Object Example
    
     {
    -	"name": "pet",
    -	"description": "Pets operations"
    +	"name": "pet",
    +	"description": "Pets operations"
     }
     
    
     name: pet
     description: Pets operations
     
    -

    Examples Object

    -

    In an example, a JSON Reference MAY be used, with the +

    4.7.23 Examples Object

    +

    In an example, a JSON Reference MAY be used, with the explicit restriction that examples having a JSON format with object named $ref are not allowed. Therefore, that example, structurally, can be either a string primitive or an object, similar to additionalProperties.

    In all cases, the payload is expected to be compatible with the type schema -for the associated value. Tooling implementations MAY choose to +for the associated value. Tooling implementations MAY choose to validate compatibility automatically, and reject the example value(s) if they are incompatible.

    
    @@ -2758,49 +2974,49 @@
     # in a request body, note the plural `examples`
       requestBody:
         content:
    -      'application/json':
    +      'application/json':
             schema:
    -          $ref: '#/components/schemas/Address'
    +          $ref: '#/components/schemas/Address'
             examples:
               foo:
    -            value: {"foo": "bar"}
    +            value: {"foo": "bar"}
               bar:
    -            value: {"bar": "baz"}
    -      'application/xml':
    +            value: {"bar": "baz"}
    +      'application/xml':
             examples:
               xml:
    -            externalValue: 'http://foo.bar/examples/address-example.xml'
    -      'text/plain':
    +            externalValue: 'http://foo.bar/examples/address-example.xml'
    +      'text/plain':
             examples:
               text:
    -            externalValue: 'http://foo.bar/examples/address-example.txt'
    +            externalValue: 'http://foo.bar/examples/address-example.txt'
            
     # in a parameter
       parameters:
    -    - name: 'zipCode'
    -      in: 'query'
    +    - name: 'zipCode'
    +      in: 'query'
           schema:
    -        type: 'string'
    -        format: 'zip-code'
    +        type: 'string'
    +        format: 'zip-code'
             example:
    -          $ref: 'http://foo.bar#/examples/zip-example'
    +          $ref: 'http://foo.bar#/examples/zip-example'
     
     # in a response, note the singular `example`:
       responses:
    -    '200':
    +    '200':
           description: your car appointment has been booked
           content:
             application/json:
               schema:
    -            $ref: '#/components/schemas/SuccessResponse'
    +            $ref: '#/components/schemas/SuccessResponse'
               example:
                 $ref: http://foo.bar#/examples/address-example.json
     
    -

    Reference Object

    +

    4.7.24 Reference Object

    A simple object to allow referencing other components in the specification, internally and externally.

    The Reference Object is defined by JSON Reference and follows the same structure, behavior and rules.

    For this specification, reference resolution is accomplished as defined by the JSON Reference specification and not by the JSON Schema specification.

    -

    Fixed Fields

    +
    4.7.24.1 Fixed Fields
    @@ -2811,47 +3027,47 @@ - + - +
    $ref$ref stringREQUIRED. The reference string.REQUIRED. The reference string.
    -

    This object cannot be extended with additional properties and any properties added SHALL be ignored.

    -

    Reference Object Example

    +

    This object cannot be extended with additional properties and any properties added SHALL be ignored.

    +
    4.7.24.2 Reference Object Example
    
     {
    -	"$ref": "#/components/schemas/Pet"
    +	"$ref": "#/components/schemas/Pet"
     }
     
    
    -$ref: '#/components/schemas/Pet'
    +$ref: '#/components/schemas/Pet'
     
    -

    Relative Schema Document Example

    +
    4.7.24.3 Relative Schema Document Example
    
     {
    -  "$ref": "Pet.json"
    +  "$ref": "Pet.json"
     }
     
    
     $ref: Pet.yaml
     
    -

    Relative Documents With Embedded Schema Example

    +
    4.7.24.4 Relative Documents With Embedded Schema Example
    
     {
    -  "$ref": "definitions.json#/Pet"
    +  "$ref": "definitions.json#/Pet"
     }
     
    
     $ref: definitions.yaml#/Pet
     
    -

    Schema Object

    +

    4.7.25 Schema Object

    The Schema Object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. This object is an extended subset of the JSON Schema Specification Wright Draft 00.

    For more information about the properties, see JSON Schema Core and JSON Schema Validation. Unless stated otherwise, the property definitions follow the JSON Schema.

    -

    Properties

    +
    4.7.25.1 Properties

    The following properties are taken directly from the JSON Schema definition and follow the same specifications:

    • title
    • @@ -2862,7 +3078,7 @@
    • exclusiveMinimum
    • maxLength
    • minLength
    • -
    • pattern (This string SHOULD be a valid regular expression, according to the ECMA 262 regular expression dialect)
    • +
    • pattern (This string SHOULD be a valid regular expression, according to the ECMA 262 regular expression dialect)
    • maxItems
    • minItems
    • uniqueItems
    • @@ -2873,22 +3089,22 @@

    The following properties are taken from the JSON Schema definition but their definitions were adjusted to the OpenAPI Specification.

      -
    • type - Value MUST be a string. Multiple types via an array are not supported.
    • -
    • allOf - Inline or referenced schema MUST be of a Schema Object and not a standard JSON Schema.
    • -
    • oneOf - Inline or referenced schema MUST be of a Schema Object and not a standard JSON Schema.
    • -
    • anyOf - Inline or referenced schema MUST be of a Schema Object and not a standard JSON Schema.
    • -
    • not - Inline or referenced schema MUST be of a Schema Object and not a standard JSON Schema.
    • -
    • items - Value MUST be an object and not an array. Inline or referenced schema MUST be of a Schema Object and not a standard JSON Schema. items MUST be present if the type is array.
    • -
    • properties - Property definitions MUST be a Schema Object and not a standard JSON Schema (inline or referenced).
    • -
    • additionalProperties - Value can be boolean or object. Inline or referenced schema MUST be of a Schema Object and not a standard JSON Schema.
    • -
    • description - CommonMark syntax MAY be used for rich text representation.
    • +
    • type - Value MUST be a string. Multiple types via an array are not supported.
    • +
    • allOf - Inline or referenced schema MUST be of a Schema Object and not a standard JSON Schema.
    • +
    • oneOf - Inline or referenced schema MUST be of a Schema Object and not a standard JSON Schema.
    • +
    • anyOf - Inline or referenced schema MUST be of a Schema Object and not a standard JSON Schema.
    • +
    • not - Inline or referenced schema MUST be of a Schema Object and not a standard JSON Schema.
    • +
    • items - Value MUST be an object and not an array. Inline or referenced schema MUST be of a Schema Object and not a standard JSON Schema. items MUST be present if the type is array.
    • +
    • properties - Property definitions MUST be a Schema Object and not a standard JSON Schema (inline or referenced).
    • +
    • additionalProperties - Value can be boolean or object. Inline or referenced schema MUST be of a Schema Object and not a standard JSON Schema.
    • +
    • description - CommonMark syntax MAY be used for rich text representation.
    • format - See Data Type Formats for further details. While relying on JSON Schema’s defined formats, the OAS offers a few additional predefined formats.
    • -
    • default - The default value represents what would be assumed by the consumer of the input as the value of the schema if one is not provided. Unlike JSON Schema, the value MUST conform to the defined type for the Schema Object defined at the same level. For example, if type is string, then default can be "foo" but cannot be 1.
    • +
    • default - The default value represents what would be assumed by the consumer of the input as the value of the schema if one is not provided. Unlike JSON Schema, the value MUST conform to the defined type for the Schema Object defined at the same level. For example, if type is string, then default can be "foo" but cannot be 1.

    Alternatively, any time a Schema Object can be used, a Reference Object can be used in its place. This allows referencing definitions instead of defining them inline.

    Additional properties defined by the JSON Schema specification that are not mentioned here are strictly unsupported.

    -

    Other than the JSON Schema subset fields, the following fields MAY be used for further schema documentation:

    -

    Fixed Fields

    +

    Other than the JSON Schema subset fields, the following fields MAY be used for further schema documentation:

    +
    4.7.25.2 Fixed Fields
    @@ -2899,94 +3115,94 @@ - + - + - + - + - + - + - + - + - + - + - + - +
    nullablenullable boolean Allows sending a null value for the defined schema. Default value is false.
    discriminatordiscriminator Discriminator Object Adds support for polymorphism. The discriminator is an object name that is used to differentiate between other schemas which may satisfy the payload description. See Composition and Inheritance for more details.
    readOnlyreadOnly booleanRelevant only for Schema "properties" definitions. Declares the property as “read only”. This means that it MAY be sent as part of a response but SHOULD NOT be sent as part of the request. If the property is marked as readOnly being true and is in the required list, the required will take effect on the response only. A property MUST NOT be marked as both readOnly and writeOnly being true. Default value is false.Relevant only for Schema "properties" definitions. Declares the property as “read only”. This means that it MAY be sent as part of a response but SHOULD NOT be sent as part of the request. If the property is marked as readOnly being true and is in the required list, the required will take effect on the response only. A property MUST NOT be marked as both readOnly and writeOnly being true. Default value is false.
    writeOnlywriteOnly booleanRelevant only for Schema "properties" definitions. Declares the property as “write only”. Therefore, it MAY be sent as part of a request but SHOULD NOT be sent as part of the response. If the property is marked as writeOnly being true and is in the required list, the required will take effect on the request only. A property MUST NOT be marked as both readOnly and writeOnly being true. Default value is false.Relevant only for Schema "properties" definitions. Declares the property as “write only”. Therefore, it MAY be sent as part of a request but SHOULD NOT be sent as part of the response. If the property is marked as writeOnly being true and is in the required list, the required will take effect on the request only. A property MUST NOT be marked as both readOnly and writeOnly being true. Default value is false.
    xmlxml XML ObjectThis MAY be used only on properties schemas. It has no effect on root schemas. Adds additional metadata to describe the XML representation of this property.This MAY be used only on properties schemas. It has no effect on root schemas. Adds additional metadata to describe the XML representation of this property.
    externalDocsexternalDocs External Documentation Object Additional external documentation for this schema.
    exampleexample Any A free-form property to include an example of an instance for this schema. To represent examples that cannot be naturally represented in JSON or YAML, a string value can be used to contain the example with escaping where necessary.
    deprecated deprecated booleanSpecifies that a schema is deprecated and SHOULD be transitioned out of usage. Default value is false.Specifies that a schema is deprecated and SHOULD be transitioned out of usage. Default value is false.
    -

    This object MAY be extended with Specification Extensions.

    -
    Composition and Inheritance (Polymorphism)
    +

    This object MAY be extended with Specification Extensions.

    +
    4.7.25.2.1 Composition and Inheritance (Polymorphism)

    The OpenAPI Specification allows combining and extending model definitions using the allOf property of JSON Schema, in effect offering model composition. allOf takes an array of object definitions that are validated independently but together compose a single object.

    While composition offers model extensibility, it does not imply a hierarchy between the models. To support polymorphism, the OpenAPI Specification adds the discriminator field. When used, the discriminator will be the name of the property that decides which schema definition validates the structure of the model. -As such, the discriminator field MUST be a required field. +As such, the discriminator field MUST be a required field. There are are two ways to define the value of a discriminator for an inheriting instance.

    • Use the schema name.
    • Override the schema name by overriding the property with a new value. If a new value exists, this takes precedence over the schema name. As such, inline schema definitions, which do not have a given id, cannot be used in polymorphism.
    -
    XML Modeling
    +
    4.7.25.2.2 XML Modeling

    The xml property allows extra definitions when translating the JSON definition to XML. The XML Object contains additional information about the available options.

    -

    Schema Object Examples

    -
    Primitive Sample
    +
    4.7.25.3 Schema Object Examples
    +
    4.7.25.3.1 Primitive Sample
    
     {
    -  "type": "string",
    -  "format": "email"
    +  "type": "string",
    +  "format": "email"
     }
     
    
     type: string
     format: email
     
    -
    Simple Model
    +
    4.7.25.3.2 Simple Model
    
     {
    -  "type": "object",
    -  "required": [
    -    "name"
    +  "type": "object",
    +  "required": [
    +    "name"
       ],
    -  "properties": {
    -    "name": {
    -      "type": "string"
    +  "properties": {
    +    "name": {
    +      "type": "string"
         },
    -    "address": {
    -      "$ref": "#/components/schemas/Address"
    +    "address": {
    +      "$ref": "#/components/schemas/Address"
         },
    -    "age": {
    -      "type": "integer",
    -      "format": "int32",
    -      "minimum": 0
    +    "age": {
    +      "type": "integer",
    +      "format": "int32",
    +      "minimum": 0
         }
       }
     }
    @@ -2999,19 +3215,19 @@
       name:
         type: string
       address:
    -    $ref: '#/components/schemas/Address'
    +    $ref: '#/components/schemas/Address'
       age:
         type: integer
         format: int32
         minimum: 0
     
    -
    Model with Map/Dictionary Properties
    +
    4.7.25.3.3 Model with Map/Dictionary Properties

    For a simple string to string mapping:

    
     {
    -  "type": "object",
    -  "additionalProperties": {
    -    "type": "string"
    +  "type": "object",
    +  "additionalProperties": {
    +    "type": "string"
       }
     }
     
    @@ -3023,36 +3239,36 @@

    For a string to model mapping:

    
     {
    -  "type": "object",
    -  "additionalProperties": {
    -    "$ref": "#/components/schemas/ComplexModel"
    +  "type": "object",
    +  "additionalProperties": {
    +    "$ref": "#/components/schemas/ComplexModel"
       }
     }
     
    
     type: object
     additionalProperties:
    -  $ref: '#/components/schemas/ComplexModel'
    +  $ref: '#/components/schemas/ComplexModel'
     
    -
    Model with Example
    +
    4.7.25.3.4 Model with Example
    
     {
    -  "type": "object",
    -  "properties": {
    -    "id": {
    -      "type": "integer",
    -      "format": "int64"
    +  "type": "object",
    +  "properties": {
    +    "id": {
    +      "type": "integer",
    +      "format": "int64"
         },
    -    "name": {
    -      "type": "string"
    +    "name": {
    +      "type": "string"
         }
       },
    -  "required": [
    -    "name"
    +  "required": [
    +    "name"
       ],
    -  "example": {
    -    "name": "Puma",
    -    "id": 1
    +  "example": {
    +    "name": "Puma",
    +    "id": 1
       }
     }
     
    @@ -3070,41 +3286,41 @@ name: Puma id: 1
    -
    Models with Composition
    +
    4.7.25.3.5 Models with Composition
    
     {
    -  "components": {
    -    "schemas": {
    -      "ErrorModel": {
    -        "type": "object",
    -        "required": [
    -          "message",
    -          "code"
    +  "components": {
    +    "schemas": {
    +      "ErrorModel": {
    +        "type": "object",
    +        "required": [
    +          "message",
    +          "code"
             ],
    -        "properties": {
    -          "message": {
    -            "type": "string"
    +        "properties": {
    +          "message": {
    +            "type": "string"
               },
    -          "code": {
    -            "type": "integer",
    -            "minimum": 100,
    -            "maximum": 600
    +          "code": {
    +            "type": "integer",
    +            "minimum": 100,
    +            "maximum": 600
               }
             }
           },
    -      "ExtendedErrorModel": {
    -        "allOf": [
    +      "ExtendedErrorModel": {
    +        "allOf": [
               {
    -            "$ref": "#/components/schemas/ErrorModel"
    +            "$ref": "#/components/schemas/ErrorModel"
               },
               {
    -            "type": "object",
    -            "required": [
    -              "rootCause"
    +            "type": "object",
    +            "required": [
    +              "rootCause"
                 ],
    -            "properties": {
    -              "rootCause": {
    -                "type": "string"
    +            "properties": {
    +              "rootCause": {
    +                "type": "string"
                   }
                 }
               }
    @@ -3131,7 +3347,7 @@
               maximum: 600
         ExtendedErrorModel:
           allOf:
    -      - $ref: '#/components/schemas/ErrorModel'
    +      - $ref: '#/components/schemas/ErrorModel'
           - type: object
             required:
             - rootCause
    @@ -3139,75 +3355,75 @@
               rootCause:
                 type: string
     
    -
    Models with Polymorphism Support
    +
    4.7.25.3.6 Models with Polymorphism Support
    
     {
    -  "components": {
    -    "schemas": {
    -      "Pet": {
    -        "type": "object",
    -        "discriminator": {
    -          "propertyName": "petType"
    +  "components": {
    +    "schemas": {
    +      "Pet": {
    +        "type": "object",
    +        "discriminator": {
    +          "propertyName": "petType"
             },
    -        "properties": {
    -          "name": {
    -            "type": "string"
    +        "properties": {
    +          "name": {
    +            "type": "string"
               },
    -          "petType": {
    -            "type": "string"
    +          "petType": {
    +            "type": "string"
               }
             },
    -        "required": [
    -          "name",
    -          "petType"
    +        "required": [
    +          "name",
    +          "petType"
             ]
           },
    -      "Cat": {
    -        "description": "A representation of a cat. Note that `Cat` will be used as the discriminator value.",
    -        "allOf": [
    +      "Cat": {
    +        "description": "A representation of a cat. Note that `Cat` will be used as the discriminator value.",
    +        "allOf": [
               {
    -            "$ref": "#/components/schemas/Pet"
    +            "$ref": "#/components/schemas/Pet"
               },
               {
    -            "type": "object",
    -            "properties": {
    -              "huntingSkill": {
    -                "type": "string",
    -                "description": "The measured skill for hunting",
    -                "default": "lazy",
    -                "enum": [
    -                  "clueless",
    -                  "lazy",
    -                  "adventurous",
    -                  "aggressive"
    +            "type": "object",
    +            "properties": {
    +              "huntingSkill": {
    +                "type": "string",
    +                "description": "The measured skill for hunting",
    +                "default": "lazy",
    +                "enum": [
    +                  "clueless",
    +                  "lazy",
    +                  "adventurous",
    +                  "aggressive"
                     ]
                   }
                 },
    -            "required": [
    -              "huntingSkill"
    +            "required": [
    +              "huntingSkill"
                 ]
               }
             ]
           },
    -      "Dog": {
    -        "description": "A representation of a dog. Note that `Dog` will be used as the discriminator value.",
    -        "allOf": [
    +      "Dog": {
    +        "description": "A representation of a dog. Note that `Dog` will be used as the discriminator value.",
    +        "allOf": [
               {
    -            "$ref": "#/components/schemas/Pet"
    +            "$ref": "#/components/schemas/Pet"
               },
               {
    -            "type": "object",
    -            "properties": {
    -              "packSize": {
    -                "type": "integer",
    -                "format": "int32",
    -                "description": "the size of the pack the dog is from",
    -                "default": 0,
    -                "minimum": 0
    +            "type": "object",
    +            "properties": {
    +              "packSize": {
    +                "type": "integer",
    +                "format": "int32",
    +                "description": "the size of the pack the dog is from",
    +                "default": 0,
    +                "minimum": 0
                   }
                 },
    -            "required": [
    -              "packSize"
    +            "required": [
    +              "packSize"
                 ]
               }
             ]
    @@ -3231,10 +3447,10 @@
           required:
           - name
           - petType
    -    Cat:  ## "Cat" will be used as the discriminator value
    +    Cat:  ## "Cat" will be used as the discriminator value
           description: A representation of a cat
           allOf:
    -      - $ref: '#/components/schemas/Pet'
    +      - $ref: '#/components/schemas/Pet'
           - type: object
             properties:
               huntingSkill:
    @@ -3247,10 +3463,10 @@
                 - aggressive
             required:
             - huntingSkill
    -    Dog:  ## "Dog" will be used as the discriminator value
    +    Dog:  ## "Dog" will be used as the discriminator value
           description: A representation of a dog
           allOf:
    -      - $ref: '#/components/schemas/Pet'
    +      - $ref: '#/components/schemas/Pet'
           - type: object
             properties:
               packSize:
    @@ -3262,10 +3478,10 @@
             required:
             - packSize
     
    -

    Discriminator Object

    +

    4.7.26 Discriminator Object

    When request bodies or response payloads may be one of a number of different schemas, a discriminator object can be used to aid in serialization, deserialization, and validation. The discriminator is a specific object in a schema which is used to inform the consumer of the specification of an alternative schema based on the value associated with it.

    When using the discriminator, inline schemas will not be considered.

    -

    Fixed Fields

    +
    4.7.26.1 Fixed Fields
    @@ -3276,63 +3492,63 @@ - + - + - +
    propertyNamepropertyName stringREQUIRED. The name of the property in the payload that will hold the discriminator value.REQUIRED. The name of the property in the payload that will hold the discriminator value.
    mapping mapping Map[string, string] An object to hold mappings between payload values and schema names or references.

    The discriminator attribute is legal only when using one of the composite keywords oneOf, anyOf, allOf.

    -

    In OAS 3.0, a response payload MAY be described to be exactly one of any number of types:

    -
    
    +

    In OAS 3.0, a response payload MAY be described to be exactly one of any number of types:

    +
    
     MyResponseType:
       oneOf:
    -  - $ref: '#/components/schemas/Cat'
    -  - $ref: '#/components/schemas/Dog'
    -  - $ref: '#/components/schemas/Lizard'
    +  - $ref: '#/components/schemas/Cat'
    +  - $ref: '#/components/schemas/Dog'
    +  - $ref: '#/components/schemas/Lizard'
     
    -

    which means the payload MUST, by validation, match exactly one of the schemas described by Cat, Dog, or Lizard. In this case, a discriminator MAY act as a “hint” to shortcut validation and selection of the matching schema which may be a costly operation, depending on the complexity of the schema. We can then describe exactly which field tells us which schema to use:

    -
    
    +

    which means the payload MUST, by validation, match exactly one of the schemas described by Cat, Dog, or Lizard. In this case, a discriminator MAY act as a “hint” to shortcut validation and selection of the matching schema which may be a costly operation, depending on the complexity of the schema. We can then describe exactly which field tells us which schema to use:

    +
    
     MyResponseType:
       oneOf:
    -  - $ref: '#/components/schemas/Cat'
    -  - $ref: '#/components/schemas/Dog'
    -  - $ref: '#/components/schemas/Lizard'
    +  - $ref: '#/components/schemas/Cat'
    +  - $ref: '#/components/schemas/Dog'
    +  - $ref: '#/components/schemas/Lizard'
       discriminator:
         propertyName: pet_type
     
    -

    The expectation now is that a property with name pet_type MUST be present in the response payload, and the value will correspond to the name of a schema defined in the OAS document. Thus the response payload:

    -
    
    +

    The expectation now is that a property with name pet_type MUST be present in the response payload, and the value will correspond to the name of a schema defined in the OAS document. Thus the response payload:

    +
    
     {
    -  "id": 12345,
    -  "pet_type": "Cat"
    +  "id": 12345,
    +  "pet_type": "Cat"
     }
     

    Will indicate that the Cat schema be used in conjunction with this payload.

    -

    In scenarios where the value of the discriminator field does not match the schema name or implicit mapping is not possible, an optional mapping definition MAY be used:

    -
    
    +

    In scenarios where the value of the discriminator field does not match the schema name or implicit mapping is not possible, an optional mapping definition MAY be used:

    +
    
     MyResponseType:
       oneOf:
    -  - $ref: '#/components/schemas/Cat'
    -  - $ref: '#/components/schemas/Dog'
    -  - $ref: '#/components/schemas/Lizard'
    -  - $ref: 'https://gigantic-server.com/schemas/Monster/schema.json'
    +  - $ref: '#/components/schemas/Cat'
    +  - $ref: '#/components/schemas/Dog'
    +  - $ref: '#/components/schemas/Lizard'
    +  - $ref: 'https://gigantic-server.com/schemas/Monster/schema.json'
       discriminator:
         propertyName: pet_type
         mapping:
    -      dog: '#/components/schemas/Dog'
    -      monster: 'https://gigantic-server.com/schemas/Monster/schema.json'
    +      dog: '#/components/schemas/Dog'
    +      monster: 'https://gigantic-server.com/schemas/Monster/schema.json'
     
    -

    Here the discriminator value of dog will map to the schema #/components/schemas/Dog, rather than the default (implicit) value of Dog. If the discriminator value does not match an implicit or explicit mapping, no schema can be determined and validation SHOULD fail. Mapping keys MUST be string values, but tooling MAY convert response values to strings for comparison.

    +

    Here the discriminator value of dog will map to the schema #/components/schemas/Dog, rather than the default (implicit) value of Dog. If the discriminator value does not match an implicit or explicit mapping, no schema can be determined and validation SHOULD fail. Mapping keys MUST be string values, but tooling MAY convert response values to strings for comparison.

    When used in conjunction with the anyOf construct, the use of the discriminator can avoid ambiguity where multiple schemas may satisfy a single payload.

    -

    In both the oneOf and anyOf use cases, all possible schemas MUST be listed explicitly. To avoid redundancy, the discriminator MAY be added to a parent schema definition, and all schemas comprising the parent schema in an allOf construct may be used as an alternate schema.

    +

    In both the oneOf and anyOf use cases, all possible schemas MUST be listed explicitly. To avoid redundancy, the discriminator MAY be added to a parent schema definition, and all schemas comprising the parent schema in an allOf construct may be used as an alternate schema.

    For example:

    -
    
    +
    
     components:
       schemas:
         Pet:
    @@ -3348,7 +3564,7 @@
               cachorro: Dog
         Cat:
           allOf:
    -      - $ref: '#/components/schemas/Pet'
    +      - $ref: '#/components/schemas/Pet'
           - type: object
             # all other properties specific to a `Cat`
             properties:
    @@ -3356,7 +3572,7 @@
                 type: string
         Dog:
           allOf:
    -      - $ref: '#/components/schemas/Pet'
    +      - $ref: '#/components/schemas/Pet'
           - type: object
             # all other properties specific to a `Dog`
             properties:
    @@ -3364,7 +3580,7 @@
                 type: string
         Lizard:
           allOf:
    -      - $ref: '#/components/schemas/Pet'
    +      - $ref: '#/components/schemas/Pet'
           - type: object
             # all other properties specific to a `Lizard`
             properties:
    @@ -3372,25 +3588,25 @@
                 type: boolean
     

    a payload like this:

    -
    
    +
    
     {
    -  "pet_type": "Cat",
    -  "name": "misty"
    +  "pet_type": "Cat",
    +  "name": "misty"
     }
     

    will indicate that the Cat schema be used. Likewise this schema:

    -
    
    +
    
     {
    -  "pet_type": "cachorro",
    -  "bark": "soft"
    +  "pet_type": "cachorro",
    +  "bark": "soft"
     }
     

    will map to Dog because of the definition in the mappings element.

    -

    XML Object

    +

    4.7.27 XML Object

    A metadata object that allows for more fine-tuned XML model definitions.

    -

    When using arrays, XML element names are not inferred (for singular/plural forms) and the name property SHOULD be used to add that information. +

    When using arrays, XML element names are not inferred (for singular/plural forms) and the name property SHOULD be used to add that information. See examples for expected behavior.

    -

    Fixed Fields

    +
    4.7.27.1 Fixed Fields
    @@ -3401,41 +3617,41 @@ - + - + - + - + - + - + - +
    namename string Replaces the name of the element/attribute used for the described schema property. When defined within items, it will affect the name of the individual XML elements within the list. When defined alongside type being array (outside the items), it will affect the wrapping element and only if wrapped is true. If wrapped is false, it will be ignored.
    namespacenamespace stringThe URI of the namespace definition. Value MUST be in the form of an absolute URI.The URI of the namespace definition. Value MUST be in the form of an absolute URI.
    prefixprefix string The prefix to be used for the name.
    attributeattribute boolean Declares whether the property definition translates to an attribute instead of an element. Default value is false.
    wrappedwrapped booleanMAY be used only for an array definition. Signifies whether the array is wrapped (for example, <books><book/><book/></books>) or unwrapped (<book/><book/>). Default value is false. The definition takes effect only when defined alongside type being array (outside the items).MAY be used only for an array definition. Signifies whether the array is wrapped (for example, <books><book/><book/></books>) or unwrapped (<book/><book/>). Default value is false. The definition takes effect only when defined alongside type being array (outside the items).
    -

    This object MAY be extended with Specification Extensions.

    -

    XML Object Examples

    +

    This object MAY be extended with Specification Extensions.

    +
    4.7.27.2 XML Object Examples

    The examples of the XML object definitions are included inside a property definition of a Schema Object with a sample of the XML representation of it.

    -
    No XML Element
    +
    4.7.27.2.1 No XML Element

    Basic string property:

    
     {
    -    "animals": {
    -        "type": "string"
    +    "animals": {
    +        "type": "string"
         }
     }
     
    @@ -3449,10 +3665,10 @@

    Basic string array property (wrapped is false by default):

    
     {
    -    "animals": {
    -        "type": "array",
    -        "items": {
    -            "type": "string"
    +    "animals": {
    +        "type": "array",
    +        "items": {
    +            "type": "string"
             }
         }
     }
    @@ -3468,13 +3684,13 @@
     <animals>...</animals>
     <animals>...</animals>
     
    -
    XML Name Replacement
    +
    4.7.27.2.2 XML Name Replacement
    
     {
    -  "animals": {
    -    "type": "string",
    -    "xml": {
    -      "name": "animal"
    +  "animals": {
    +    "type": "string",
    +    "xml": {
    +      "name": "animal"
         }
       }
     }
    @@ -3488,25 +3704,25 @@
     
    
     <animal>...</animal>
     
    -
    XML Attribute, Prefix and Namespace
    +
    4.7.27.2.3 XML Attribute, Prefix and Namespace

    In this example, a full model definition is shown.

    
     {
    -  "Person": {
    -    "type": "object",
    -    "properties": {
    -      "id": {
    -        "type": "integer",
    -        "format": "int32",
    -        "xml": {
    -          "attribute": true
    +  "Person": {
    +    "type": "object",
    +    "properties": {
    +      "id": {
    +        "type": "integer",
    +        "format": "int32",
    +        "xml": {
    +          "attribute": true
             }
           },
    -      "name": {
    -        "type": "string",
    -        "xml": {
    -          "namespace": "http://example.com/schema/sample",
    -          "prefix": "sample"
    +      "name": {
    +        "type": "string",
    +        "xml": {
    +          "namespace": "http://example.com/schema/sample",
    +          "prefix": "sample"
             }
           }
         }
    @@ -3529,20 +3745,20 @@
             prefix: sample
     
    
    -<Person id="123">
    -    <sample:name xmlns:sample="http://example.com/schema/sample">example</sample:name>
    +<Person id="123">
    +    <sample:name xmlns:sample="http://example.com/schema/sample">example</sample:name>
     </Person>
     
    -
    XML Arrays
    +
    4.7.27.2.4 XML Arrays

    Changing the element names:

    
     {
    -  "animals": {
    -    "type": "array",
    -    "items": {
    -      "type": "string",
    -      "xml": {
    -        "name": "animal"
    +  "animals": {
    +    "type": "array",
    +    "items": {
    +      "type": "string",
    +      "xml": {
    +        "name": "animal"
           }
         }
       }
    @@ -3563,16 +3779,16 @@
     

    The external name property has no effect on the XML:

    
     {
    -  "animals": {
    -    "type": "array",
    -    "items": {
    -      "type": "string",
    -      "xml": {
    -        "name": "animal"
    +  "animals": {
    +    "type": "array",
    +    "items": {
    +      "type": "string",
    +      "xml": {
    +        "name": "animal"
           }
         },
    -    "xml": {
    -      "name": "aliens"
    +    "xml": {
    +      "name": "aliens"
         }
       }
     }
    @@ -3594,13 +3810,13 @@
     

    Even when the array is wrapped, if a name is not explicitly defined, the same name will be used both internally and externally:

    
     {
    -  "animals": {
    -    "type": "array",
    -    "items": {
    -      "type": "string"
    +  "animals": {
    +    "type": "array",
    +    "items": {
    +      "type": "string"
         },
    -    "xml": {
    -      "wrapped": true
    +    "xml": {
    +      "wrapped": true
         }
       }
     }
    @@ -3622,16 +3838,16 @@
     

    To overcome the naming problem in the example above, the following definition can be used:

    
     {
    -  "animals": {
    -    "type": "array",
    -    "items": {
    -      "type": "string",
    -      "xml": {
    -        "name": "animal"
    +  "animals": {
    +    "type": "array",
    +    "items": {
    +      "type": "string",
    +      "xml": {
    +        "name": "animal"
           }
         },
    -    "xml": {
    -      "wrapped": true
    +    "xml": {
    +      "wrapped": true
         }
       }
     }
    @@ -3655,17 +3871,17 @@
     

    Affecting both internal and external names:

    
     {
    -  "animals": {
    -    "type": "array",
    -    "items": {
    -      "type": "string",
    -      "xml": {
    -        "name": "animal"
    +  "animals": {
    +    "type": "array",
    +    "items": {
    +      "type": "string",
    +      "xml": {
    +        "name": "animal"
           }
         },
    -    "xml": {
    -      "name": "aliens",
    -      "wrapped": true
    +    "xml": {
    +      "name": "aliens",
    +      "wrapped": true
         }
       }
     }
    @@ -3690,14 +3906,14 @@
     

    If we change the external element but not the internal ones:

    
     {
    -  "animals": {
    -    "type": "array",
    -    "items": {
    -      "type": "string"
    +  "animals": {
    +    "type": "array",
    +    "items": {
    +      "type": "string"
         },
    -    "xml": {
    -      "name": "aliens",
    -      "wrapped": true
    +    "xml": {
    +      "name": "aliens",
    +      "wrapped": true
         }
       }
     }
    @@ -3717,10 +3933,10 @@
       <aliens>value</aliens>
     </aliens>
     
    -

    Security Scheme Object

    +

    4.7.28 Security Scheme Object

    Defines a security scheme that can be used by the operations. -Supported schemes are HTTP authentication, an API key (either as a header or as a query parameter), OAuth2’s common flows (implicit, password, application and access code) as defined in [[!RFC6749]], and OpenID Connect Discovery.

    -

    Fixed Fields

    +Supported schemes are HTTP authentication, an API key (either as a header or as a query parameter), OAuth2’s common flows (implicit, password, application and access code) as defined in [RFC6749], and OpenID Connect Discovery.

    +
    4.7.28.1 Fixed Fields
    @@ -3732,74 +3948,74 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
    typetype string AnyREQUIRED. The type of the security scheme. Valid values are "apiKey", "http", "oauth2", "openIdConnect".REQUIRED. The type of the security scheme. Valid values are "apiKey", "http", "oauth2", "openIdConnect".
    descriptiondescription string AnyA short description for security scheme. CommonMark syntax MAY be used for rich text representation.A short description for security scheme. CommonMark syntax MAY be used for rich text representation.
    namename string apiKeyREQUIRED. The name of the header, query or cookie parameter to be used.REQUIRED. The name of the header, query or cookie parameter to be used.
    inin string apiKeyREQUIRED. The location of the API key. Valid values are "query", "header" or "cookie".REQUIRED. The location of the API key. Valid values are "query", "header" or "cookie".
    schemescheme string httpREQUIRED. The name of the HTTP Authorization scheme to be used in the Authorization header as defined in [[!RFC7235]].REQUIRED. The name of the HTTP Authorization scheme to be used in the Authorization header as defined in [RFC7235].
    bearerFormatbearerFormat stringhttp ("bearer")http ("bearer") A hint to the client to identify how the bearer token is formatted. Bearer tokens are usually generated by an authorization server, so this information is primarily for documentation purposes.
    flowsflows OAuth Flows Object oauth2REQUIRED. An object containing configuration information for the flow types supported.REQUIRED. An object containing configuration information for the flow types supported.
    openIdConnectUrlopenIdConnectUrl string openIdConnectREQUIRED. OpenId Connect URL to discover OAuth2 configuration values. This MUST be in the form of a URL.REQUIRED. OpenId Connect URL to discover OAuth2 configuration values. This MUST be in the form of a URL.
    -

    This object MAY be extended with Specification Extensions.

    -

    Security Scheme Object Example

    -
    Basic Authentication Sample
    +

    This object MAY be extended with Specification Extensions.

    +
    4.7.28.2 Security Scheme Object Example
    +
    4.7.28.2.1 Basic Authentication Sample
    
     {
    -  "type": "http",
    -  "scheme": "basic"
    +  "type": "http",
    +  "scheme": "basic"
     }
     
    
     type: http
     scheme: basic
     
    -
    API Key Sample
    +
    4.7.28.2.2 API Key Sample
    
     {
    -  "type": "apiKey",
    -  "name": "api_key",
    -  "in": "header"
    +  "type": "apiKey",
    +  "name": "api_key",
    +  "in": "header"
     }
     
    
    @@ -3807,12 +4023,12 @@
     name: api_key
     in: header
     
    -
    JWT Bearer Sample
    +
    4.7.28.2.3 JWT Bearer Sample
    
     {
    -  "type": "http",
    -  "scheme": "bearer",
    -  "bearerFormat": "JWT",
    +  "type": "http",
    +  "scheme": "bearer",
    +  "bearerFormat": "JWT",
     }
     
    
    @@ -3820,16 +4036,16 @@
     scheme: bearer
     bearerFormat: JWT
     
    -
    Implicit OAuth2 Sample
    +
    4.7.28.2.4 Implicit OAuth2 Sample
    
     {
    -  "type": "oauth2",
    -  "flows": {
    -    "implicit": {
    -      "authorizationUrl": "https://example.com/api/oauth/dialog",
    -      "scopes": {
    -        "write:pets": "modify pets in your account",
    -        "read:pets": "read your pets"
    +  "type": "oauth2",
    +  "flows": {
    +    "implicit": {
    +      "authorizationUrl": "https://example.com/api/oauth/dialog",
    +      "scopes": {
    +        "write:pets": "modify pets in your account",
    +        "read:pets": "read your pets"
           }
         }
       }
    @@ -3844,9 +4060,9 @@
           write:pets: modify pets in your account
           read:pets: read your pets
     
    -

    OAuth Flows Object

    +

    4.7.29 OAuth Flows Object

    Allows configuration of the supported OAuth Flows.

    -

    Fixed Fields

    +
    4.7.29.1 Fixed Fields
    @@ -3857,31 +4073,31 @@ - + - + - + - +
    implicitimplicit OAuth Flow Object Configuration for the OAuth Implicit flow
    passwordpassword OAuth Flow Object Configuration for the OAuth Resource Owner Password flow
    clientCredentialsclientCredentials OAuth Flow Object Configuration for the OAuth Client Credentials flow. Previously called application in OpenAPI 2.0.
    authorizationCodeauthorizationCode OAuth Flow Object Configuration for the OAuth Authorization Code flow. Previously called accessCode in OpenAPI 2.0.
    -

    This object MAY be extended with Specification Extensions.

    -

    OAuth Flow Object

    +

    This object MAY be extended with Specification Extensions.

    +

    4.7.30 OAuth Flow Object

    Configuration details for a supported OAuth Flow

    -

    Fixed Fields

    +
    4.7.30.1 Fixed Fields
    @@ -3893,50 +4109,50 @@ - + - - + + - + - - + + - + - + - + - +
    authorizationUrlauthorizationUrl stringoauth2 ("implicit", "authorizationCode")REQUIRED. The authorization URL to be used for this flow. This MUST be in the form of a URL.oauth2 ("implicit", "authorizationCode")REQUIRED. The authorization URL to be used for this flow. This MUST be in the form of a URL.
    tokenUrltokenUrl stringoauth2 ("password", "clientCredentials", "authorizationCode")REQUIRED. The token URL to be used for this flow. This MUST be in the form of a URL.oauth2 ("password", "clientCredentials", "authorizationCode")REQUIRED. The token URL to be used for this flow. This MUST be in the form of a URL.
    refreshUrlrefreshUrl string oauth2The URL to be used for obtaining refresh tokens. This MUST be in the form of a URL.The URL to be used for obtaining refresh tokens. This MUST be in the form of a URL.
    scopesscopes Map[string, string] oauth2REQUIRED. The available scopes for the OAuth2 security scheme. A map between the scope name and a short description for it.REQUIRED. The available scopes for the OAuth2 security scheme. A map between the scope name and a short description for it.
    -

    This object MAY be extended with Specification Extensions.

    -

    OAuth Flow Object Examples

    +

    This object MAY be extended with Specification Extensions.

    +
    4.7.30.2 OAuth Flow Object Examples
    
     {
    -  "type": "oauth2",
    -  "flows": {
    -    "implicit": {
    -      "authorizationUrl": "https://example.com/api/oauth/dialog",
    -      "scopes": {
    -        "write:pets": "modify pets in your account",
    -        "read:pets": "read your pets"
    +  "type": "oauth2",
    +  "flows": {
    +    "implicit": {
    +      "authorizationUrl": "https://example.com/api/oauth/dialog",
    +      "scopes": {
    +        "write:pets": "modify pets in your account",
    +        "read:pets": "read your pets"
           }
         },
    -    "authorizationCode": {
    -      "authorizationUrl": "https://example.com/api/oauth/dialog",
    -      "tokenUrl": "https://example.com/api/oauth/token",
    -      "scopes": {
    -        "write:pets": "modify pets in your account",
    -        "read:pets": "read your pets"
    +    "authorizationCode": {
    +      "authorizationUrl": "https://example.com/api/oauth/dialog",
    +      "tokenUrl": "https://example.com/api/oauth/token",
    +      "scopes": {
    +        "write:pets": "modify pets in your account",
    +        "read:pets": "read your pets"
           }
         }
       }
    @@ -3957,13 +4173,13 @@
           write:pets: modify pets in your account
           read:pets: read your pets
     
    -

    Security Requirement Object

    +

    4.7.31 Security Requirement Object

    Lists the required security schemes to execute this operation. -The name used for each property MUST correspond to a security scheme declared in the Security Schemes under the Components Object.

    -

    Security Requirement Objects that contain multiple schemes require that all schemes MUST be satisfied for a request to be authorized. +The name used for each property MUST correspond to a security scheme declared in the Security Schemes under the Components Object.

    +

    Security Requirement Objects that contain multiple schemes require that all schemes MUST be satisfied for a request to be authorized. This enables support for scenarios where multiple query parameters or HTTP headers are required to convey security information.

    When a list of Security Requirement Objects is defined on the Open API object or Operation Object, only one of Security Requirement Objects in the list needs to be satisfied to authorize the request.

    -

    Patterned Fields

    +
    4.7.31.1 Patterned Fields
    @@ -3974,28 +4190,28 @@ - + - +
    {name}{name} [string]Each name MUST correspond to a security scheme which is declared in the Security Schemes under the Components Object. If the security scheme is of type "oauth2" or "openIdConnect", then the value is a list of scope names required for the execution. For other security scheme types, the array MUST be empty.Each name MUST correspond to a security scheme which is declared in the Security Schemes under the Components Object. If the security scheme is of type "oauth2" or "openIdConnect", then the value is a list of scope names required for the execution. For other security scheme types, the array MUST be empty.
    -

    Security Requirement Object Examples

    -
    Non-OAuth2 Security Requirement
    +
    4.7.31.2 Security Requirement Object Examples
    +
    4.7.31.2.1 Non-OAuth2 Security Requirement
    
     {
    -  "api_key": []
    +  "api_key": []
     }
     
    
     api_key: []
     
    -
    OAuth2 Security Requirement
    +
    4.7.31.2.2 OAuth2 Security Requirement
    
     {
    -  "petstore_auth": [
    -    "write:pets",
    -    "read:pets"
    +  "petstore_auth": [
    +    "write:pets",
    +    "read:pets"
       ]
     }
     
    @@ -4004,9 +4220,9 @@ - write:pets - read:pets
    -

    Specification Extensions

    +

    4.8 Specification Extensions

    While the OpenAPI Specification tries to accommodate most use cases, additional data can be added to extend the specification at certain points.

    -

    The extensions properties are implemented as patterned fields that are always prefixed by "x-".

    +

    The extensions properties are implemented as patterned fields that are always prefixed by "x-".

    @@ -4017,23 +4233,23 @@ - + - +
    ^x-^x- AnyAllows extensions to the OpenAPI Schema. The field name MUST begin with x-, for example, x-internal-id. The value can be null, a primitive, an array or an object. Can have any valid JSON format value.Allows extensions to the OpenAPI Schema. The field name MUST begin with x-, for example, x-internal-id. The value can be null, a primitive, an array or an object. Can have any valid JSON format value.

    The extensions may or may not be supported by the available tooling, but those may be extended as well to add requested support (if tools are internal or open-sourced).

    -

    Security Filtering

    -

    Some objects in the OpenAPI Specification MAY be declared and remain empty, or be completely removed, even though they are inherently the core of the API documentation.

    +

    4.9 Security Filtering

    +

    Some objects in the OpenAPI Specification MAY be declared and remain empty, or be completely removed, even though they are inherently the core of the API documentation.

    The reasoning is to allow an additional layer of access control over the documentation. -While not part of the specification itself, certain libraries MAY choose to allow access to parts of the documentation based on some form of authentication/authorization.

    +While not part of the specification itself, certain libraries MAY choose to allow access to parts of the documentation based on some form of authentication/authorization.

    Two examples of this:

      -
    1. The Paths Object MAY be empty. It may be counterintuitive, but this may tell the viewer that they got to the right place, but can’t access any documentation. They’d still have access to the Info Object which may contain additional information regarding authentication.
    2. -
    3. The Path Item Object MAY be empty. In this case, the viewer will be aware that the path exists, but will not be able to see any of its operations or parameters. This is different than hiding the path itself from the Paths Object, so the user will not be aware of its existence. This allows the documentation provider to finely control what the viewer can see.
    4. +
    5. The Paths Object MAY be empty. It may be counterintuitive, but this may tell the viewer that they got to the right place, but can’t access any documentation. They’d still have access to the Info Object which may contain additional information regarding authentication.
    6. +
    7. The Path Item Object MAY be empty. In this case, the viewer will be aware that the path exists, but will not be able to see any of its operations or parameters. This is different than hiding the path itself from the Paths Object, so the user will not be aware of its existence. This allows the documentation provider to finely control what the viewer can see.
    -

    Appendix A: Revision History

    +

    A. Appendix A: Revision History

    @@ -4091,3 +4307,303 @@
    +

    B. References

    B.1 Normative references

    + +
    [RFC1866]
    + Hypertext Markup Language - 2.0. T. Berners-Lee; D. Connolly. IETF. November 1995. Historic. URL: https://www.rfc-editor.org/rfc/rfc1866 +
    [RFC2119]
    + Key words for use in RFCs to Indicate Requirement Levels. S. Bradner. IETF. March 1997. Best Current Practice. URL: https://www.rfc-editor.org/rfc/rfc2119 +
    [RFC3986]
    + Uniform Resource Identifier (URI): Generic Syntax. T. Berners-Lee; R. Fielding; L. Masinter. IETF. January 2005. Internet Standard. URL: https://www.rfc-editor.org/rfc/rfc3986 +
    [RFC6570]
    + URI Template. J. Gregorio; R. Fielding; M. Hadley; M. Nottingham; D. Orchard. IETF. March 2012. Proposed Standard. URL: https://www.rfc-editor.org/rfc/rfc6570 +
    [RFC6749]
    + The OAuth 2.0 Authorization Framework. D. Hardt, Ed.. IETF. October 2012. Proposed Standard. URL: https://www.rfc-editor.org/rfc/rfc6749 +
    [RFC6838]
    + Media Type Specifications and Registration Procedures. N. Freed; J. Klensin; T. Hansen. IETF. January 2013. Best Current Practice. URL: https://www.rfc-editor.org/rfc/rfc6838 +
    [RFC6901]
    + JavaScript Object Notation (JSON) Pointer. P. Bryan, Ed.; K. Zyp; M. Nottingham, Ed.. IETF. April 2013. Proposed Standard. URL: https://www.rfc-editor.org/rfc/rfc6901 +
    [RFC7230]
    + Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing. R. Fielding, Ed.; J. Reschke, Ed.. IETF. June 2014. Proposed Standard. URL: https://httpwg.org/specs/rfc7230.html +
    [RFC7231]
    + Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content. R. Fielding, Ed.; J. Reschke, Ed.. IETF. June 2014. Proposed Standard. URL: https://httpwg.org/specs/rfc7231.html +
    [RFC7235]
    + Hypertext Transfer Protocol (HTTP/1.1): Authentication. R. Fielding, Ed.; J. Reschke, Ed.. IETF. June 2014. Proposed Standard. URL: https://httpwg.org/specs/rfc7235.html +
    [RFC8174]
    + Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words. B. Leiba. IETF. May 2017. Best Current Practice. URL: https://www.rfc-editor.org/rfc/rfc8174 +
    +
    \ No newline at end of file diff --git a/oas/v3.0.1.html b/oas/v3.0.1.html index 54a1717f3e..fbde7dccb9 100644 --- a/oas/v3.0.1.html +++ b/oas/v3.0.1.html @@ -1,30 +1,251 @@ -OpenAPI Specification v3.0.1 | Introduction, Definitions, & More - + + + + + +OpenAPI Specification v3.0.1 + + + + + + + + -

    OpenAPI Specification v3.0.1

    What is the OpenAPI Specification?

    The OpenAPI Specification (OAS) defines a standard, programming language-agnostic interface description for HTTP APIs, which allows both humans and computers to discover and understand the capabilities of a service without requiring access to source code, additional documentation, or inspection of network traffic. When properly defined via OpenAPI, a consumer can understand and interact with the remote service with a minimal amount of implementation logic. Similar to what interface descriptions have done for lower-level programming, the OpenAPI Specification removes guesswork in calling a service.

    Status of This Document

    The source-of-truth for the specification is the GitHub markdown file referenced above.
    -

    OpenAPI Specification

    -

    Version 3.0.1

    -

    The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “NOT RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in BCP 14 [[!RFC2119]] [[!RFC8174]] when, and only when, they appear in all capitals, as shown here.

    + + + + + +
    +

    +

    OpenAPI Specification v3.0.1

    Version 3.0.1

    +

    +
    + More details about this document +
    + +
    Latest published version:
    + https://spec.openapis.org/oas/latest.html +
    +
    Latest editor's draft:
    https://github.com/OAI/OpenAPI-Specification/
    + + + + + + +
    Editors:
    + Darrel Miller +
    + Jeremy Whitlock +
    + Marsh Gardiner +
    + Ron Ratovsky +
    +
    + Former editors: +
    + Jason Harmon +
    + Tony Tam +
    + + + +
    Participate
    + GitHub OAI/OpenAPI-Specification +
    + File a bug +
    + Commit history +
    + Pull requests +
    +
    +
    + + + +
    +

    What is the OpenAPI Specification?

    The OpenAPI Specification (OAS) defines a standard, programming language-agnostic interface description for HTTP APIs, which allows both humans and computers to discover and understand the capabilities of a service without requiring access to source code, additional documentation, or inspection of network traffic. When properly defined via OpenAPI, a consumer can understand and interact with the remote service with a minimal amount of implementation logic. Similar to what interface descriptions have done for lower-level programming, the OpenAPI Specification removes guesswork in calling a service.

    Status of This Document

    The source-of-truth for the specification is the GitHub markdown file referenced above.
    +

    1. OpenAPI Specification

    +

    1.1 Version 3.0.1

    +

    The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “NOT RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.

    This document is licensed under The Apache License, Version 2.0.

    -

    Introduction

    +

    2. Introduction

    The OpenAPI Specification (OAS) defines a standard, language-agnostic interface to RESTful APIs which allows both humans and computers to discover and understand the capabilities of the service without access to source code, documentation, or through network traffic inspection. When properly defined, a consumer can understand and interact with the remote service with a minimal amount of implementation logic.

    An OpenAPI definition can then be used by documentation generation tools to display the API, code generation tools to generate servers and clients in various programming languages, testing tools, and many other use cases.

    - -

    Definitions

    -

    OpenAPI Document

    + +

    3. Definitions

    +

    3.1 OpenAPI Document

    A document (or set of documents) that defines or describes an API. An OpenAPI definition uses and conforms to the OpenAPI Specification.

    -

    Path Templating

    +

    3.2 Path Templating

    Path templating refers to the usage of curly braces ({}) to mark a section of a URL path as replaceable using path parameters.

    -

    Media Types

    +

    3.3 Media Types

    Media type definitions are spread across several resources. -The media type definitions SHOULD be in compliance with [[!RFC6838]].

    +The media type definitions SHOULD be in compliance with [RFC6838].

    Some examples of possible media type definitions:

    -
    
    +
    
       text/plain; charset=utf-8
       application/json
       application/vnd.github+json
    @@ -36,45 +257,45 @@
       application/vnd.github.v3.diff
       application/vnd.github.v3.patch
     
    -

    HTTP Status Codes

    +

    3.4 HTTP Status Codes

    The HTTP Status Codes are used to indicate the status of the executed operation. -The available status codes are defined by [[!RFC7231]] and registered status codes are listed in the IANA Status Code Registry.

    -

    Specification

    -

    Versions

    +The available status codes are defined by [RFC7231] and registered status codes are listed in the IANA Status Code Registry.

    +

    4. Specification

    +

    4.1 Versions

    The OpenAPI Specification is versioned using Semantic Versioning 2.0.0 (semver) and follows the semver specification.

    -

    The major.minor portion of the semver (for example 3.0) SHALL designate the OAS feature set. Typically, .patch versions address errors in this document, not the feature set. Tooling which supports OAS 3.0 SHOULD be compatible with all OAS 3.0.* versions. The patch version SHOULD NOT be considered by tooling, making no distinction between 3.0.0 and 3.0.1 for example.

    -

    Subsequent minor version releases of the OpenAPI Specification (incrementing the minor version number) SHOULD NOT interfere with tooling developed to a lower minor version and same major version. Thus a hypothetical 3.1.0 specification SHOULD be usable with tooling designed for 3.0.0.

    -

    An OpenAPI document compatible with OAS 3.*.* contains a required openapi field which designates the semantic version of the OAS that it uses. (OAS 2.0 documents contain a top-level version field named swagger and value "2.0".)

    -

    Format

    +

    The major.minor portion of the semver (for example 3.0) SHALL designate the OAS feature set. Typically, .patch versions address errors in this document, not the feature set. Tooling which supports OAS 3.0 SHOULD be compatible with all OAS 3.0.* versions. The patch version SHOULD NOT be considered by tooling, making no distinction between 3.0.0 and 3.0.1 for example.

    +

    Subsequent minor version releases of the OpenAPI Specification (incrementing the minor version number) SHOULD NOT interfere with tooling developed to a lower minor version and same major version. Thus a hypothetical 3.1.0 specification SHOULD be usable with tooling designed for 3.0.0.

    +

    An OpenAPI document compatible with OAS 3.*.* contains a required openapi field which designates the semantic version of the OAS that it uses. (OAS 2.0 documents contain a top-level version field named swagger and value "2.0".)

    +

    4.2 Format

    An OpenAPI document that conforms to the OpenAPI Specification is itself a JSON object, which may be represented either in JSON or YAML format.

    For example, if a field has an array value, the JSON array representation will be used:

    
     {
    -   "field": [ 1, 2, 3 ]
    +   "field": [ 1, 2, 3 ]
     }
     

    All field names in the specification are case sensitive.

    The schema exposes two types of fields: Fixed fields, which have a declared name, and Patterned fields, which declare a regex pattern for the field name.

    -

    Patterned fields MUST have unique names within the containing object.

    -

    In order to preserve the ability to round-trip between YAML and JSON formats, YAML version 1.2 is RECOMMENDED along with some additional constraints:

    +

    Patterned fields MUST have unique names within the containing object.

    +

    In order to preserve the ability to round-trip between YAML and JSON formats, YAML version 1.2 is RECOMMENDED along with some additional constraints:

    Note: While APIs may be defined by OpenAPI documents in either YAML or JSON format, the API request and response bodies and other content are not required to be JSON or YAML.

    -

    Document Structure

    -

    An OpenAPI document MAY be made up of a single document or be divided into multiple, connected parts at the discretion of the user. In the latter case, $ref fields MUST be used in the specification to reference those parts as follows from the JSON Schema definitions.

    -

    It is RECOMMENDED that the root OpenAPI document be named: openapi.json or openapi.yaml.

    -

    Data Types

    +

    4.3 Document Structure

    +

    An OpenAPI document MAY be made up of a single document or be divided into multiple, connected parts at the discretion of the user. In the latter case, $ref fields MUST be used in the specification to reference those parts as follows from the JSON Schema definitions.

    +

    It is RECOMMENDED that the root OpenAPI document be named: openapi.json or openapi.yaml.

    +

    4.4 Data Types

    Primitive data types in the OAS are based on the types supported by the JSON Schema Specification Wright Draft 00. Note that integer as a type is also supported and is defined as a JSON number without a fraction or exponent part. null is not supported as a type (see nullable for an alternative solution). Models are defined using the Schema Object, which is an extended subset of JSON Schema Specification Wright Draft 00.

    -

    Primitives have an optional modifier property: format. +

    Primitives have an optional modifier property: format. OAS uses several known formats to define in fine detail the data type being used. However, to support documentation needs, the format property is an open string-valued property, and can have any value. -Formats such as "email", "uuid", and so on, MAY be used even though undefined by this specification. -Types that are not accompanied by a format property follow the type definition in the JSON Schema. Tools that do not recognize a specific format MAY default back to the type alone, as if the format is not specified.

    +Formats such as "email", "uuid", and so on, MAY be used even though undefined by this specification. +Types that are not accompanied by a format property follow the type definition in the JSON Schema. Tools that do not recognize a specific format MAY default back to the type alone, as if the format is not specified.

    The formats defined by the OAS are:

    @@ -138,13 +359,13 @@ - + - + @@ -154,18 +375,18 @@
    date string dateAs defined by full-date - [!RFC3339]As defined by full-date - [RFC3339]
    dateTime string date-timeAs defined by date-time - [!RFC3339]As defined by date-time - [RFC3339]
    password
    -

    Rich Text Formatting

    +

    4.5 Rich Text Formatting

    Throughout the specification description fields are noted as supporting CommonMark markdown formatting. -Where OpenAPI tooling renders rich text it MUST support, at a minimum, markdown syntax as described by CommonMark 0.27. Tooling MAY choose to ignore some CommonMark features to address security concerns.

    -

    Relative References in URLs

    -

    Unless specified otherwise, all properties that are URLs MAY be relative references as defined by [[!RFC3986]]. +Where OpenAPI tooling renders rich text it MUST support, at a minimum, markdown syntax as described by CommonMark 0.27. Tooling MAY choose to ignore some CommonMark features to address security concerns.

    +

    4.6 Relative References in URLs

    +

    Unless specified otherwise, all properties that are URLs MAY be relative references as defined by [RFC3986]. Relative references are resolved using the URLs defined in the Server Object as a Base URI.

    Relative references used in $ref are processed as per JSON Reference, using the URL of the current document as the base URI. See also the Reference Object.

    -

    Schema

    -

    In the following description, if a field is not explicitly REQUIRED or described with a MUST or SHALL, it can be considered OPTIONAL.

    -

    OpenAPI Object

    +

    4.7 Schema

    +

    In the following description, if a field is not explicitly REQUIRED or described with a MUST or SHALL, it can be considered OPTIONAL.

    +

    4.7.1 OpenAPI Object

    This is the root document object of the OpenAPI document.

    -

    Fixed Fields

    +
    4.7.1.1 Fixed Fields
    @@ -176,52 +397,52 @@ - + - + - + - + - + - + - + - + - + - + - + - +
    openapiopenapi stringREQUIRED. This string MUST be the semantic version number of the OpenAPI Specification version that the OpenAPI document uses. The openapi field SHOULD be used by tooling specifications and clients to interpret the OpenAPI document. This is not related to the API info.version string.REQUIRED. This string MUST be the semantic version number of the OpenAPI Specification version that the OpenAPI document uses. The openapi field SHOULD be used by tooling specifications and clients to interpret the OpenAPI document. This is not related to the API info.version string.
    infoinfo Info ObjectREQUIRED. Provides metadata about the API. The metadata MAY be used by tooling as required.REQUIRED. Provides metadata about the API. The metadata MAY be used by tooling as required.
    serversservers [Server Object] An array of Server Objects, which provide connectivity information to a target server. If the servers property is not provided, or is an empty array, the default value would be a Server Object with a url value of /.
    pathspaths Paths ObjectREQUIRED. The available paths and operations for the API.REQUIRED. The available paths and operations for the API.
    componentscomponents Components Object An element to hold various schemas for the specification.
    securitysecurity [Security Requirement Object] A declaration of which security mechanisms can be used across the API. The list of values includes alternative security requirement objects that can be used. Only one of the security requirement objects need to be satisfied to authorize a request. Individual operations can override this definition.
    tagstags [Tag Object]A list of tags used by the specification with additional metadata. The order of the tags can be used to reflect on their order by the parsing tools. Not all tags that are used by the Operation Object must be declared. The tags that are not declared MAY be organized randomly or based on the tools’ logic. Each tag name in the list MUST be unique.A list of tags used by the specification with additional metadata. The order of the tags can be used to reflect on their order by the parsing tools. Not all tags that are used by the Operation Object must be declared. The tags that are not declared MAY be organized randomly or based on the tools’ logic. Each tag name in the list MUST be unique.
    externalDocsexternalDocs External Documentation Object Additional external documentation.
    -

    This object MAY be extended with Specification Extensions.

    -

    Info Object

    +

    This object MAY be extended with Specification Extensions.

    +

    4.7.2 Info Object

    The object provides metadata about the API. -The metadata MAY be used by the clients if needed, and MAY be presented in editing or documentation generation tools for convenience.

    -

    Fixed Fields

    +The metadata MAY be used by the clients if needed, and MAY be presented in editing or documentation generation tools for convenience.

    +
    4.7.2.1 Fixed Fields
    @@ -232,54 +453,54 @@ - + - + - + - + - + - + - + - + - + - +
    titletitle stringREQUIRED. The title of the application.REQUIRED. The title of the application.
    descriptiondescription stringA short description of the application. CommonMark syntax MAY be used for rich text representation.A short description of the application. CommonMark syntax MAY be used for rich text representation.
    termsOfServicetermsOfService stringA URL to the Terms of Service for the API. MUST be in the format of a URL.A URL to the Terms of Service for the API. MUST be in the format of a URL.
    contactcontact Contact Object The contact information for the exposed API.
    licenselicense License Object The license information for the exposed API.
    versionversion stringREQUIRED. The version of the OpenAPI document (which is distinct from the OpenAPI Specification version or the API implementation version).REQUIRED. The version of the OpenAPI document (which is distinct from the OpenAPI Specification version or the API implementation version).
    -

    This object MAY be extended with Specification Extensions.

    -

    Info Object Example:

    +

    This object MAY be extended with Specification Extensions.

    +
    4.7.2.2 Info Object Example:
    
     {
    -  "title": "Sample Pet Store App",
    -  "description": "This is a sample server for a pet store.",
    -  "termsOfService": "http://example.com/terms/",
    -  "contact": {
    -    "name": "API Support",
    -    "url": "http://www.example.com/support",
    -    "email": "support@example.com"
    +  "title": "Sample Pet Store App",
    +  "description": "This is a sample server for a pet store.",
    +  "termsOfService": "http://example.com/terms/",
    +  "contact": {
    +    "name": "API Support",
    +    "url": "http://www.example.com/support",
    +    "email": "support@example.com"
       },
    -  "license": {
    -    "name": "Apache 2.0",
    -    "url": "https://www.apache.org/licenses/LICENSE-2.0.html"
    +  "license": {
    +    "name": "Apache 2.0",
    +    "url": "https://www.apache.org/licenses/LICENSE-2.0.html"
       },
    -  "version": "1.0.1"
    +  "version": "1.0.1"
     }
     
    
    @@ -295,9 +516,9 @@
       url: https://www.apache.org/licenses/LICENSE-2.0.html
     version: 1.0.1
     
    -

    Contact Object

    +

    4.7.3 Contact Object

    Contact information for the exposed API.

    -

    Fixed Fields

    +
    4.7.3.1 Fixed Fields
    @@ -308,29 +529,29 @@ - + - + - + - + - +
    namename string The identifying name of the contact person/organization.
    urlurl stringThe URL pointing to the contact information. MUST be in the format of a URL.The URL pointing to the contact information. MUST be in the format of a URL.
    emailemail stringThe email address of the contact person/organization. MUST be in the format of an email address.The email address of the contact person/organization. MUST be in the format of an email address.
    -

    This object MAY be extended with Specification Extensions.

    -

    Contact Object Example:

    +

    This object MAY be extended with Specification Extensions.

    +
    4.7.3.2 Contact Object Example:
    
     {
    -  "name": "API Support",
    -  "url": "http://www.example.com/support",
    -  "email": "support@example.com"
    +  "name": "API Support",
    +  "url": "http://www.example.com/support",
    +  "email": "support@example.com"
     }
     
    
    @@ -338,9 +559,9 @@
     url: http://www.example.com/support
     email: support@example.com
     
    -

    License Object

    +

    4.7.4 License Object

    License information for the exposed API.

    -

    Fixed Fields

    +
    4.7.4.1 Fixed Fields
    @@ -351,32 +572,32 @@ - + - + - + - +
    namename stringREQUIRED. The license name used for the API.REQUIRED. The license name used for the API.
    urlurl stringA URL to the license used for the API. MUST be in the format of a URL.A URL to the license used for the API. MUST be in the format of a URL.
    -

    This object MAY be extended with Specification Extensions.

    -

    License Object Example:

    +

    This object MAY be extended with Specification Extensions.

    +
    4.7.4.2 License Object Example:
    
     {
    -  "name": "Apache 2.0",
    -  "url": "https://www.apache.org/licenses/LICENSE-2.0.html"
    +  "name": "Apache 2.0",
    +  "url": "https://www.apache.org/licenses/LICENSE-2.0.html"
     }
     
    
     name: Apache 2.0
     url: https://www.apache.org/licenses/LICENSE-2.0.html
     
    -

    Server Object

    +

    4.7.5 Server Object

    An object representing a Server.

    -

    Fixed Fields

    +
    4.7.5.1 Fixed Fields
    @@ -387,29 +608,29 @@ - + - + - + - + - +
    urlurl stringREQUIRED. A URL to the target host. This URL supports Server Variables and MAY be relative, to indicate that the host location is relative to the location where the OpenAPI document is being served. Variable substitutions will be made when a variable is named in {brackets}.REQUIRED. A URL to the target host. This URL supports Server Variables and MAY be relative, to indicate that the host location is relative to the location where the OpenAPI document is being served. Variable substitutions will be made when a variable is named in {brackets}.
    descriptiondescription stringAn optional string describing the host designated by the URL. CommonMark syntax MAY be used for rich text representation.An optional string describing the host designated by the URL. CommonMark syntax MAY be used for rich text representation.
    variablesvariables Map[string, Server Variable Object] A map between a variable name and its value. The value is used for substitution in the server’s URL template.
    -

    This object MAY be extended with Specification Extensions.

    -

    Server Object Example

    +

    This object MAY be extended with Specification Extensions.

    +
    4.7.5.2 Server Object Example

    A single server would be described as:

    
     {
    -  "url": "https://development.gigantic-server.com/v1",
    -  "description": "Development server"
    +  "url": "https://development.gigantic-server.com/v1",
    +  "description": "Development server"
     }
     
    
    @@ -419,18 +640,18 @@
     

    The following shows how multiple servers can be described, for example, at the OpenAPI Object’s servers:

    
     {
    -  "servers": [
    +  "servers": [
         {
    -      "url": "https://development.gigantic-server.com/v1",
    -      "description": "Development server"
    +      "url": "https://development.gigantic-server.com/v1",
    +      "description": "Development server"
         },
         {
    -      "url": "https://staging.gigantic-server.com/v1",
    -      "description": "Staging server"
    +      "url": "https://staging.gigantic-server.com/v1",
    +      "description": "Staging server"
         },
         {
    -      "url": "https://api.gigantic-server.com/v1",
    -      "description": "Production server"
    +      "url": "https://api.gigantic-server.com/v1",
    +      "description": "Production server"
         }
       ]
     }
    @@ -447,24 +668,24 @@
     

    The following shows how variables can be used for a server configuration:

    
     {
    -  "servers": [
    +  "servers": [
         {
    -      "url": "https://{username}.gigantic-server.com:{port}/{basePath}",
    -      "description": "The production API server",
    -      "variables": {
    -        "username": {
    -          "default": "demo",
    -          "description": "this value is assigned by the service provider, in this example `gigantic-server.com`"
    +      "url": "https://{username}.gigantic-server.com:{port}/{basePath}",
    +      "description": "The production API server",
    +      "variables": {
    +        "username": {
    +          "default": "demo",
    +          "description": "this value is assigned by the service provider, in this example `gigantic-server.com`"
             },
    -        "port": {
    -          "enum": [
    -            "8443",
    -            "443"
    +        "port": {
    +          "enum": [
    +            "8443",
    +            "443"
               ],
    -          "default": "8443"
    +          "default": "8443"
             },
    -        "basePath": {
    -          "default": "v2"
    +        "basePath": {
    +          "default": "v2"
             }
           }
         }
    @@ -482,16 +703,16 @@
           description: this value is assigned by the service provider, in this example `gigantic-server.com`
         port:
           enum:
    -        - '8443'
    -        - '443'
    -      default: '8443'
    +        - '8443'
    +        - '443'
    +      default: '8443'
         basePath:
           # open meaning there is the opportunity to use special base paths as assigned by the provider, default is `v2`
           default: v2
     
    -

    Server Variable Object

    +

    4.7.6 Server Variable Object

    An object representing a Server Variable for server URL template substitution.

    -

    Fixed Fields

    +
    4.7.6.1 Fixed Fields
    @@ -502,27 +723,27 @@ - + - + - + - + - +
    enumenum [string] An enumeration of string values to be used if the substitution options are from a limited set.
    defaultdefault stringREQUIRED. The default value to use for substitution, and to send, if an alternate value is not supplied. Unlike the Schema Object’s default, this value MUST be provided by the consumer.REQUIRED. The default value to use for substitution, and to send, if an alternate value is not supplied. Unlike the Schema Object’s default, this value MUST be provided by the consumer.
    descriptiondescription stringAn optional description for the server variable. CommonMark syntax MAY be used for rich text representation.An optional description for the server variable. CommonMark syntax MAY be used for rich text representation.
    -

    This object MAY be extended with Specification Extensions.

    -

    Components Object

    +

    This object MAY be extended with Specification Extensions.

    +

    4.7.7 Components Object

    Holds a set of reusable objects for different aspects of the OAS. All objects defined within the components object will have no effect on the API unless they are explicitly referenced from properties outside the components object.

    -

    Fixed Fields

    +
    4.7.7.1 Fixed Fields
    @@ -533,145 +754,145 @@ - + - + - + - + - + - + - + - + - +
    schemas schemas Map[string, Schema Object | Reference Object] An object to hold reusable Schema Objects.
    responses responses Map[string, Response Object | Reference Object] An object to hold reusable Response Objects.
    parameters parameters Map[string, Parameter Object | Reference Object] An object to hold reusable Parameter Objects.
    examples examples Map[string, Example Object | Reference Object] An object to hold reusable Example Objects.
    requestBodies requestBodies Map[string, Request Body Object | Reference Object] An object to hold reusable Request Body Objects.
    headers headers Map[string, Header Object | Reference Object] An object to hold reusable Header Objects.
    securitySchemes securitySchemes Map[string, Security Scheme Object | Reference Object] An object to hold reusable Security Scheme Objects.
    links links Map[string, Link Object | Reference Object] An object to hold reusable Link Objects.
    callbacks callbacks Map[string, Callback Object | Reference Object] An object to hold reusable Callback Objects.
    -

    This object MAY be extended with Specification Extensions.

    -

    All the fixed fields declared above are objects that MUST use keys that match the regular expression: ^[a-zA-Z0-9\.\-_]+$.

    +

    This object MAY be extended with Specification Extensions.

    +

    All the fixed fields declared above are objects that MUST use keys that match the regular expression: ^[a-zA-Z0-9\.\-_]+$.

    Field Name Examples:

    -
    
    +
    
     User
     User_1
     User_Name
     user-name
     my.org.User
     
    -

    Components Object Example

    +
    4.7.7.2 Components Object Example
    
    -"components": {
    -  "schemas": {
    -    "Category": {
    -      "type": "object",
    -      "properties": {
    -        "id": {
    -          "type": "integer",
    -          "format": "int64"
    +"components": {
    +  "schemas": {
    +    "Category": {
    +      "type": "object",
    +      "properties": {
    +        "id": {
    +          "type": "integer",
    +          "format": "int64"
             },
    -        "name": {
    -          "type": "string"
    +        "name": {
    +          "type": "string"
             }
           }
         },
    -    "Tag": {
    -      "type": "object",
    -      "properties": {
    -        "id": {
    -          "type": "integer",
    -          "format": "int64"
    +    "Tag": {
    +      "type": "object",
    +      "properties": {
    +        "id": {
    +          "type": "integer",
    +          "format": "int64"
             },
    -        "name": {
    -          "type": "string"
    +        "name": {
    +          "type": "string"
             }
           }
         }
       },
    -  "parameters": {
    -    "skipParam": {
    -      "name": "skip",
    -      "in": "query",
    -      "description": "number of items to skip",
    -      "required": true,
    -      "schema": {
    -        "type": "integer",
    -        "format": "int32"
    +  "parameters": {
    +    "skipParam": {
    +      "name": "skip",
    +      "in": "query",
    +      "description": "number of items to skip",
    +      "required": true,
    +      "schema": {
    +        "type": "integer",
    +        "format": "int32"
           }
         },
    -    "limitParam": {
    -      "name": "limit",
    -      "in": "query",
    -      "description": "max records to return",
    -      "required": true,
    -      "schema" : {
    -        "type": "integer",
    -        "format": "int32"
    +    "limitParam": {
    +      "name": "limit",
    +      "in": "query",
    +      "description": "max records to return",
    +      "required": true,
    +      "schema" : {
    +        "type": "integer",
    +        "format": "int32"
           }
         }
       },
    -  "responses": {
    -    "NotFound": {
    -      "description": "Entity not found."
    +  "responses": {
    +    "NotFound": {
    +      "description": "Entity not found."
         },
    -    "IllegalInput": {
    -      "description": "Illegal input for operation."
    +    "IllegalInput": {
    +      "description": "Illegal input for operation."
         },
    -    "GeneralError": {
    -      "description": "General Error",
    -      "content": {
    -        "application/json": {
    -          "schema": {
    -            "$ref": "#/components/schemas/GeneralError"
    +    "GeneralError": {
    +      "description": "General Error",
    +      "content": {
    +        "application/json": {
    +          "schema": {
    +            "$ref": "#/components/schemas/GeneralError"
               }
             }
           }
         }
       },
    -  "securitySchemes": {
    -    "api_key": {
    -      "type": "apiKey",
    -      "name": "api_key",
    -      "in": "header"
    +  "securitySchemes": {
    +    "api_key": {
    +      "type": "apiKey",
    +      "name": "api_key",
    +      "in": "header"
         },
    -    "petstore_auth": {
    -      "type": "oauth2",
    -      "flows": {
    -        "implicit": {
    -          "authorizationUrl": "http://example.org/api/oauth/dialog",
    -          "scopes": {
    -            "write:pets": "modify pets in your account",
    -            "read:pets": "read your pets"
    +    "petstore_auth": {
    +      "type": "oauth2",
    +      "flows": {
    +        "implicit": {
    +          "authorizationUrl": "http://example.org/api/oauth/dialog",
    +          "scopes": {
    +            "write:pets": "modify pets in your account",
    +            "read:pets": "read your pets"
               }
             }
           }
    @@ -725,7 +946,7 @@
           content:
             application/json:
               schema:
    -            $ref: '#/components/schemas/GeneralError'
    +            $ref: '#/components/schemas/GeneralError'
       securitySchemes:
         api_key:
           type: apiKey
    @@ -740,10 +961,10 @@
                 write:pets: modify pets in your account
                 read:pets: read your pets
     
    -

    Paths Object

    +

    4.7.8 Paths Object

    Holds the relative paths to the individual endpoints and their operations. -The path is appended to the URL from the Server Object in order to construct the full URL. The Paths MAY be empty, due to ACL constraints.

    -

    Patterned Fields

    +The path is appended to the URL from the Server Object in order to construct the full URL. The Paths MAY be empty, due to ACL constraints.

    +
    4.7.8.1 Patterned Fields
    @@ -754,44 +975,44 @@ - + - +
    /{path}/{path} Path Item ObjectA relative path to an individual endpoint. The field name MUST begin with a slash. The path is appended (no relative URL resolution) to the expanded URL from the Server Object’s url field in order to construct the full URL. Path templating is allowed. When matching URLs, concrete (non-templated) paths would be matched before their templated counterparts. Templated paths with the same hierarchy but different templated names MUST NOT exist as they are identical. In case of ambiguous matching, it’s up to the tooling to decide which one to use.A relative path to an individual endpoint. The field name MUST begin with a slash. The path is appended (no relative URL resolution) to the expanded URL from the Server Object’s url field in order to construct the full URL. Path templating is allowed. When matching URLs, concrete (non-templated) paths would be matched before their templated counterparts. Templated paths with the same hierarchy but different templated names MUST NOT exist as they are identical. In case of ambiguous matching, it’s up to the tooling to decide which one to use.
    -

    This object MAY be extended with Specification Extensions.

    -

    Path Templating Matching

    +

    This object MAY be extended with Specification Extensions.

    +
    4.7.8.2 Path Templating Matching

    Assuming the following paths, the concrete definition, /pets/mine, will be matched first if used:

    -
    
    +
    
       /pets/{petId}
       /pets/mine
     

    The following paths are considered identical and invalid:

    -
    
    +
    
       /pets/{petId}
       /pets/{name}
     

    The following may lead to ambiguous resolution:

    -
    
    +
    
       /{entity}/me
       /books/{id}
     
    -

    Paths Object Example

    +
    4.7.8.3 Paths Object Example
    
     {
    -  "/pets": {
    -    "get": {
    -      "description": "Returns all pets from the system that the user has access to",
    -      "responses": {
    -        "200": {         
    -          "description": "A list of pets.",
    -          "content": {
    -            "application/json": {
    -              "schema": {
    -                "type": "array",
    -                "items": {
    -                  "$ref": "#/components/schemas/pet"
    +  "/pets": {
    +    "get": {
    +      "description": "Returns all pets from the system that the user has access to",
    +      "responses": {
    +        "200": {         
    +          "description": "A list of pets.",
    +          "content": {
    +            "application/json": {
    +              "schema": {
    +                "type": "array",
    +                "items": {
    +                  "$ref": "#/components/schemas/pet"
                     }
                   }
                 }
    @@ -807,20 +1028,20 @@
       get:
         description: Returns all pets from the system that the user has access to
         responses:
    -      '200':
    +      '200':
             description: A list of pets.
             content:
               application/json:
                 schema:
                   type: array
                   items:
    -                $ref: '#/components/schemas/pet'
    +                $ref: '#/components/schemas/pet'
     
    -

    Path Item Object

    +

    4.7.9 Path Item Object

    Describes the operations available on a single path. -A Path Item MAY be empty, due to ACL constraints. +A Path Item MAY be empty, due to ACL constraints. The path itself is still exposed to the documentation viewer but they will not know which operations and parameters are available.

    -

    Fixed Fields

    +
    4.7.9.1 Fixed Fields
    @@ -831,119 +1052,119 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
    $ref$ref stringAllows for an external definition of this path item. The referenced structure MUST be in the format of a Path Item Object. If there are conflicts between the referenced definition and this Path Item’s definition, the behavior is undefined.Allows for an external definition of this path item. The referenced structure MUST be in the format of a Path Item Object. If there are conflicts between the referenced definition and this Path Item’s definition, the behavior is undefined.
    summarysummary string An optional, string summary, intended to apply to all operations in this path.
    descriptiondescription stringAn optional, string description, intended to apply to all operations in this path. CommonMark syntax MAY be used for rich text representation.An optional, string description, intended to apply to all operations in this path. CommonMark syntax MAY be used for rich text representation.
    getget Operation Object A definition of a GET operation on this path.
    putput Operation Object A definition of a PUT operation on this path.
    postpost Operation Object A definition of a POST operation on this path.
    deletedelete Operation Object A definition of a DELETE operation on this path.
    optionsoptions Operation Object A definition of a OPTIONS operation on this path.
    headhead Operation Object A definition of a HEAD operation on this path.
    patchpatch Operation Object A definition of a PATCH operation on this path.
    tracetrace Operation Object A definition of a TRACE operation on this path.
    serversservers [Server Object] An alternative server array to service all operations in this path.
    parametersparameters [Parameter Object | Reference Object]A list of parameters that are applicable for all the operations described under this path. These parameters can be overridden at the operation level, but cannot be removed there. The list MUST NOT include duplicated parameters. A unique parameter is defined by a combination of a name and location. The list can use the Reference Object to link to parameters that are defined at the OpenAPI Object’s components/parameters.A list of parameters that are applicable for all the operations described under this path. These parameters can be overridden at the operation level, but cannot be removed there. The list MUST NOT include duplicated parameters. A unique parameter is defined by a combination of a name and location. The list can use the Reference Object to link to parameters that are defined at the OpenAPI Object’s components/parameters.
    -

    This object MAY be extended with Specification Extensions.

    -

    Path Item Object Example

    +

    This object MAY be extended with Specification Extensions.

    +
    4.7.9.2 Path Item Object Example
    
     {
    -  "get": {
    -    "description": "Returns pets based on ID",
    -    "summary": "Find pets by ID",
    -    "operationId": "getPetsById",
    -    "responses": {
    -      "200": {
    -        "description": "pet response",
    -        "content": {
    -          "*/*": {
    -            "schema": {
    -              "type": "array",
    -              "items": {
    -                "$ref": "#/components/schemas/Pet"
    +  "get": {
    +    "description": "Returns pets based on ID",
    +    "summary": "Find pets by ID",
    +    "operationId": "getPetsById",
    +    "responses": {
    +      "200": {
    +        "description": "pet response",
    +        "content": {
    +          "*/*": {
    +            "schema": {
    +              "type": "array",
    +              "items": {
    +                "$ref": "#/components/schemas/Pet"
                   }
                 }
               }
             }
           },
    -      "default": {
    -        "description": "error payload",
    -        "content": {
    -          "text/html": {
    -            "schema": {
    -              "$ref": "#/components/schemas/ErrorModel"
    +      "default": {
    +        "description": "error payload",
    +        "content": {
    +          "text/html": {
    +            "schema": {
    +              "$ref": "#/components/schemas/ErrorModel"
                 }
               }
             }
           }
         }
       },
    -  "parameters": [
    +  "parameters": [
         {
    -      "name": "id",
    -      "in": "path",
    -      "description": "ID of pet to use",
    -      "required": true,
    -      "schema": {
    -        "type": "array",
    -        "items": {
    -          "type": "string"
    +      "name": "id",
    +      "in": "path",
    +      "description": "ID of pet to use",
    +      "required": true,
    +      "schema": {
    +        "type": "array",
    +        "items": {
    +          "type": "string"
             }
           },
    -      "style": "simple"
    +      "style": "simple"
         }
       ]
     }
    @@ -954,20 +1175,20 @@
       summary: Find pets by ID
       operationId: getPetsById
       responses:
    -    '200':
    +    '200':
           description: pet response
           content:
    -        '*/*' :
    +        '*/*' :
               schema:
                 type: array
                 items:
    -              $ref: '#/components/schemas/Pet'
    +              $ref: '#/components/schemas/Pet'
         default:
           description: error payload
           content:
    -        'text/html':
    +        'text/html':
               schema:
    -            $ref: '#/components/schemas/ErrorModel'
    +            $ref: '#/components/schemas/ErrorModel'
     parameters:
     - name: id
       in: path
    @@ -979,9 +1200,9 @@
         items:
           type: string 
     
    -

    Operation Object

    +

    4.7.10 Operation Object

    Describes a single API operation on a path.

    -

    Fixed Fields

    +
    4.7.10.1 Fixed Fields
    @@ -992,128 +1213,128 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
    tagstags [string] A list of tags for API documentation control. Tags can be used for logical grouping of operations by resources or any other qualifier.
    summarysummary string A short summary of what the operation does.
    descriptiondescription stringA verbose explanation of the operation behavior. CommonMark syntax MAY be used for rich text representation.A verbose explanation of the operation behavior. CommonMark syntax MAY be used for rich text representation.
    externalDocsexternalDocs External Documentation Object Additional external documentation for this operation.
    operationIdoperationId stringUnique string used to identify the operation. The id MUST be unique among all operations described in the API. Tools and libraries MAY use the operationId to uniquely identify an operation, therefore, it is RECOMMENDED to follow common programming naming conventions.Unique string used to identify the operation. The id MUST be unique among all operations described in the API. Tools and libraries MAY use the operationId to uniquely identify an operation, therefore, it is RECOMMENDED to follow common programming naming conventions.
    parametersparameters [Parameter Object | Reference Object]A list of parameters that are applicable for this operation. If a parameter is already defined at the Path Item, the new definition will override it but can never remove it. The list MUST NOT include duplicated parameters. A unique parameter is defined by a combination of a name and location. The list can use the Reference Object to link to parameters that are defined at the OpenAPI Object’s components/parameters.A list of parameters that are applicable for this operation. If a parameter is already defined at the Path Item, the new definition will override it but can never remove it. The list MUST NOT include duplicated parameters. A unique parameter is defined by a combination of a name and location. The list can use the Reference Object to link to parameters that are defined at the OpenAPI Object’s components/parameters.
    requestBodyrequestBody Request Body Object | Reference ObjectThe request body applicable for this operation. The requestBody is only supported in HTTP methods where the HTTP 1.1 specification [[!RFC7231]] has explicitly defined semantics for request bodies. In other cases where the HTTP spec is vague, requestBody SHALL be ignored by consumers.The request body applicable for this operation. The requestBody is only supported in HTTP methods where the HTTP 1.1 specification [RFC7231] has explicitly defined semantics for request bodies. In other cases where the HTTP spec is vague, requestBody SHALL be ignored by consumers.
    responsesresponses Responses ObjectREQUIRED. The list of possible responses as they are returned from executing this operation.REQUIRED. The list of possible responses as they are returned from executing this operation.
    callbackscallbacks Map[string, Callback Object | Reference Object] A map of possible out-of band callbacks related to the parent operation. The key is a unique identifier for the Callback Object. Each value in the map is a Callback Object that describes a request that may be initiated by the API provider and the expected responses. The key value used to identify the callback object is an expression, evaluated at runtime, that identifies a URL to use for the callback operation.
    deprecateddeprecated booleanDeclares this operation to be deprecated. Consumers SHOULD refrain from usage of the declared operation. Default value is false.Declares this operation to be deprecated. Consumers SHOULD refrain from usage of the declared operation. Default value is false.
    securitysecurity [Security Requirement Object] A declaration of which security mechanisms can be used for this operation. The list of values includes alternative security requirement objects that can be used. Only one of the security requirement objects need to be satisfied to authorize a request. This definition overrides any declared top-level security. To remove a top-level security declaration, an empty array can be used.
    serversservers [Server Object] An alternative server array to service this operation. If an alternative server object is specified at the Path Item Object or Root level, it will be overridden by this value.
    -

    This object MAY be extended with Specification Extensions.

    -

    Operation Object Example

    +

    This object MAY be extended with Specification Extensions.

    +
    4.7.10.2 Operation Object Example
    
     {
    -  "tags": [
    -    "pet"
    +  "tags": [
    +    "pet"
       ],
    -  "summary": "Updates a pet in the store with form data",
    -  "operationId": "updatePetWithForm",
    -  "parameters": [
    +  "summary": "Updates a pet in the store with form data",
    +  "operationId": "updatePetWithForm",
    +  "parameters": [
         {
    -      "name": "petId",
    -      "in": "path",
    -      "description": "ID of pet that needs to be updated",
    -      "required": true,
    -      "schema": {
    -        "type": "string"
    +      "name": "petId",
    +      "in": "path",
    +      "description": "ID of pet that needs to be updated",
    +      "required": true,
    +      "schema": {
    +        "type": "string"
           }
         }
       ],
    -  "requestBody": {
    -    "content": {
    -      "application/x-www-form-urlencoded": {
    -        "schema": {
    -          "type": "object",
    -           "properties": {
    -              "name": {
    -                "description": "Updated name of the pet",
    -                "type": "string"
    +  "requestBody": {
    +    "content": {
    +      "application/x-www-form-urlencoded": {
    +        "schema": {
    +          "type": "object",
    +           "properties": {
    +              "name": {
    +                "description": "Updated name of the pet",
    +                "type": "string"
                   },
    -              "status": {
    -                "description": "Updated status of the pet",
    -                "type": "string"
    +              "status": {
    +                "description": "Updated status of the pet",
    +                "type": "string"
                  }
                },
    -        "required": ["status"]
    +        "required": ["status"]
             }
           }
         }
       },
    -  "responses": {
    -    "200": {
    -      "description": "Pet updated.",
    -      "content": {
    -        "application/json": {},
    -        "application/xml": {}
    +  "responses": {
    +    "200": {
    +      "description": "Pet updated.",
    +      "content": {
    +        "application/json": {},
    +        "application/xml": {}
           }
         },
    -    "405": {
    -      "description": "Invalid input",
    -      "content": {
    -        "application/json": {},
    -        "application/xml": {}
    +    "405": {
    +      "description": "Invalid input",
    +      "content": {
    +        "application/json": {},
    +        "application/xml": {}
           }
         }
       },
    -  "security": [
    +  "security": [
         {
    -      "petstore_auth": [
    -        "write:pets",
    -        "read:pets"
    +      "petstore_auth": [
    +        "write:pets",
    +        "read:pets"
           ]
         }
       ]
    @@ -1133,7 +1354,7 @@
         type: string
     requestBody:
       content:
    -    'application/x-www-form-urlencoded':
    +    'application/x-www-form-urlencoded':
           schema:
            properties:
               name:
    @@ -1145,24 +1366,24 @@
            required:
              - status
     responses:
    -  '200':
    +  '200':
         description: Pet updated.
         content:
    -      'application/json': {}
    -      'application/xml': {}
    -  '405':
    +      'application/json': {}
    +      'application/xml': {}
    +  '405':
         description: Invalid input
         content:
    -      'application/json': {}
    -      'application/xml': {}
    +      'application/json': {}
    +      'application/xml': {}
     security:
     - petstore_auth:
       - write:pets
       - read:pets
     
    -

    External Documentation Object

    +

    4.7.11 External Documentation Object

    Allows referencing an external resource for extended documentation.

    -

    Fixed Fields

    +
    4.7.11.1 Fixed Fields
    @@ -1173,41 +1394,41 @@ - + - + - + - +
    descriptiondescription stringA short description of the target documentation. CommonMark syntax MAY be used for rich text representation.A short description of the target documentation. CommonMark syntax MAY be used for rich text representation.
    urlurl stringREQUIRED. The URL for the target documentation. Value MUST be in the format of a URL.REQUIRED. The URL for the target documentation. Value MUST be in the format of a URL.
    -

    This object MAY be extended with Specification Extensions.

    -

    External Documentation Object Example

    +

    This object MAY be extended with Specification Extensions.

    +
    4.7.11.2 External Documentation Object Example
    
     {
    -  "description": "Find more info here",
    -  "url": "https://example.com"
    +  "description": "Find more info here",
    +  "url": "https://example.com"
     }
     
    
     description: Find more info here
     url: https://example.com
     
    -

    Parameter Object

    +

    4.7.12 Parameter Object

    Describes a single operation parameter.

    A unique parameter is defined by a combination of a name and location.

    -

    Parameter Locations

    +
    4.7.12.1 Parameter Locations

    There are four possible parameter locations specified by the in field:

    • path - Used together with Path Templating, where the parameter value is actually part of the operation’s URL. This does not include the host or base path of the API. For example, in /items/{itemId}, the path parameter is itemId.
    • query - Parameters that are appended to the URL. For example, in /items?id=###, the query parameter is id.
    • -
    • header - Custom headers that are expected as part of the request. Note that [[!RFC7230]] states header names are case insensitive.
    • +
    • header - Custom headers that are expected as part of the request. Note that [RFC7230] states header names are case insensitive.
    • cookie - Used to pass a specific cookie value to the API.
    -

    Fixed Fields

    +
    4.7.12.2 Fixed Fields
    @@ -1218,34 +1439,34 @@ - + - + - + - + - + - + - + - + - + - + - + - +
    namename stringREQUIRED. The name of the parameter. Parameter names are case sensitive.
    • If in is "path", the name field MUST correspond to the associated path segment from the path field in the Paths Object. See Path Templating for further information.
    • If in is "header" and the name field is "Accept", "Content-Type" or "Authorization", the parameter definition SHALL be ignored.
    • For all other cases, the name corresponds to the parameter name used by the in property.
    REQUIRED. The name of the parameter. Parameter names are case sensitive.
    • If in is "path", the name field MUST correspond to the associated path segment from the path field in the Paths Object. See Path Templating for further information.
    • If in is "header" and the name field is "Accept", "Content-Type" or "Authorization", the parameter definition SHALL be ignored.
    • For all other cases, the name corresponds to the parameter name used by the in property.
    inin stringREQUIRED. The location of the parameter. Possible values are “query”, “header”, “path” or “cookie”.REQUIRED. The location of the parameter. Possible values are “query”, “header”, “path” or “cookie”.
    descriptiondescription stringA brief description of the parameter. This could contain examples of use. CommonMark syntax MAY be used for rich text representation.A brief description of the parameter. This could contain examples of use. CommonMark syntax MAY be used for rich text representation.
    requiredrequired booleanDetermines whether this parameter is mandatory. If the parameter location is “path”, this property is REQUIRED and its value MUST be true. Otherwise, the property MAY be included and its default value is false.Determines whether this parameter is mandatory. If the parameter location is “path”, this property is REQUIRED and its value MUST be true. Otherwise, the property MAY be included and its default value is false.
    deprecated deprecated booleanSpecifies that a parameter is deprecated and SHOULD be transitioned out of usage.Specifies that a parameter is deprecated and SHOULD be transitioned out of usage.
    allowEmptyValue allowEmptyValue booleanSets the ability to pass empty-valued parameters. This is valid only for query parameters and allows sending a parameter with an empty value. Default value is false. If style is used, and if behavior is n/a (cannot be serialized), the value of allowEmptyValue SHALL be ignored.Sets the ability to pass empty-valued parameters. This is valid only for query parameters and allows sending a parameter with an empty value. Default value is false. If style is used, and if behavior is n/a (cannot be serialized), the value of allowEmptyValue SHALL be ignored.
    @@ -1261,40 +1482,40 @@ - style +style string Describes how the parameter value will be serialized depending on the type of the parameter value. Default values (based on value of in): for query - form; for path - simple; for header - simple; for cookie - form. - explode +explode boolean When this is true, parameter values of type array or object generate separate parameters for each value of the array or key-value pair of the map. For other types of parameters this property has no effect. When style is form, the default value is true. For all other styles, the default value is false. - allowReserved +allowReserved boolean -Determines whether the parameter value SHOULD allow reserved characters, as defined by [[!RFC3986]] :/?#[]@!$&'()*+,;= to be included without percent-encoding. This property only applies to parameters with an in value of query. The default value is false. +Determines whether the parameter value SHOULD allow reserved characters, as defined by [RFC3986] :/?#[]@!$&'()*+,;= to be included without percent-encoding. This property only applies to parameters with an in value of query. The default value is false. - schema +schema Schema Object | Reference Object The schema defining the type used for the parameter. - example +example Any -Example of the media type. The example SHOULD match the specified schema and encoding properties if present. The example field is mutually exclusive of the examples field. Furthermore, if referencing a schema which contains an example, the example value SHALL override the example provided by the schema. To represent examples of media types that cannot naturally be represented in JSON or YAML, a string value can contain the example with escaping where necessary. +Example of the media type. The example SHOULD match the specified schema and encoding properties if present. The example field is mutually exclusive of the examples field. Furthermore, if referencing a schema which contains an example, the example value SHALL override the example provided by the schema. To represent examples of media types that cannot naturally be represented in JSON or YAML, a string value can contain the example with escaping where necessary. - examples +examples Map[ string, Example Object | Reference Object] -Examples of the media type. Each example SHOULD contain a value in the correct format as specified in the parameter encoding. The examples field is mutually exclusive of the example field. Furthermore, if referencing a schema which contains an example, the examples value SHALL override the example provided by the schema. +Examples of the media type. Each example SHOULD contain a value in the correct format as specified in the parameter encoding. The examples field is mutually exclusive of the example field. Furthermore, if referencing a schema which contains an example, the examples value SHALL override the example provided by the schema.

    For more complex scenarios, the content property can define the media type and schema of the parameter. -A parameter MUST contain either a schema property, or a content property, but not both. -When example or examples are provided in conjunction with the schema object, the example MUST follow the prescribed serialization strategy for the parameter.

    +A parameter MUST contain either a schema property, or a content property, but not both. +When example or examples are provided in conjunction with the schema object, the example MUST follow the prescribed serialization strategy for the parameter.

    @@ -1305,13 +1526,13 @@ - + - +
    contentcontent Map[string, Media Type Object]A map containing the representations for the parameter. The key is the media type and the value describes it. The map MUST only contain one entry.A map containing the representations for the parameter. The key is the media type and the value describes it. The map MUST only contain one entry.
    -

    Style Values

    +
    4.7.12.3 Style Values

    In order to support common ways of serializing simple parameters, a set of style values are defined.

    @@ -1327,25 +1548,25 @@ - + - + - + - + @@ -1367,12 +1588,12 @@
    matrix primitive, array, object pathPath-style parameters defined by [[!RFC6570]]Path-style parameters defined by [RFC6570]
    label primitive, array, object pathLabel style parameters defined by [[!RFC6570]]Label style parameters defined by [RFC6570]
    form primitive, array, object query, cookieForm style parameters defined by [[!RFC6570]]. This option replaces collectionFormat with a csv (when explode is false) or multi (when explode is true) value from OpenAPI 2.0.Form style parameters defined by [RFC6570]. This option replaces collectionFormat with a csv (when explode is false) or multi (when explode is true) value from OpenAPI 2.0.
    simple array path, headerSimple style parameters defined by [[!RFC6570]]. This option replaces collectionFormat with a csv value from OpenAPI 2.0.Simple style parameters defined by [RFC6570]. This option replaces collectionFormat with a csv value from OpenAPI 2.0.
    spaceDelimited
    -

    Style Examples

    +
    4.7.12.4 Style Examples

    Assume a parameter named color has one of the following values:

    -
    
    -   string -> "blue"
    -   array -> ["blue","black","brown"]
    -   object -> { "R": 100, "G": 200, "B": 150 }
    +
    
    +   string -> "blue"
    +   array -> ["blue","black","brown"]
    +   object -> { "R": 100, "G": 200, "B": 150 }
     

    The following table shows examples of rendering differences for each value.

    @@ -1473,27 +1694,27 @@ - +
    n/a n/a n/acolor[R]=100&color[G]=200&color[B]=150color[R]=100&color[G]=200&color[B]=150
    -

    This object MAY be extended with Specification Extensions.

    -

    Parameter Object Examples

    +

    This object MAY be extended with Specification Extensions.

    +
    4.7.12.5 Parameter Object Examples

    A header parameter with an array of 64 bit integer numbers:

    
     {
    -  "name": "token",
    -  "in": "header",
    -  "description": "token to be passed as a header",
    -  "required": true,
    -  "schema": {
    -    "type": "array",
    -    "items": {
    -      "type": "integer",
    -      "format": "int64"
    +  "name": "token",
    +  "in": "header",
    +  "description": "token to be passed as a header",
    +  "required": true,
    +  "schema": {
    +    "type": "array",
    +    "items": {
    +      "type": "integer",
    +      "format": "int64"
         }
       },
    -  "style": "simple"
    +  "style": "simple"
     }
     
    
    @@ -1511,12 +1732,12 @@
     

    A path parameter of a string value:

    
     {
    -  "name": "username",
    -  "in": "path",
    -  "description": "username to fetch",
    -  "required": true,
    -  "schema": {
    -    "type": "string"
    +  "name": "username",
    +  "in": "path",
    +  "description": "username to fetch",
    +  "required": true,
    +  "schema": {
    +    "type": "string"
       }
     }
     
    @@ -1531,18 +1752,18 @@

    An optional query parameter of a string value, allowing multiple values by repeating the query parameter:

    
     {
    -  "name": "id",
    -  "in": "query",
    -  "description": "ID of the object to fetch",
    -  "required": false,
    -  "schema": {
    -    "type": "array",
    -    "items": {
    -      "type": "string"
    +  "name": "id",
    +  "in": "query",
    +  "description": "ID of the object to fetch",
    +  "required": false,
    +  "schema": {
    +    "type": "array",
    +    "items": {
    +      "type": "string"
         }
       },
    -  "style": "form",
    -  "explode": true
    +  "style": "form",
    +  "explode": true
     }
     
    
    @@ -1560,15 +1781,15 @@
     

    A free-form query parameter, allowing undefined parameters of a specific type:

    
     {
    -  "in": "query",
    -  "name": "freeForm",
    -  "schema": {
    -    "type": "object",
    -    "additionalProperties": {
    -      "type": "integer"
    +  "in": "query",
    +  "name": "freeForm",
    +  "schema": {
    +    "type": "object",
    +    "additionalProperties": {
    +      "type": "integer"
         },
       },
    -  "style": "form"
    +  "style": "form"
     }
     
    
    @@ -1583,22 +1804,22 @@
     

    A complex parameter using content to define serialization:

    
     {
    -  "in": "query",
    -  "name": "coordinates",
    -  "content": {
    -    "application/json": {
    -      "schema": {
    -        "type": "object",
    -        "required": [
    -          "lat",
    -          "long"
    +  "in": "query",
    +  "name": "coordinates",
    +  "content": {
    +    "application/json": {
    +      "schema": {
    +        "type": "object",
    +        "required": [
    +          "lat",
    +          "long"
             ],
    -        "properties": {
    -          "lat": {
    -            "type": "number"
    +        "properties": {
    +          "lat": {
    +            "type": "number"
               },
    -          "long": {
    -            "type": "number"
    +          "long": {
    +            "type": "number"
               }
             }
           }
    @@ -1622,9 +1843,9 @@
             long:
               type: number
     
    -

    Request Body Object

    +

    4.7.13 Request Body Object

    Describes a single request body.

    -

    Fixed Fields

    +
    4.7.13.1 Fixed Fields
    @@ -1635,64 +1856,64 @@ - + - + - + - + - +
    descriptiondescription stringA brief description of the request body. This could contain examples of use. CommonMark syntax MAY be used for rich text representation.A brief description of the request body. This could contain examples of use. CommonMark syntax MAY be used for rich text representation.
    contentcontent Map[string, Media Type Object]REQUIRED. The content of the request body. The key is a media type or media type range and the value describes it. For requests that match multiple keys, only the most specific key is applicable. e.g. text/plain overrides text/*REQUIRED. The content of the request body. The key is a media type or media type range and the value describes it. For requests that match multiple keys, only the most specific key is applicable. e.g. text/plain overrides text/*
    requiredrequired boolean Determines if the request body is required in the request. Defaults to false.
    -

    This object MAY be extended with Specification Extensions.

    -

    Request Body Examples

    +

    This object MAY be extended with Specification Extensions.

    +
    4.7.13.2 Request Body Examples

    A request body with a referenced model definition.

    
     {
    -  "description": "user to add to the system",
    -  "content": {
    -    "application/json": {
    -      "schema": {
    -        "$ref": "#/components/schemas/User"
    +  "description": "user to add to the system",
    +  "content": {
    +    "application/json": {
    +      "schema": {
    +        "$ref": "#/components/schemas/User"
           },
    -      "examples": {
    -          "user" : {
    -            "summary": "User Example",
    -            "externalValue": "http://foo.bar/examples/user-example.json"
    +      "examples": {
    +          "user" : {
    +            "summary": "User Example",
    +            "externalValue": "http://foo.bar/examples/user-example.json"
               }
             }
         },
    -    "application/xml": {
    -      "schema": {
    -        "$ref": "#/components/schemas/User"
    +    "application/xml": {
    +      "schema": {
    +        "$ref": "#/components/schemas/User"
           },
    -      "examples": {
    -          "user" : {
    -            "summary": "User example in XML",
    -            "externalValue": "http://foo.bar/examples/user-example.xml"
    +      "examples": {
    +          "user" : {
    +            "summary": "User example in XML",
    +            "externalValue": "http://foo.bar/examples/user-example.xml"
               }
             }
         },
    -    "text/plain": {
    -      "examples": {
    -        "user" : {
    -            "summary": "User example in Plain text",
    -            "externalValue": "http://foo.bar/examples/user-example.txt"
    +    "text/plain": {
    +      "examples": {
    +        "user" : {
    +            "summary": "User example in Plain text",
    +            "externalValue": "http://foo.bar/examples/user-example.txt"
             }
           }
         },
    -    "*/*": {
    -      "examples": {
    -        "user" : {
    -            "summary": "User example in other format",
    -            "externalValue": "http://foo.bar/examples/user-example.whatever"
    +    "*/*": {
    +      "examples": {
    +        "user" : {
    +            "summary": "User example in other format",
    +            "externalValue": "http://foo.bar/examples/user-example.whatever"
             }
           }
         }
    @@ -1702,41 +1923,41 @@
     
    
     description: user to add to the system
     content:
    -  'application/json':
    +  'application/json':
         schema:
    -      $ref: '#/components/schemas/User'
    +      $ref: '#/components/schemas/User'
         examples:
           user:
             summary: User Example
    -        externalValue: 'http://foo.bar/examples/user-example.json'
    -  'application/xml':
    +        externalValue: 'http://foo.bar/examples/user-example.json'
    +  'application/xml':
         schema:
    -      $ref: '#/components/schemas/User'
    +      $ref: '#/components/schemas/User'
         examples:
           user:
             summary: User Example in XML
    -        externalValue: 'http://foo.bar/examples/user-example.xml'
    -  'text/plain':
    +        externalValue: 'http://foo.bar/examples/user-example.xml'
    +  'text/plain':
         examples:
           user:
             summary: User example in text plain format
    -        externalValue: 'http://foo.bar/examples/user-example.txt'
    -  '*/*':
    +        externalValue: 'http://foo.bar/examples/user-example.txt'
    +  '*/*':
         examples:
           user:
             summary: User example in other format
    -        externalValue: 'http://foo.bar/examples/user-example.whatever'
    +        externalValue: 'http://foo.bar/examples/user-example.whatever'
     

    A body parameter that is an array of string values:

    
     {
    -  "description": "user to add to the system",
    -  "content": {
    -    "text/plain": {
    -      "schema": {
    -        "type": "array",
    -        "items": {
    -          "type": "string"
    +  "description": "user to add to the system",
    +  "content": {
    +    "text/plain": {
    +      "schema": {
    +        "type": "array",
    +        "items": {
    +          "type": "string"
             }
           }
         }
    @@ -1753,9 +1974,9 @@
           items:
             type: string
     
    -

    Media Type Object

    +

    4.7.14 Media Type Object

    Each Media Type Object provides schema and examples for the media type identified by its key.

    -

    Fixed Fields

    +
    4.7.14.1 Fixed Fields
    @@ -1766,58 +1987,58 @@ - + - + - + - + - + - + - +
    schemaschema Schema Object | Reference Object The schema defining the type used for the request body.
    exampleexample AnyExample of the media type. The example object SHOULD be in the correct format as specified by the media type. The example field is mutually exclusive of the examples field. Furthermore, if referencing a schema which contains an example, the example value SHALL override the example provided by the schema.Example of the media type. The example object SHOULD be in the correct format as specified by the media type. The example field is mutually exclusive of the examples field. Furthermore, if referencing a schema which contains an example, the example value SHALL override the example provided by the schema.
    examplesexamples Map[ string, Example Object | Reference Object]Examples of the media type. Each example object SHOULD match the media type and specified schema if present. The examples field is mutually exclusive of the example field. Furthermore, if referencing a schema which contains an example, the examples value SHALL override the example provided by the schema.Examples of the media type. Each example object SHOULD match the media type and specified schema if present. The examples field is mutually exclusive of the example field. Furthermore, if referencing a schema which contains an example, the examples value SHALL override the example provided by the schema.
    encodingencoding Map[string, Encoding Object]A map between a property name and its encoding information. The key, being the property name, MUST exist in the schema as a property. The encoding object SHALL only apply to requestBody objects when the media type is multipart or application/x-www-form-urlencoded.A map between a property name and its encoding information. The key, being the property name, MUST exist in the schema as a property. The encoding object SHALL only apply to requestBody objects when the media type is multipart or application/x-www-form-urlencoded.
    -

    This object MAY be extended with Specification Extensions.

    -

    Media Type Examples

    +

    This object MAY be extended with Specification Extensions.

    +
    4.7.14.2 Media Type Examples
    
     {
    -  "application/json": {
    -    "schema": {
    -         "$ref": "#/components/schemas/Pet"
    +  "application/json": {
    +    "schema": {
    +         "$ref": "#/components/schemas/Pet"
         },
    -    "examples": {
    -      "cat" : {
    -        "summary": "An example of a cat",
    -        "value":
    +    "examples": {
    +      "cat" : {
    +        "summary": "An example of a cat",
    +        "value":
               {
    -            "name": "Fluffy",
    -            "petType": "Cat",
    -            "color": "White",
    -            "gender": "male",
    -            "breed": "Persian"
    +            "name": "Fluffy",
    +            "petType": "Cat",
    +            "color": "White",
    +            "gender": "male",
    +            "breed": "Persian"
               }
           },
    -      "dog": {
    -        "summary": "An example of a dog with a cat's name",
    -        "value" :  {
    -          "name": "Puma",
    -          "petType": "Dog",
    -          "color": "Black",
    -          "gender": "Female",
    -          "breed": "Mixed"
    +      "dog": {
    +        "summary": "An example of a dog with a cat's name",
    +        "value" :  {
    +          "name": "Puma",
    +          "petType": "Dog",
    +          "color": "Black",
    +          "gender": "Female",
    +          "breed": "Mixed"
             },
    -      "frog": {
    -          "$ref": "#/components/examples/frog-example"
    +      "frog": {
    +          "$ref": "#/components/examples/frog-example"
             }
           }
         }
    @@ -1827,7 +2048,7 @@
     
    
     application/json:
       schema:
    -    $ref: "#/components/schemas/Pet"
    +    $ref: "#/components/schemas/Pet"
       examples:
         cat:
           summary: An example of a cat
    @@ -1838,7 +2059,7 @@
             gender: male
             breed: Persian
         dog:
    -      summary: An example of a dog with a cat's name
    +      summary: An example of a dog with a cat's name
           value:
             name: Puma
             petType: Dog
    @@ -1846,9 +2067,9 @@
             gender: Female
             breed: Mixed
         frog:
    -      $ref: "#/components/examples/frog-example"
    +      $ref: "#/components/examples/frog-example"
     
    -

    Considerations for File Uploads

    +
    4.7.14.3 Considerations for File Uploads

    In contrast with the 2.0 specification, file input/output content in OpenAPI is described with the same semantics as any other schema type. Specifically:

    
     # content transferred with base64 encoding
    @@ -1874,29 +2095,29 @@
             type: string
             format: binary
     
    -

    In addition, specific media types MAY be specified:

    +

    In addition, specific media types MAY be specified:

    
     # multiple, specific media types may be specified:
     requestBody:
       content:
           # a binary file of type png or jpeg
    -    'image/jpeg':
    +    'image/jpeg':
           schema:
             type: string
             format: binary
    -    'image/png':
    +    'image/png':
           schema:
             type: string
             format: binary       
     
    -

    To upload multiple files, a multipart media type MUST be used:

    +

    To upload multiple files, a multipart media type MUST be used:

    
     requestBody:
       content:
         multipart/form-data:
           schema:
             properties:
    -          # The property name 'file' will be used for all files.
    +          # The property name 'file' will be used for all files.
               file:
                 type: array
                 items:
    @@ -1904,8 +2125,8 @@
                   format: binary
     
     
    -

    Support for x-www-form-urlencoded Request Bodies

    -

    To submit content using form url encoding via [[!RFC1866]], the following +

    4.7.14.4 Support for x-www-form-urlencoded Request Bodies
    +

    To submit content using form url encoding via [RFC1866], the following definition may be used:

    
     requestBody:
    @@ -1922,11 +2143,11 @@
                 type: object
                 properties: {}
     
    -

    In this example, the contents in the requestBody MUST be stringified per [[!RFC1866]] when passed to the server. In addition, the address field complex object will be stringified.

    +

    In this example, the contents in the requestBody MUST be stringified per [RFC1866] when passed to the server. In addition, the address field complex object will be stringified.

    When passing complex objects in the application/x-www-form-urlencoded content type, the default serialization strategy of such properties is described in the Encoding Object’s style property as form.

    -

    Special Considerations for multipart Content

    -

    It is common to use multipart/form-data as a Content-Type when transferring request bodies to operations. In contrast to 2.0, a schema is REQUIRED to define the input parameters to the operation when using multipart content. This supports complex structures as well as supporting mechanisms for multiple file uploads.

    -

    When passing in multipart types, boundaries MAY be used to separate sections of the content being transferred — thus, the following default Content-Types are defined for multipart:

    +
    4.7.14.5 Special Considerations for multipart Content
    +

    It is common to use multipart/form-data as a Content-Type when transferring request bodies to operations. In contrast to 2.0, a schema is REQUIRED to define the input parameters to the operation when using multipart content. This supports complex structures as well as supporting mechanisms for multiple file uploads.

    +

    When passing in multipart types, boundaries MAY be used to separate sections of the content being transferred — thus, the following default Content-Types are defined for multipart:

    • If the property is a primitive, or an array of primitive values, the default Content-Type is text/plain
    • If the property is complex, or an array of complex values, the default Content-Type is application/json
    • @@ -1960,12 +2181,12 @@ # default Content-Type for arrays is based on the `inner` type (object shown, so `application/json` in this example) type: array items: - type: '#/components/schemas/Address' + type: '#/components/schemas/Address'

      An encoding attribute is introduced to give you control over the serialization of parts of multipart request bodies. This attribute is only applicable to multipart and application/x-www-form-urlencoded request bodies.

      -

    Encoding Object

    +

    4.7.15 Encoding Object

    A single encoding definition applied to a single schema property.

    -

    Fixed Fields

    +
    4.7.15.1 Fixed Fields
    @@ -1976,34 +2197,34 @@ - + - + - + - + - + - + - + - + - +
    contentTypecontentType string The Content-Type for encoding a specific property. Default value depends on the property type: for string with format being binaryapplication/octet-stream; for other primitive types – text/plain; for object - application/json; for array – the default is defined based on the inner type. The value can be a specific media type (e.g. application/json), a wildcard media type (e.g. image/*), or a comma-separated list of the two types.
    headersheaders Map[string, Header Object | Reference Object]A map allowing additional information to be provided as headers, for example Content-Disposition. Content-Type is described separately and SHALL be ignored in this section. This property SHALL be ignored if the request body media type is not a multipart.A map allowing additional information to be provided as headers, for example Content-Disposition. Content-Type is described separately and SHALL be ignored in this section. This property SHALL be ignored if the request body media type is not a multipart.
    stylestyle stringDescribes how a specific property value will be serialized depending on its type. See Parameter Object for details on the style property. The behavior follows the same values as query parameters, including default values. This property SHALL be ignored if the request body media type is not application/x-www-form-urlencoded.Describes how a specific property value will be serialized depending on its type. See Parameter Object for details on the style property. The behavior follows the same values as query parameters, including default values. This property SHALL be ignored if the request body media type is not application/x-www-form-urlencoded.
    explodeexplode booleanWhen this is true, property values of type array or object generate separate parameters for each value of the array, or key-value-pair of the map. For other types of properties this property has no effect. When style is form, the default value is true. For all other styles, the default value is false. This property SHALL be ignored if the request body media type is not application/x-www-form-urlencoded.When this is true, property values of type array or object generate separate parameters for each value of the array, or key-value-pair of the map. For other types of properties this property has no effect. When style is form, the default value is true. For all other styles, the default value is false. This property SHALL be ignored if the request body media type is not application/x-www-form-urlencoded.
    allowReservedallowReserved booleanDetermines whether the parameter value SHOULD allow reserved characters, as defined by [[!RFC3986]] :/?#[]@!$&'()*+,;= to be included without percent-encoding. The default value is false. This property SHALL be ignored if the request body media type is not application/x-www-form-urlencoded.Determines whether the parameter value SHOULD allow reserved characters, as defined by [RFC3986] :/?#[]@!$&'()*+,;= to be included without percent-encoding. The default value is false. This property SHALL be ignored if the request body media type is not application/x-www-form-urlencoded.
    -

    This object MAY be extended with Specification Extensions.

    -

    Encoding Object Example

    +

    This object MAY be extended with Specification Extensions.

    +
    4.7.15.2 Encoding Object Example
    
     requestBody:
       content:
    @@ -2041,16 +2262,16 @@
                   schema:
                     type: integer
     
    -

    Responses Object

    +

    4.7.16 Responses Object

    A container for the expected responses of an operation. The container maps a HTTP response code to the expected response.

    The documentation is not necessarily expected to cover all possible HTTP response codes because they may not be known in advance. However, documentation is expected to cover a successful operation response and any known errors.

    -

    The default MAY be used as a default response object for all HTTP codes +

    The default MAY be used as a default response object for all HTTP codes that are not covered individually by the specification.

    -

    The Responses Object MUST contain at least one response code, and it -SHOULD be the response for a successful operation call.

    -

    Fixed Fields

    +

    The Responses Object MUST contain at least one response code, and it +SHOULD be the response for a successful operation call.

    +
    4.7.16.1 Fixed Fields
    @@ -2061,13 +2282,13 @@ - +
    defaultdefault Response Object | Reference Object The documentation of responses other than the ones declared for specific HTTP response codes. Use this field to cover undeclared responses. A Reference Object can link to a response that the OpenAPI Object’s components/responses section defines.
    -

    Patterned Fields

    +
    4.7.16.2 Patterned Fields
    @@ -2078,33 +2299,33 @@ - + - +
    HTTP Status CodeHTTP Status Code Response Object | Reference ObjectAny HTTP status code can be used as the property name, but only one property per code, to describe the expected response for that HTTP status code. A Reference Object can link to a response that is defined in the OpenAPI Object’s components/responses section. This field MUST be enclosed in quotation marks (for example, “200”) for compatibility between JSON and YAML. To define a range of response codes, this field MAY contain the uppercase wildcard character X. For example, 2XX represents all response codes between [200-299]. The following range definitions are allowed: 1XX, 2XX, 3XX, 4XX, and 5XX. If a response range is defined using an explicit code, the explicit code definition takes precedence over the range definition for that code.Any HTTP status code can be used as the property name, but only one property per code, to describe the expected response for that HTTP status code. A Reference Object can link to a response that is defined in the OpenAPI Object’s components/responses section. This field MUST be enclosed in quotation marks (for example, “200”) for compatibility between JSON and YAML. To define a range of response codes, this field MAY contain the uppercase wildcard character X. For example, 2XX represents all response codes between [200-299]. The following range definitions are allowed: 1XX, 2XX, 3XX, 4XX, and 5XX. If a response range is defined using an explicit code, the explicit code definition takes precedence over the range definition for that code.
    -

    This object MAY be extended with Specification Extensions.

    -

    Responses Object Example

    +

    This object MAY be extended with Specification Extensions.

    +
    4.7.16.3 Responses Object Example

    A 200 response for a successful operation and a default response for others (implying an error):

    
     {
    -  "200": {
    -    "description": "a pet to be returned",
    -    "content": {
    -      "application/json": {
    -        "schema": {
    -          "$ref": "#/components/schemas/Pet"
    +  "200": {
    +    "description": "a pet to be returned",
    +    "content": {
    +      "application/json": {
    +        "schema": {
    +          "$ref": "#/components/schemas/Pet"
             }
           }
         }
       },
    -  "default": {
    -    "description": "Unexpected error",
    -    "content": {
    -      "application/json": {
    -        "schema": {
    -          "$ref": "#/components/schemas/ErrorModel"
    +  "default": {
    +    "description": "Unexpected error",
    +    "content": {
    +      "application/json": {
    +        "schema": {
    +          "$ref": "#/components/schemas/ErrorModel"
             }
           }
         }
    @@ -2112,23 +2333,23 @@
     }
     
    
    -'200':
    +'200':
       description: a pet to be returned
       content:
         application/json:
           schema:
    -        $ref: '#/components/schemas/Pet'
    +        $ref: '#/components/schemas/Pet'
     default:
       description: Unexpected error
       content:
         application/json:
           schema:
    -        $ref: '#/components/schemas/ErrorModel'
    +        $ref: '#/components/schemas/ErrorModel'
     
    -

    Response Object

    +

    4.7.17 Response Object

    Describes a single response from an API Operation, including design-time, static links to operations based on the response.

    -

    Fixed Fields

    +
    4.7.17.1 Fixed Fields
    @@ -2139,39 +2360,39 @@ - + - + - + - + - + - +
    descriptiondescription stringREQUIRED. A short description of the response. CommonMark syntax MAY be used for rich text representation.REQUIRED. A short description of the response. CommonMark syntax MAY be used for rich text representation.
    headersheaders Map[string, Header Object | Reference Object]Maps a header name to its definition. [[!RFC7230]] states header names are case insensitive. If a response header is defined with the name "Content-Type", it SHALL be ignored.Maps a header name to its definition. [RFC7230] states header names are case insensitive. If a response header is defined with the name "Content-Type", it SHALL be ignored.
    contentcontent Map[string, Media Type Object] A map containing descriptions of potential response payloads. The key is a media type or media type range and the value describes it. For responses that match multiple keys, only the most specific key is applicable. e.g. text/plain overrides text/*
    linkslinks Map[string, Link Object | Reference Object] A map of operations links that can be followed from the response. The key of the map is a short name for the link, following the naming constraints of the names for Component Objects.
    -

    This object MAY be extended with Specification Extensions.

    -

    Response Object Examples

    +

    This object MAY be extended with Specification Extensions.

    +
    4.7.17.2 Response Object Examples

    Response of an array of a complex type:

    
     {
    -  "description": "A complex object array response",
    -  "content": {
    -    "application/json": {
    -      "schema": {
    -        "type": "array",
    -        "items": {
    -          "$ref": "#/components/schemas/VeryComplexType"
    +  "description": "A complex object array response",
    +  "content": {
    +    "application/json": {
    +      "schema": {
    +        "type": "array",
    +        "items": {
    +          "$ref": "#/components/schemas/VeryComplexType"
             }
           }
         }
    @@ -2185,16 +2406,16 @@
         schema:
           type: array
           items:
    -        $ref: '#/components/schemas/VeryComplexType'
    +        $ref: '#/components/schemas/VeryComplexType'
     

    Response with a string type:

    
     {
    -  "description": "A simple string response",
    -  "content": {
    -    "text/plain": {
    -      "schema": {
    -        "type": "string"
    +  "description": "A simple string response",
    +  "content": {
    +    "text/plain": {
    +      "schema": {
    +        "type": "string"
           }
         }
       }
    @@ -2211,31 +2432,31 @@
     

    Plain text response with headers:

    
     {
    -  "description": "A simple string response",
    -  "content": {
    -    "text/plain": {
    -      "schema": {
    -        "type": "string"
    +  "description": "A simple string response",
    +  "content": {
    +    "text/plain": {
    +      "schema": {
    +        "type": "string"
           }
         }
       },
    -  "headers": {
    -    "X-Rate-Limit-Limit": {
    -      "description": "The number of allowed requests in the current period",
    -      "schema": {
    -        "type": "integer"
    +  "headers": {
    +    "X-Rate-Limit-Limit": {
    +      "description": "The number of allowed requests in the current period",
    +      "schema": {
    +        "type": "integer"
           }
         },
    -    "X-Rate-Limit-Remaining": {
    -      "description": "The number of remaining requests in the current period",
    -      "schema": {
    -        "type": "integer"
    +    "X-Rate-Limit-Remaining": {
    +      "description": "The number of remaining requests in the current period",
    +      "schema": {
    +        "type": "integer"
           }
         },
    -    "X-Rate-Limit-Reset": {
    -      "description": "The number of seconds left in the current period",
    -      "schema": {
    -        "type": "integer"
    +    "X-Rate-Limit-Reset": {
    +      "description": "The number of seconds left in the current period",
    +      "schema": {
    +        "type": "integer"
           }
         }
       }
    @@ -2247,7 +2468,7 @@
       text/plain:
         schema:
           type: string
    -    example: 'whoa!'
    +    example: 'whoa!'
     headers:
       X-Rate-Limit-Limit:
         description: The number of allowed requests in the current period
    @@ -2265,17 +2486,17 @@
     

    Response with no return value:

    
     {
    -  "description": "object created"
    +  "description": "object created"
     }
     
    
     description: object created
     
    -

    Callback Object

    +

    4.7.18 Callback Object

    A map of possible out-of band callbacks related to the parent operation. Each value in the map is a Path Item Object that describes a set of requests that may be initiated by the API provider and the expected responses. The key value used to identify the callback object is an expression, evaluated at runtime, that identifies a URL to use for the callback operation.

    -

    Patterned Fields

    +
    4.7.18.1 Patterned Fields
    @@ -2286,18 +2507,18 @@ - +
    {expression}{expression} Path Item Object A Path Item Object used to define a callback request and expected responses. A complete example is available.
    -

    This object MAY be extended with Specification Extensions.

    -

    Key Expression

    +

    This object MAY be extended with Specification Extensions.

    +
    4.7.18.2 Key Expression

    The key that identifies the Path Item Object is a runtime expression that can be evaluated in the context of a runtime HTTP request/response to identify the URL to be used for the callback request. A simple example might be $request.body#/url. However, using a runtime expression the complete HTTP message can be accessed. -This includes accessing any part of a body that a JSON Pointer [[!RFC6901]] can reference.

    +This includes accessing any part of a body that a JSON Pointer [RFC6901] can reference.

    For example, given the following HTTP request:

    
     POST /subscribe/myevent?queryUrl=http://clientdomain.com/stillrunning HTTP/1.1
    @@ -2306,11 +2527,11 @@
     Content-Length: 187
     
     {
    -  "failedUrl" : "http://clientdomain.com/failed",
    -  "successUrls" : [
    -    "http://clientdomain.com/fast",
    -    "http://clientdomain.com/medium",
    -    "http://clientdomain.com/slow"
    +  "failedUrl" : "http://clientdomain.com/failed",
    +  "successUrls" : [
    +    "http://clientdomain.com/fast",
    +    "http://clientdomain.com/medium",
    +    "http://clientdomain.com/slow"
       ]
     }
     
    @@ -2360,24 +2581,24 @@
     
     
     
    -

    Callback Object Example

    +
    4.7.18.3 Callback Object Example

    The following example shows a callback to the URL specified by the id and email property in the request body.

    
     myWebhook:
    -  'http://notificationServer.com?transactionId={$request.body#/id}&email={$request.body#/email}':
    +  'http://notificationServer.com?transactionId={$request.body#/id}&email={$request.body#/email}':
         post:
           requestBody:
             description: Callback payload
             content:
    -          'application/json':
    +          'application/json':
                 schema:
    -              $ref: '#/components/schemas/SomePayload'
    +              $ref: '#/components/schemas/SomePayload'
           responses:
    -        '200':
    +        '200':
               description: webhook successfully processed and no retries will be performed
     
    -

    Example Object

    -

    Fixed Fields

    +

    4.7.19 Example Object

    +
    4.7.19.1 Fixed Fields
    @@ -2388,32 +2609,32 @@ - + - + - + - + - +
    summarysummary string Short description for the example.
    descriptiondescription stringLong description for the example. CommonMark syntax MAY be used for rich text representation.Long description for the example. CommonMark syntax MAY be used for rich text representation.
    valuevalue Any Embedded literal example. The value field and externalValue field are mutually exclusive. To represent examples of media types that cannot naturally represented in JSON or YAML, use a string value to contain the example, escaping where necessary.
    externalValueexternalValue string A URL that points to the literal example. This provides the capability to reference examples that cannot easily be included in JSON or YAML documents. The value field and externalValue field are mutually exclusive.
    -

    This object MAY be extended with Specification Extensions.

    +

    This object MAY be extended with Specification Extensions.

    In all cases, the example value is expected to be compatible with the type schema -of its associated value. Tooling implementations MAY choose to +of its associated value. Tooling implementations MAY choose to validate compatibility automatically, and reject the example value(s) if incompatible.

    -

    Example Object Example

    +
    4.7.19.2 Example Object Example
    
     # in a model
     schemas:
    @@ -2427,57 +2648,57 @@
     # in a request body:
       requestBody:
         content:
    -      'application/json':
    +      'application/json':
             schema:
    -          $ref: '#/components/schemas/Address'
    +          $ref: '#/components/schemas/Address'
             examples:
               foo:
                 summary: A foo example
    -            value: {"foo": "bar"}
    +            value: {"foo": "bar"}
               bar:
                 summary: A bar example
    -            value: {"bar": "baz"}
    -      'application/xml':
    +            value: {"bar": "baz"}
    +      'application/xml':
             examples:
               xmlExample:
                 summary: This is an example in XML
    -            externalValue: 'http://example.org/examples/address-example.xml'
    -      'text/plain':
    +            externalValue: 'http://example.org/examples/address-example.xml'
    +      'text/plain':
             examples:
               textExample:
                 summary: This is a text example
    -            externalValue: 'http://foo.bar/examples/address-example.txt'
    +            externalValue: 'http://foo.bar/examples/address-example.txt'
     
     
     # in a parameter
       parameters:
    -    - name: 'zipCode'
    -      in: 'query'
    +    - name: 'zipCode'
    +      in: 'query'
           schema:
    -        type: 'string'
    -        format: 'zip-code'
    +        type: 'string'
    +        format: 'zip-code'
             examples:
               zip-example:
    -            $ref: '#/components/examples/zip-example'
    +            $ref: '#/components/examples/zip-example'
     
     # in a response
       responses:
    -    '200':
    +    '200':
           description: your car appointment has been booked
           content:
             application/json:
               schema:
    -            $ref: '#/components/schemas/SuccessResponse'
    +            $ref: '#/components/schemas/SuccessResponse'
               examples:
                 confirmation-success:
    -              $ref: '#/components/examples/confirmation-success'
    +              $ref: '#/components/examples/confirmation-success'
     
    -

    Link Object

    +

    4.7.21 Header Object

    The Header Object follows the structure of the Parameter Object with the following changes:

      -
    1. name MUST NOT be specified, it is given in the corresponding headers map.
    2. -
    3. in MUST NOT be specified, it is implicitly in header.
    4. -
    5. All traits that are affected by the location MUST be applicable to a location of header (for example, style).
    6. +
    7. name MUST NOT be specified, it is given in the corresponding headers map.
    8. +
    9. in MUST NOT be specified, it is implicitly in header.
    10. +
    11. All traits that are affected by the location MUST be applicable to a location of header (for example, style).
    -

    Header Object Example

    +
    4.7.21.1 Header Object Example

    A simple header of type integer:

    
     {
    -  "description": "The number of allowed requests in the current period",
    -  "schema": {
    -    "type": "integer"
    +  "description": "The number of allowed requests in the current period",
    +  "schema": {
    +    "type": "integer"
       }
     }
     
    @@ -2695,10 +2916,10 @@ schema: type: integer
    -

    Tag Object

    +

    4.7.22 Tag Object

    Adds metadata to a single tag that is used by the Operation Object. It is not mandatory to have a Tag Object per tag defined in the Operation Object instances.

    -

    Fixed Fields

    +
    4.7.22.1 Fixed Fields
    @@ -2709,39 +2930,39 @@ - + - + - + - + - +
    namename stringREQUIRED. The name of the tag.REQUIRED. The name of the tag.
    descriptiondescription stringA short description for the tag. CommonMark syntax MAY be used for rich text representation.A short description for the tag. CommonMark syntax MAY be used for rich text representation.
    externalDocsexternalDocs External Documentation Object Additional external documentation for this tag.
    -

    This object MAY be extended with Specification Extensions.

    -

    Tag Object Example

    +

    This object MAY be extended with Specification Extensions.

    +
    4.7.22.2 Tag Object Example
    
     {
    -	"name": "pet",
    -	"description": "Pets operations"
    +	"name": "pet",
    +	"description": "Pets operations"
     }
     
    
     name: pet
     description: Pets operations
     
    -

    Reference Object

    +

    4.7.23 Reference Object

    A simple object to allow referencing other components in the specification, internally and externally.

    The Reference Object is defined by JSON Reference and follows the same structure, behavior and rules.

    For this specification, reference resolution is accomplished as defined by the JSON Reference specification and not by the JSON Schema specification.

    -

    Fixed Fields

    +
    4.7.23.1 Fixed Fields
    @@ -2752,47 +2973,47 @@ - + - +
    $ref$ref stringREQUIRED. The reference string.REQUIRED. The reference string.
    -

    This object cannot be extended with additional properties and any properties added SHALL be ignored.

    -

    Reference Object Example

    +

    This object cannot be extended with additional properties and any properties added SHALL be ignored.

    +
    4.7.23.2 Reference Object Example
    
     {
    -	"$ref": "#/components/schemas/Pet"
    +	"$ref": "#/components/schemas/Pet"
     }
     
    
    -$ref: '#/components/schemas/Pet'
    +$ref: '#/components/schemas/Pet'
     
    -

    Relative Schema Document Example

    +
    4.7.23.3 Relative Schema Document Example
    
     {
    -  "$ref": "Pet.json"
    +  "$ref": "Pet.json"
     }
     
    
     $ref: Pet.yaml
     
    -

    Relative Documents With Embedded Schema Example

    +
    4.7.23.4 Relative Documents With Embedded Schema Example
    
     {
    -  "$ref": "definitions.json#/Pet"
    +  "$ref": "definitions.json#/Pet"
     }
     
    
     $ref: definitions.yaml#/Pet
     
    -

    Schema Object

    +

    4.7.24 Schema Object

    The Schema Object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. This object is an extended subset of the JSON Schema Specification Wright Draft 00.

    For more information about the properties, see JSON Schema Core and JSON Schema Validation. Unless stated otherwise, the property definitions follow the JSON Schema.

    -

    Properties

    +
    4.7.24.1 Properties

    The following properties are taken directly from the JSON Schema definition and follow the same specifications:

    • title
    • @@ -2803,7 +3024,7 @@
    • exclusiveMinimum
    • maxLength
    • minLength
    • -
    • pattern (This string SHOULD be a valid regular expression, according to the ECMA 262 regular expression dialect)
    • +
    • pattern (This string SHOULD be a valid regular expression, according to the ECMA 262 regular expression dialect)
    • maxItems
    • minItems
    • uniqueItems
    • @@ -2814,22 +3035,22 @@

    The following properties are taken from the JSON Schema definition but their definitions were adjusted to the OpenAPI Specification.

      -
    • type - Value MUST be a string. Multiple types via an array are not supported.
    • -
    • allOf - Inline or referenced schema MUST be of a Schema Object and not a standard JSON Schema.
    • -
    • oneOf - Inline or referenced schema MUST be of a Schema Object and not a standard JSON Schema.
    • -
    • anyOf - Inline or referenced schema MUST be of a Schema Object and not a standard JSON Schema.
    • -
    • not - Inline or referenced schema MUST be of a Schema Object and not a standard JSON Schema.
    • -
    • items - Value MUST be an object and not an array. Inline or referenced schema MUST be of a Schema Object and not a standard JSON Schema. items MUST be present if the type is array.
    • -
    • properties - Property definitions MUST be a Schema Object and not a standard JSON Schema (inline or referenced).
    • -
    • additionalProperties - Value can be boolean or object. Inline or referenced schema MUST be of a Schema Object and not a standard JSON Schema.
    • -
    • description - CommonMark syntax MAY be used for rich text representation.
    • +
    • type - Value MUST be a string. Multiple types via an array are not supported.
    • +
    • allOf - Inline or referenced schema MUST be of a Schema Object and not a standard JSON Schema.
    • +
    • oneOf - Inline or referenced schema MUST be of a Schema Object and not a standard JSON Schema.
    • +
    • anyOf - Inline or referenced schema MUST be of a Schema Object and not a standard JSON Schema.
    • +
    • not - Inline or referenced schema MUST be of a Schema Object and not a standard JSON Schema.
    • +
    • items - Value MUST be an object and not an array. Inline or referenced schema MUST be of a Schema Object and not a standard JSON Schema. items MUST be present if the type is array.
    • +
    • properties - Property definitions MUST be a Schema Object and not a standard JSON Schema (inline or referenced).
    • +
    • additionalProperties - Value can be boolean or object. Inline or referenced schema MUST be of a Schema Object and not a standard JSON Schema.
    • +
    • description - CommonMark syntax MAY be used for rich text representation.
    • format - See Data Type Formats for further details. While relying on JSON Schema’s defined formats, the OAS offers a few additional predefined formats.
    • -
    • default - The default value represents what would be assumed by the consumer of the input as the value of the schema if one is not provided. Unlike JSON Schema, the value MUST conform to the defined type for the Schema Object defined at the same level. For example, if type is string, then default can be "foo" but cannot be 1.
    • +
    • default - The default value represents what would be assumed by the consumer of the input as the value of the schema if one is not provided. Unlike JSON Schema, the value MUST conform to the defined type for the Schema Object defined at the same level. For example, if type is string, then default can be "foo" but cannot be 1.

    Alternatively, any time a Schema Object can be used, a Reference Object can be used in its place. This allows referencing definitions instead of defining them inline.

    Additional properties defined by the JSON Schema specification that are not mentioned here are strictly unsupported.

    -

    Other than the JSON Schema subset fields, the following fields MAY be used for further schema documentation:

    -

    Fixed Fields

    +

    Other than the JSON Schema subset fields, the following fields MAY be used for further schema documentation:

    +
    4.7.24.2 Fixed Fields
    @@ -2840,94 +3061,94 @@ - + - + - + - + - + - + - + - + - + - + - + - +
    nullablenullable boolean Allows sending a null value for the defined schema. Default value is false.
    discriminatordiscriminator Discriminator Object Adds support for polymorphism. The discriminator is an object name that is used to differentiate between other schemas which may satisfy the payload description. See Composition and Inheritance for more details.
    readOnlyreadOnly booleanRelevant only for Schema "properties" definitions. Declares the property as “read only”. This means that it MAY be sent as part of a response but SHOULD NOT be sent as part of the request. If the property is marked as readOnly being true and is in the required list, the required will take effect on the response only. A property MUST NOT be marked as both readOnly and writeOnly being true. Default value is false.Relevant only for Schema "properties" definitions. Declares the property as “read only”. This means that it MAY be sent as part of a response but SHOULD NOT be sent as part of the request. If the property is marked as readOnly being true and is in the required list, the required will take effect on the response only. A property MUST NOT be marked as both readOnly and writeOnly being true. Default value is false.
    writeOnlywriteOnly booleanRelevant only for Schema "properties" definitions. Declares the property as “write only”. Therefore, it MAY be sent as part of a request but SHOULD NOT be sent as part of the response. If the property is marked as writeOnly being true and is in the required list, the required will take effect on the request only. A property MUST NOT be marked as both readOnly and writeOnly being true. Default value is false.Relevant only for Schema "properties" definitions. Declares the property as “write only”. Therefore, it MAY be sent as part of a request but SHOULD NOT be sent as part of the response. If the property is marked as writeOnly being true and is in the required list, the required will take effect on the request only. A property MUST NOT be marked as both readOnly and writeOnly being true. Default value is false.
    xmlxml XML ObjectThis MAY be used only on properties schemas. It has no effect on root schemas. Adds additional metadata to describe the XML representation of this property.This MAY be used only on properties schemas. It has no effect on root schemas. Adds additional metadata to describe the XML representation of this property.
    externalDocsexternalDocs External Documentation Object Additional external documentation for this schema.
    exampleexample Any A free-form property to include an example of an instance for this schema. To represent examples that cannot be naturally represented in JSON or YAML, a string value can be used to contain the example with escaping where necessary.
    deprecated deprecated booleanSpecifies that a schema is deprecated and SHOULD be transitioned out of usage. Default value is false.Specifies that a schema is deprecated and SHOULD be transitioned out of usage. Default value is false.
    -

    This object MAY be extended with Specification Extensions.

    -
    Composition and Inheritance (Polymorphism)
    +

    This object MAY be extended with Specification Extensions.

    +
    4.7.24.2.1 Composition and Inheritance (Polymorphism)

    The OpenAPI Specification allows combining and extending model definitions using the allOf property of JSON Schema, in effect offering model composition. allOf takes an array of object definitions that are validated independently but together compose a single object.

    While composition offers model extensibility, it does not imply a hierarchy between the models. To support polymorphism, the OpenAPI Specification adds the discriminator field. When used, the discriminator will be the name of the property that decides which schema definition validates the structure of the model. -As such, the discriminator field MUST be a required field. +As such, the discriminator field MUST be a required field. There are two ways to define the value of a discriminator for an inheriting instance.

    • Use the schema name.
    • Override the schema name by overriding the property with a new value. If a new value exists, this takes precedence over the schema name. As such, inline schema definitions, which do not have a given id, cannot be used in polymorphism.
    -
    XML Modeling
    +
    4.7.24.2.2 XML Modeling

    The xml property allows extra definitions when translating the JSON definition to XML. The XML Object contains additional information about the available options.

    -

    Schema Object Examples

    -
    Primitive Sample
    +
    4.7.24.3 Schema Object Examples
    +
    4.7.24.3.1 Primitive Sample
    
     {
    -  "type": "string",
    -  "format": "email"
    +  "type": "string",
    +  "format": "email"
     }
     
    
     type: string
     format: email
     
    -
    Simple Model
    +
    4.7.24.3.2 Simple Model
    
     {
    -  "type": "object",
    -  "required": [
    -    "name"
    +  "type": "object",
    +  "required": [
    +    "name"
       ],
    -  "properties": {
    -    "name": {
    -      "type": "string"
    +  "properties": {
    +    "name": {
    +      "type": "string"
         },
    -    "address": {
    -      "$ref": "#/components/schemas/Address"
    +    "address": {
    +      "$ref": "#/components/schemas/Address"
         },
    -    "age": {
    -      "type": "integer",
    -      "format": "int32",
    -      "minimum": 0
    +    "age": {
    +      "type": "integer",
    +      "format": "int32",
    +      "minimum": 0
         }
       }
     }
    @@ -2940,19 +3161,19 @@
       name:
         type: string
       address:
    -    $ref: '#/components/schemas/Address'
    +    $ref: '#/components/schemas/Address'
       age:
         type: integer
         format: int32
         minimum: 0
     
    -
    Model with Map/Dictionary Properties
    +
    4.7.24.3.3 Model with Map/Dictionary Properties

    For a simple string to string mapping:

    
     {
    -  "type": "object",
    -  "additionalProperties": {
    -    "type": "string"
    +  "type": "object",
    +  "additionalProperties": {
    +    "type": "string"
       }
     }
     
    @@ -2964,36 +3185,36 @@

    For a string to model mapping:

    
     {
    -  "type": "object",
    -  "additionalProperties": {
    -    "$ref": "#/components/schemas/ComplexModel"
    +  "type": "object",
    +  "additionalProperties": {
    +    "$ref": "#/components/schemas/ComplexModel"
       }
     }
     
    
     type: object
     additionalProperties:
    -  $ref: '#/components/schemas/ComplexModel'
    +  $ref: '#/components/schemas/ComplexModel'
     
    -
    Model with Example
    +
    4.7.24.3.4 Model with Example
    
     {
    -  "type": "object",
    -  "properties": {
    -    "id": {
    -      "type": "integer",
    -      "format": "int64"
    +  "type": "object",
    +  "properties": {
    +    "id": {
    +      "type": "integer",
    +      "format": "int64"
         },
    -    "name": {
    -      "type": "string"
    +    "name": {
    +      "type": "string"
         }
       },
    -  "required": [
    -    "name"
    +  "required": [
    +    "name"
       ],
    -  "example": {
    -    "name": "Puma",
    -    "id": 1
    +  "example": {
    +    "name": "Puma",
    +    "id": 1
       }
     }
     
    @@ -3011,41 +3232,41 @@ name: Puma id: 1
    -
    Models with Composition
    +
    4.7.24.3.5 Models with Composition
    
     {
    -  "components": {
    -    "schemas": {
    -      "ErrorModel": {
    -        "type": "object",
    -        "required": [
    -          "message",
    -          "code"
    +  "components": {
    +    "schemas": {
    +      "ErrorModel": {
    +        "type": "object",
    +        "required": [
    +          "message",
    +          "code"
             ],
    -        "properties": {
    -          "message": {
    -            "type": "string"
    +        "properties": {
    +          "message": {
    +            "type": "string"
               },
    -          "code": {
    -            "type": "integer",
    -            "minimum": 100,
    -            "maximum": 600
    +          "code": {
    +            "type": "integer",
    +            "minimum": 100,
    +            "maximum": 600
               }
             }
           },
    -      "ExtendedErrorModel": {
    -        "allOf": [
    +      "ExtendedErrorModel": {
    +        "allOf": [
               {
    -            "$ref": "#/components/schemas/ErrorModel"
    +            "$ref": "#/components/schemas/ErrorModel"
               },
               {
    -            "type": "object",
    -            "required": [
    -              "rootCause"
    +            "type": "object",
    +            "required": [
    +              "rootCause"
                 ],
    -            "properties": {
    -              "rootCause": {
    -                "type": "string"
    +            "properties": {
    +              "rootCause": {
    +                "type": "string"
                   }
                 }
               }
    @@ -3072,7 +3293,7 @@
               maximum: 600
         ExtendedErrorModel:
           allOf:
    -      - $ref: '#/components/schemas/ErrorModel'
    +      - $ref: '#/components/schemas/ErrorModel'
           - type: object
             required:
             - rootCause
    @@ -3080,75 +3301,75 @@
               rootCause:
                 type: string
     
    -
    Models with Polymorphism Support
    +
    4.7.24.3.6 Models with Polymorphism Support
    
     {
    -  "components": {
    -    "schemas": {
    -      "Pet": {
    -        "type": "object",
    -        "discriminator": {
    -          "propertyName": "petType"
    +  "components": {
    +    "schemas": {
    +      "Pet": {
    +        "type": "object",
    +        "discriminator": {
    +          "propertyName": "petType"
             },
    -        "properties": {
    -          "name": {
    -            "type": "string"
    +        "properties": {
    +          "name": {
    +            "type": "string"
               },
    -          "petType": {
    -            "type": "string"
    +          "petType": {
    +            "type": "string"
               }
             },
    -        "required": [
    -          "name",
    -          "petType"
    +        "required": [
    +          "name",
    +          "petType"
             ]
           },
    -      "Cat": {
    -        "description": "A representation of a cat. Note that `Cat` will be used as the discriminator value.",
    -        "allOf": [
    +      "Cat": {
    +        "description": "A representation of a cat. Note that `Cat` will be used as the discriminator value.",
    +        "allOf": [
               {
    -            "$ref": "#/components/schemas/Pet"
    +            "$ref": "#/components/schemas/Pet"
               },
               {
    -            "type": "object",
    -            "properties": {
    -              "huntingSkill": {
    -                "type": "string",
    -                "description": "The measured skill for hunting",
    -                "default": "lazy",
    -                "enum": [
    -                  "clueless",
    -                  "lazy",
    -                  "adventurous",
    -                  "aggressive"
    +            "type": "object",
    +            "properties": {
    +              "huntingSkill": {
    +                "type": "string",
    +                "description": "The measured skill for hunting",
    +                "default": "lazy",
    +                "enum": [
    +                  "clueless",
    +                  "lazy",
    +                  "adventurous",
    +                  "aggressive"
                     ]
                   }
                 },
    -            "required": [
    -              "huntingSkill"
    +            "required": [
    +              "huntingSkill"
                 ]
               }
             ]
           },
    -      "Dog": {
    -        "description": "A representation of a dog. Note that `Dog` will be used as the discriminator value.",
    -        "allOf": [
    +      "Dog": {
    +        "description": "A representation of a dog. Note that `Dog` will be used as the discriminator value.",
    +        "allOf": [
               {
    -            "$ref": "#/components/schemas/Pet"
    +            "$ref": "#/components/schemas/Pet"
               },
               {
    -            "type": "object",
    -            "properties": {
    -              "packSize": {
    -                "type": "integer",
    -                "format": "int32",
    -                "description": "the size of the pack the dog is from",
    -                "default": 0,
    -                "minimum": 0
    +            "type": "object",
    +            "properties": {
    +              "packSize": {
    +                "type": "integer",
    +                "format": "int32",
    +                "description": "the size of the pack the dog is from",
    +                "default": 0,
    +                "minimum": 0
                   }
                 },
    -            "required": [
    -              "packSize"
    +            "required": [
    +              "packSize"
                 ]
               }
             ]
    @@ -3172,10 +3393,10 @@
           required:
           - name
           - petType
    -    Cat:  ## "Cat" will be used as the discriminator value
    +    Cat:  ## "Cat" will be used as the discriminator value
           description: A representation of a cat
           allOf:
    -      - $ref: '#/components/schemas/Pet'
    +      - $ref: '#/components/schemas/Pet'
           - type: object
             properties:
               huntingSkill:
    @@ -3188,10 +3409,10 @@
                 - aggressive
             required:
             - huntingSkill
    -    Dog:  ## "Dog" will be used as the discriminator value
    +    Dog:  ## "Dog" will be used as the discriminator value
           description: A representation of a dog
           allOf:
    -      - $ref: '#/components/schemas/Pet'
    +      - $ref: '#/components/schemas/Pet'
           - type: object
             properties:
               packSize:
    @@ -3203,10 +3424,10 @@
             required:
             - packSize
     
    -

    Discriminator Object

    +

    4.7.25 Discriminator Object

    When request bodies or response payloads may be one of a number of different schemas, a discriminator object can be used to aid in serialization, deserialization, and validation. The discriminator is a specific object in a schema which is used to inform the consumer of the specification of an alternative schema based on the value associated with it.

    When using the discriminator, inline schemas will not be considered.

    -

    Fixed Fields

    +
    4.7.25.1 Fixed Fields
    @@ -3217,63 +3438,63 @@ - + - + - +
    propertyNamepropertyName stringREQUIRED. The name of the property in the payload that will hold the discriminator value.REQUIRED. The name of the property in the payload that will hold the discriminator value.
    mapping mapping Map[string, string] An object to hold mappings between payload values and schema names or references.

    The discriminator attribute is legal only when using one of the composite keywords oneOf, anyOf, allOf.

    -

    In OAS 3.0, a response payload MAY be described to be exactly one of any number of types:

    -
    
    +

    In OAS 3.0, a response payload MAY be described to be exactly one of any number of types:

    +
    
     MyResponseType:
       oneOf:
    -  - $ref: '#/components/schemas/Cat'
    -  - $ref: '#/components/schemas/Dog'
    -  - $ref: '#/components/schemas/Lizard'
    +  - $ref: '#/components/schemas/Cat'
    +  - $ref: '#/components/schemas/Dog'
    +  - $ref: '#/components/schemas/Lizard'
     
    -

    which means the payload MUST, by validation, match exactly one of the schemas described by Cat, Dog, or Lizard. In this case, a discriminator MAY act as a “hint” to shortcut validation and selection of the matching schema which may be a costly operation, depending on the complexity of the schema. We can then describe exactly which field tells us which schema to use:

    -
    
    +

    which means the payload MUST, by validation, match exactly one of the schemas described by Cat, Dog, or Lizard. In this case, a discriminator MAY act as a “hint” to shortcut validation and selection of the matching schema which may be a costly operation, depending on the complexity of the schema. We can then describe exactly which field tells us which schema to use:

    +
    
     MyResponseType:
       oneOf:
    -  - $ref: '#/components/schemas/Cat'
    -  - $ref: '#/components/schemas/Dog'
    -  - $ref: '#/components/schemas/Lizard'
    +  - $ref: '#/components/schemas/Cat'
    +  - $ref: '#/components/schemas/Dog'
    +  - $ref: '#/components/schemas/Lizard'
       discriminator:
         propertyName: pet_type
     
    -

    The expectation now is that a property with name pet_type MUST be present in the response payload, and the value will correspond to the name of a schema defined in the OAS document. Thus the response payload:

    -
    
    +

    The expectation now is that a property with name pet_type MUST be present in the response payload, and the value will correspond to the name of a schema defined in the OAS document. Thus the response payload:

    +
    
     {
    -  "id": 12345,
    -  "pet_type": "Cat"
    +  "id": 12345,
    +  "pet_type": "Cat"
     }
     

    Will indicate that the Cat schema be used in conjunction with this payload.

    -

    In scenarios where the value of the discriminator field does not match the schema name or implicit mapping is not possible, an optional mapping definition MAY be used:

    -
    
    +

    In scenarios where the value of the discriminator field does not match the schema name or implicit mapping is not possible, an optional mapping definition MAY be used:

    +
    
     MyResponseType:
       oneOf:
    -  - $ref: '#/components/schemas/Cat'
    -  - $ref: '#/components/schemas/Dog'
    -  - $ref: '#/components/schemas/Lizard'
    -  - $ref: 'https://gigantic-server.com/schemas/Monster/schema.json'
    +  - $ref: '#/components/schemas/Cat'
    +  - $ref: '#/components/schemas/Dog'
    +  - $ref: '#/components/schemas/Lizard'
    +  - $ref: 'https://gigantic-server.com/schemas/Monster/schema.json'
       discriminator:
         propertyName: pet_type
         mapping:
    -      dog: '#/components/schemas/Dog'
    -      monster: 'https://gigantic-server.com/schemas/Monster/schema.json'
    +      dog: '#/components/schemas/Dog'
    +      monster: 'https://gigantic-server.com/schemas/Monster/schema.json'
     
    -

    Here the discriminator value of dog will map to the schema #/components/schemas/Dog, rather than the default (implicit) value of Dog. If the discriminator value does not match an implicit or explicit mapping, no schema can be determined and validation SHOULD fail. Mapping keys MUST be string values, but tooling MAY convert response values to strings for comparison.

    +

    Here the discriminator value of dog will map to the schema #/components/schemas/Dog, rather than the default (implicit) value of Dog. If the discriminator value does not match an implicit or explicit mapping, no schema can be determined and validation SHOULD fail. Mapping keys MUST be string values, but tooling MAY convert response values to strings for comparison.

    When used in conjunction with the anyOf construct, the use of the discriminator can avoid ambiguity where multiple schemas may satisfy a single payload.

    -

    In both the oneOf and anyOf use cases, all possible schemas MUST be listed explicitly. To avoid redundancy, the discriminator MAY be added to a parent schema definition, and all schemas comprising the parent schema in an allOf construct may be used as an alternate schema.

    +

    In both the oneOf and anyOf use cases, all possible schemas MUST be listed explicitly. To avoid redundancy, the discriminator MAY be added to a parent schema definition, and all schemas comprising the parent schema in an allOf construct may be used as an alternate schema.

    For example:

    -
    
    +
    
     components:
       schemas:
         Pet:
    @@ -3289,7 +3510,7 @@
               cachorro: Dog
         Cat:
           allOf:
    -      - $ref: '#/components/schemas/Pet'
    +      - $ref: '#/components/schemas/Pet'
           - type: object
             # all other properties specific to a `Cat`
             properties:
    @@ -3297,7 +3518,7 @@
                 type: string
         Dog:
           allOf:
    -      - $ref: '#/components/schemas/Pet'
    +      - $ref: '#/components/schemas/Pet'
           - type: object
             # all other properties specific to a `Dog`
             properties:
    @@ -3305,7 +3526,7 @@
                 type: string
         Lizard:
           allOf:
    -      - $ref: '#/components/schemas/Pet'
    +      - $ref: '#/components/schemas/Pet'
           - type: object
             # all other properties specific to a `Lizard`
             properties:
    @@ -3313,25 +3534,25 @@
                 type: boolean
     

    a payload like this:

    -
    
    +
    
     {
    -  "pet_type": "Cat",
    -  "name": "misty"
    +  "pet_type": "Cat",
    +  "name": "misty"
     }
     

    will indicate that the Cat schema be used. Likewise this schema:

    -
    
    +
    
     {
    -  "pet_type": "cachorro",
    -  "bark": "soft"
    +  "pet_type": "cachorro",
    +  "bark": "soft"
     }
     

    will map to Dog because of the definition in the mappings element.

    -

    XML Object

    +

    4.7.26 XML Object

    A metadata object that allows for more fine-tuned XML model definitions.

    -

    When using arrays, XML element names are not inferred (for singular/plural forms) and the name property SHOULD be used to add that information. +

    When using arrays, XML element names are not inferred (for singular/plural forms) and the name property SHOULD be used to add that information. See examples for expected behavior.

    -

    Fixed Fields

    +
    4.7.26.1 Fixed Fields
    @@ -3342,41 +3563,41 @@ - + - + - + - + - + - + - +
    namename string Replaces the name of the element/attribute used for the described schema property. When defined within items, it will affect the name of the individual XML elements within the list. When defined alongside type being array (outside the items), it will affect the wrapping element and only if wrapped is true. If wrapped is false, it will be ignored.
    namespacenamespace stringThe URI of the namespace definition. Value MUST be in the form of an absolute URI.The URI of the namespace definition. Value MUST be in the form of an absolute URI.
    prefixprefix string The prefix to be used for the name.
    attributeattribute boolean Declares whether the property definition translates to an attribute instead of an element. Default value is false.
    wrappedwrapped booleanMAY be used only for an array definition. Signifies whether the array is wrapped (for example, <books><book/><book/></books>) or unwrapped (<book/><book/>). Default value is false. The definition takes effect only when defined alongside type being array (outside the items).MAY be used only for an array definition. Signifies whether the array is wrapped (for example, <books><book/><book/></books>) or unwrapped (<book/><book/>). Default value is false. The definition takes effect only when defined alongside type being array (outside the items).
    -

    This object MAY be extended with Specification Extensions.

    -

    XML Object Examples

    +

    This object MAY be extended with Specification Extensions.

    +
    4.7.26.2 XML Object Examples

    The examples of the XML object definitions are included inside a property definition of a Schema Object with a sample of the XML representation of it.

    -
    No XML Element
    +
    4.7.26.2.1 No XML Element

    Basic string property:

    
     {
    -    "animals": {
    -        "type": "string"
    +    "animals": {
    +        "type": "string"
         }
     }
     
    @@ -3390,10 +3611,10 @@

    Basic string array property (wrapped is false by default):

    
     {
    -    "animals": {
    -        "type": "array",
    -        "items": {
    -            "type": "string"
    +    "animals": {
    +        "type": "array",
    +        "items": {
    +            "type": "string"
             }
         }
     }
    @@ -3409,13 +3630,13 @@
     <animals>...</animals>
     <animals>...</animals>
     
    -
    XML Name Replacement
    +
    4.7.26.2.2 XML Name Replacement
    
     {
    -  "animals": {
    -    "type": "string",
    -    "xml": {
    -      "name": "animal"
    +  "animals": {
    +    "type": "string",
    +    "xml": {
    +      "name": "animal"
         }
       }
     }
    @@ -3429,25 +3650,25 @@
     
    
     <animal>...</animal>
     
    -
    XML Attribute, Prefix and Namespace
    +
    4.7.26.2.3 XML Attribute, Prefix and Namespace

    In this example, a full model definition is shown.

    
     {
    -  "Person": {
    -    "type": "object",
    -    "properties": {
    -      "id": {
    -        "type": "integer",
    -        "format": "int32",
    -        "xml": {
    -          "attribute": true
    +  "Person": {
    +    "type": "object",
    +    "properties": {
    +      "id": {
    +        "type": "integer",
    +        "format": "int32",
    +        "xml": {
    +          "attribute": true
             }
           },
    -      "name": {
    -        "type": "string",
    -        "xml": {
    -          "namespace": "http://example.com/schema/sample",
    -          "prefix": "sample"
    +      "name": {
    +        "type": "string",
    +        "xml": {
    +          "namespace": "http://example.com/schema/sample",
    +          "prefix": "sample"
             }
           }
         }
    @@ -3470,20 +3691,20 @@
             prefix: sample
     
    
    -<Person id="123">
    -    <sample:name xmlns:sample="http://example.com/schema/sample">example</sample:name>
    +<Person id="123">
    +    <sample:name xmlns:sample="http://example.com/schema/sample">example</sample:name>
     </Person>
     
    -
    XML Arrays
    +
    4.7.26.2.4 XML Arrays

    Changing the element names:

    
     {
    -  "animals": {
    -    "type": "array",
    -    "items": {
    -      "type": "string",
    -      "xml": {
    -        "name": "animal"
    +  "animals": {
    +    "type": "array",
    +    "items": {
    +      "type": "string",
    +      "xml": {
    +        "name": "animal"
           }
         }
       }
    @@ -3504,16 +3725,16 @@
     

    The external name property has no effect on the XML:

    
     {
    -  "animals": {
    -    "type": "array",
    -    "items": {
    -      "type": "string",
    -      "xml": {
    -        "name": "animal"
    +  "animals": {
    +    "type": "array",
    +    "items": {
    +      "type": "string",
    +      "xml": {
    +        "name": "animal"
           }
         },
    -    "xml": {
    -      "name": "aliens"
    +    "xml": {
    +      "name": "aliens"
         }
       }
     }
    @@ -3535,13 +3756,13 @@
     

    Even when the array is wrapped, if a name is not explicitly defined, the same name will be used both internally and externally:

    
     {
    -  "animals": {
    -    "type": "array",
    -    "items": {
    -      "type": "string"
    +  "animals": {
    +    "type": "array",
    +    "items": {
    +      "type": "string"
         },
    -    "xml": {
    -      "wrapped": true
    +    "xml": {
    +      "wrapped": true
         }
       }
     }
    @@ -3563,16 +3784,16 @@
     

    To overcome the naming problem in the example above, the following definition can be used:

    
     {
    -  "animals": {
    -    "type": "array",
    -    "items": {
    -      "type": "string",
    -      "xml": {
    -        "name": "animal"
    +  "animals": {
    +    "type": "array",
    +    "items": {
    +      "type": "string",
    +      "xml": {
    +        "name": "animal"
           }
         },
    -    "xml": {
    -      "wrapped": true
    +    "xml": {
    +      "wrapped": true
         }
       }
     }
    @@ -3596,17 +3817,17 @@
     

    Affecting both internal and external names:

    
     {
    -  "animals": {
    -    "type": "array",
    -    "items": {
    -      "type": "string",
    -      "xml": {
    -        "name": "animal"
    +  "animals": {
    +    "type": "array",
    +    "items": {
    +      "type": "string",
    +      "xml": {
    +        "name": "animal"
           }
         },
    -    "xml": {
    -      "name": "aliens",
    -      "wrapped": true
    +    "xml": {
    +      "name": "aliens",
    +      "wrapped": true
         }
       }
     }
    @@ -3631,14 +3852,14 @@
     

    If we change the external element but not the internal ones:

    
     {
    -  "animals": {
    -    "type": "array",
    -    "items": {
    -      "type": "string"
    +  "animals": {
    +    "type": "array",
    +    "items": {
    +      "type": "string"
         },
    -    "xml": {
    -      "name": "aliens",
    -      "wrapped": true
    +    "xml": {
    +      "name": "aliens",
    +      "wrapped": true
         }
       }
     }
    @@ -3658,10 +3879,10 @@
       <aliens>value</aliens>
     </aliens>
     
    -

    Security Scheme Object

    +

    4.7.27 Security Scheme Object

    Defines a security scheme that can be used by the operations. -Supported schemes are HTTP authentication, an API key (either as a header or as a query parameter), OAuth2’s common flows (implicit, password, application and access code) as defined in [[!RFC6749]], and OpenID Connect Discovery.

    -

    Fixed Fields

    +Supported schemes are HTTP authentication, an API key (either as a header or as a query parameter), OAuth2’s common flows (implicit, password, application and access code) as defined in [RFC6749], and OpenID Connect Discovery.

    +
    4.7.27.1 Fixed Fields
    @@ -3673,74 +3894,74 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
    typetype string AnyREQUIRED. The type of the security scheme. Valid values are "apiKey", "http", "oauth2", "openIdConnect".REQUIRED. The type of the security scheme. Valid values are "apiKey", "http", "oauth2", "openIdConnect".
    descriptiondescription string AnyA short description for security scheme. CommonMark syntax MAY be used for rich text representation.A short description for security scheme. CommonMark syntax MAY be used for rich text representation.
    namename string apiKeyREQUIRED. The name of the header, query or cookie parameter to be used.REQUIRED. The name of the header, query or cookie parameter to be used.
    inin string apiKeyREQUIRED. The location of the API key. Valid values are "query", "header" or "cookie".REQUIRED. The location of the API key. Valid values are "query", "header" or "cookie".
    schemescheme string httpREQUIRED. The name of the HTTP Authorization scheme to be used in the Authorization header as defined in [[!RFC7235]].REQUIRED. The name of the HTTP Authorization scheme to be used in the Authorization header as defined in [RFC7235].
    bearerFormatbearerFormat stringhttp ("bearer")http ("bearer") A hint to the client to identify how the bearer token is formatted. Bearer tokens are usually generated by an authorization server, so this information is primarily for documentation purposes.
    flowsflows OAuth Flows Object oauth2REQUIRED. An object containing configuration information for the flow types supported.REQUIRED. An object containing configuration information for the flow types supported.
    openIdConnectUrlopenIdConnectUrl string openIdConnectREQUIRED. OpenId Connect URL to discover OAuth2 configuration values. This MUST be in the form of a URL.REQUIRED. OpenId Connect URL to discover OAuth2 configuration values. This MUST be in the form of a URL.
    -

    This object MAY be extended with Specification Extensions.

    -

    Security Scheme Object Example

    -
    Basic Authentication Sample
    +

    This object MAY be extended with Specification Extensions.

    +
    4.7.27.2 Security Scheme Object Example
    +
    4.7.27.2.1 Basic Authentication Sample
    
     {
    -  "type": "http",
    -  "scheme": "basic"
    +  "type": "http",
    +  "scheme": "basic"
     }
     
    
     type: http
     scheme: basic
     
    -
    API Key Sample
    +
    4.7.27.2.2 API Key Sample
    
     {
    -  "type": "apiKey",
    -  "name": "api_key",
    -  "in": "header"
    +  "type": "apiKey",
    +  "name": "api_key",
    +  "in": "header"
     }
     
    
    @@ -3748,12 +3969,12 @@
     name: api_key
     in: header
     
    -
    JWT Bearer Sample
    +
    4.7.27.2.3 JWT Bearer Sample
    
     {
    -  "type": "http",
    -  "scheme": "bearer",
    -  "bearerFormat": "JWT",
    +  "type": "http",
    +  "scheme": "bearer",
    +  "bearerFormat": "JWT",
     }
     
    
    @@ -3761,16 +3982,16 @@
     scheme: bearer
     bearerFormat: JWT
     
    -
    Implicit OAuth2 Sample
    +
    4.7.27.2.4 Implicit OAuth2 Sample
    
     {
    -  "type": "oauth2",
    -  "flows": {
    -    "implicit": {
    -      "authorizationUrl": "https://example.com/api/oauth/dialog",
    -      "scopes": {
    -        "write:pets": "modify pets in your account",
    -        "read:pets": "read your pets"
    +  "type": "oauth2",
    +  "flows": {
    +    "implicit": {
    +      "authorizationUrl": "https://example.com/api/oauth/dialog",
    +      "scopes": {
    +        "write:pets": "modify pets in your account",
    +        "read:pets": "read your pets"
           }
         }
       }
    @@ -3785,9 +4006,9 @@
           write:pets: modify pets in your account
           read:pets: read your pets
     
    -

    OAuth Flows Object

    +

    4.7.28 OAuth Flows Object

    Allows configuration of the supported OAuth Flows.

    -

    Fixed Fields

    +
    4.7.28.1 Fixed Fields
    @@ -3798,31 +4019,31 @@ - + - + - + - +
    implicitimplicit OAuth Flow Object Configuration for the OAuth Implicit flow
    passwordpassword OAuth Flow Object Configuration for the OAuth Resource Owner Password flow
    clientCredentialsclientCredentials OAuth Flow Object Configuration for the OAuth Client Credentials flow. Previously called application in OpenAPI 2.0.
    authorizationCodeauthorizationCode OAuth Flow Object Configuration for the OAuth Authorization Code flow. Previously called accessCode in OpenAPI 2.0.
    -

    This object MAY be extended with Specification Extensions.

    -

    OAuth Flow Object

    +

    This object MAY be extended with Specification Extensions.

    +

    4.7.29 OAuth Flow Object

    Configuration details for a supported OAuth Flow

    -

    Fixed Fields

    +
    4.7.29.1 Fixed Fields
    @@ -3834,50 +4055,50 @@ - + - - + + - + - - + + - + - + - + - +
    authorizationUrlauthorizationUrl stringoauth2 ("implicit", "authorizationCode")REQUIRED. The authorization URL to be used for this flow. This MUST be in the form of a URL.oauth2 ("implicit", "authorizationCode")REQUIRED. The authorization URL to be used for this flow. This MUST be in the form of a URL.
    tokenUrltokenUrl stringoauth2 ("password", "clientCredentials", "authorizationCode")REQUIRED. The token URL to be used for this flow. This MUST be in the form of a URL.oauth2 ("password", "clientCredentials", "authorizationCode")REQUIRED. The token URL to be used for this flow. This MUST be in the form of a URL.
    refreshUrlrefreshUrl string oauth2The URL to be used for obtaining refresh tokens. This MUST be in the form of a URL.The URL to be used for obtaining refresh tokens. This MUST be in the form of a URL.
    scopesscopes Map[string, string] oauth2REQUIRED. The available scopes for the OAuth2 security scheme. A map between the scope name and a short description for it.REQUIRED. The available scopes for the OAuth2 security scheme. A map between the scope name and a short description for it.
    -

    This object MAY be extended with Specification Extensions.

    -

    OAuth Flow Object Examples

    +

    This object MAY be extended with Specification Extensions.

    +
    4.7.29.2 OAuth Flow Object Examples
    
     {
    -  "type": "oauth2",
    -  "flows": {
    -    "implicit": {
    -      "authorizationUrl": "https://example.com/api/oauth/dialog",
    -      "scopes": {
    -        "write:pets": "modify pets in your account",
    -        "read:pets": "read your pets"
    +  "type": "oauth2",
    +  "flows": {
    +    "implicit": {
    +      "authorizationUrl": "https://example.com/api/oauth/dialog",
    +      "scopes": {
    +        "write:pets": "modify pets in your account",
    +        "read:pets": "read your pets"
           }
         },
    -    "authorizationCode": {
    -      "authorizationUrl": "https://example.com/api/oauth/dialog",
    -      "tokenUrl": "https://example.com/api/oauth/token",
    -      "scopes": {
    -        "write:pets": "modify pets in your account",
    -        "read:pets": "read your pets"
    +    "authorizationCode": {
    +      "authorizationUrl": "https://example.com/api/oauth/dialog",
    +      "tokenUrl": "https://example.com/api/oauth/token",
    +      "scopes": {
    +        "write:pets": "modify pets in your account",
    +        "read:pets": "read your pets"
           }
         }
       }
    @@ -3898,13 +4119,13 @@
           write:pets: modify pets in your account
           read:pets: read your pets
     
    -

    Security Requirement Object

    +

    4.7.30 Security Requirement Object

    Lists the required security schemes to execute this operation. -The name used for each property MUST correspond to a security scheme declared in the Security Schemes under the Components Object.

    -

    Security Requirement Objects that contain multiple schemes require that all schemes MUST be satisfied for a request to be authorized. +The name used for each property MUST correspond to a security scheme declared in the Security Schemes under the Components Object.

    +

    Security Requirement Objects that contain multiple schemes require that all schemes MUST be satisfied for a request to be authorized. This enables support for scenarios where multiple query parameters or HTTP headers are required to convey security information.

    When a list of Security Requirement Objects is defined on the Open API object or Operation Object, only one of Security Requirement Objects in the list needs to be satisfied to authorize the request.

    -

    Patterned Fields

    +
    4.7.30.1 Patterned Fields
    @@ -3915,28 +4136,28 @@ - + - +
    {name}{name} [string]Each name MUST correspond to a security scheme which is declared in the Security Schemes under the Components Object. If the security scheme is of type "oauth2" or "openIdConnect", then the value is a list of scope names required for the execution. For other security scheme types, the array MUST be empty.Each name MUST correspond to a security scheme which is declared in the Security Schemes under the Components Object. If the security scheme is of type "oauth2" or "openIdConnect", then the value is a list of scope names required for the execution. For other security scheme types, the array MUST be empty.
    -

    Security Requirement Object Examples

    -
    Non-OAuth2 Security Requirement
    +
    4.7.30.2 Security Requirement Object Examples
    +
    4.7.30.2.1 Non-OAuth2 Security Requirement
    
     {
    -  "api_key": []
    +  "api_key": []
     }
     
    
     api_key: []
     
    -
    OAuth2 Security Requirement
    +
    4.7.30.2.2 OAuth2 Security Requirement
    
     {
    -  "petstore_auth": [
    -    "write:pets",
    -    "read:pets"
    +  "petstore_auth": [
    +    "write:pets",
    +    "read:pets"
       ]
     }
     
    @@ -3945,9 +4166,9 @@ - write:pets - read:pets
    -

    Specification Extensions

    +

    4.8 Specification Extensions

    While the OpenAPI Specification tries to accommodate most use cases, additional data can be added to extend the specification at certain points.

    -

    The extensions properties are implemented as patterned fields that are always prefixed by "x-".

    +

    The extensions properties are implemented as patterned fields that are always prefixed by "x-".

    @@ -3958,23 +4179,23 @@ - + - +
    ^x-^x- AnyAllows extensions to the OpenAPI Schema. The field name MUST begin with x-, for example, x-internal-id. The value can be null, a primitive, an array or an object. Can have any valid JSON format value.Allows extensions to the OpenAPI Schema. The field name MUST begin with x-, for example, x-internal-id. The value can be null, a primitive, an array or an object. Can have any valid JSON format value.

    The extensions may or may not be supported by the available tooling, but those may be extended as well to add requested support (if tools are internal or open-sourced).

    -

    Security Filtering

    -

    Some objects in the OpenAPI Specification MAY be declared and remain empty, or be completely removed, even though they are inherently the core of the API documentation.

    +

    4.9 Security Filtering

    +

    Some objects in the OpenAPI Specification MAY be declared and remain empty, or be completely removed, even though they are inherently the core of the API documentation.

    The reasoning is to allow an additional layer of access control over the documentation. -While not part of the specification itself, certain libraries MAY choose to allow access to parts of the documentation based on some form of authentication/authorization.

    +While not part of the specification itself, certain libraries MAY choose to allow access to parts of the documentation based on some form of authentication/authorization.

    Two examples of this:

      -
    1. The Paths Object MAY be empty. It may be counterintuitive, but this may tell the viewer that they got to the right place, but can’t access any documentation. They’d still have access to the Info Object which may contain additional information regarding authentication.
    2. -
    3. The Path Item Object MAY be empty. In this case, the viewer will be aware that the path exists, but will not be able to see any of its operations or parameters. This is different than hiding the path itself from the Paths Object, so the user will not be aware of its existence. This allows the documentation provider to finely control what the viewer can see.
    4. +
    5. The Paths Object MAY be empty. It may be counterintuitive, but this may tell the viewer that they got to the right place, but can’t access any documentation. They’d still have access to the Info Object which may contain additional information regarding authentication.
    6. +
    7. The Path Item Object MAY be empty. In this case, the viewer will be aware that the path exists, but will not be able to see any of its operations or parameters. This is different than hiding the path itself from the Paths Object, so the user will not be aware of its existence. This allows the documentation provider to finely control what the viewer can see.
    -

    Appendix A: Revision History

    +

    A. Appendix A: Revision History

    @@ -4037,3 +4258,303 @@
    +

    B. References

    B.1 Normative references

    + +
    [RFC1866]
    + Hypertext Markup Language - 2.0. T. Berners-Lee; D. Connolly. IETF. November 1995. Historic. URL: https://www.rfc-editor.org/rfc/rfc1866 +
    [RFC2119]
    + Key words for use in RFCs to Indicate Requirement Levels. S. Bradner. IETF. March 1997. Best Current Practice. URL: https://www.rfc-editor.org/rfc/rfc2119 +
    [RFC3986]
    + Uniform Resource Identifier (URI): Generic Syntax. T. Berners-Lee; R. Fielding; L. Masinter. IETF. January 2005. Internet Standard. URL: https://www.rfc-editor.org/rfc/rfc3986 +
    [RFC6570]
    + URI Template. J. Gregorio; R. Fielding; M. Hadley; M. Nottingham; D. Orchard. IETF. March 2012. Proposed Standard. URL: https://www.rfc-editor.org/rfc/rfc6570 +
    [RFC6749]
    + The OAuth 2.0 Authorization Framework. D. Hardt, Ed.. IETF. October 2012. Proposed Standard. URL: https://www.rfc-editor.org/rfc/rfc6749 +
    [RFC6838]
    + Media Type Specifications and Registration Procedures. N. Freed; J. Klensin; T. Hansen. IETF. January 2013. Best Current Practice. URL: https://www.rfc-editor.org/rfc/rfc6838 +
    [RFC6901]
    + JavaScript Object Notation (JSON) Pointer. P. Bryan, Ed.; K. Zyp; M. Nottingham, Ed.. IETF. April 2013. Proposed Standard. URL: https://www.rfc-editor.org/rfc/rfc6901 +
    [RFC7230]
    + Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing. R. Fielding, Ed.; J. Reschke, Ed.. IETF. June 2014. Proposed Standard. URL: https://httpwg.org/specs/rfc7230.html +
    [RFC7231]
    + Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content. R. Fielding, Ed.; J. Reschke, Ed.. IETF. June 2014. Proposed Standard. URL: https://httpwg.org/specs/rfc7231.html +
    [RFC7235]
    + Hypertext Transfer Protocol (HTTP/1.1): Authentication. R. Fielding, Ed.; J. Reschke, Ed.. IETF. June 2014. Proposed Standard. URL: https://httpwg.org/specs/rfc7235.html +
    [RFC8174]
    + Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words. B. Leiba. IETF. May 2017. Best Current Practice. URL: https://www.rfc-editor.org/rfc/rfc8174 +
    +
    \ No newline at end of file diff --git a/oas/v3.0.2.html b/oas/v3.0.2.html index e9ff54c809..96aa375913 100644 --- a/oas/v3.0.2.html +++ b/oas/v3.0.2.html @@ -1,30 +1,261 @@ -OpenAPI Specification v3.0.2 | Introduction, Definitions, & More - + + + + + +OpenAPI Specification v3.0.2 + + + + + + + + -

    OpenAPI Specification v3.0.2

    What is the OpenAPI Specification?

    The OpenAPI Specification (OAS) defines a standard, programming language-agnostic interface description for HTTP APIs, which allows both humans and computers to discover and understand the capabilities of a service without requiring access to source code, additional documentation, or inspection of network traffic. When properly defined via OpenAPI, a consumer can understand and interact with the remote service with a minimal amount of implementation logic. Similar to what interface descriptions have done for lower-level programming, the OpenAPI Specification removes guesswork in calling a service.

    Status of This Document

    The source-of-truth for the specification is the GitHub markdown file referenced above.
    -

    OpenAPI Specification

    -

    Version 3.0.2

    -

    The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “NOT RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in BCP 14 [[!RFC2119]] [[!RFC8174]] when, and only when, they appear in all capitals, as shown here.

    + + + + + +
    +

    +

    OpenAPI Specification v3.0.2

    Version 3.0.2

    +

    +
    + More details about this document +
    + +
    Latest published version:
    + https://spec.openapis.org/oas/latest.html +
    +
    Latest editor's draft:
    https://github.com/OAI/OpenAPI-Specification/
    + + + + + + +
    Editors:
    + Darrel Miller +
    + Jeremy Whitlock +
    + Marsh Gardiner +
    + Mike Ralphson +
    + Ron Ratovsky +
    + Uri Sarid +
    +
    + Former editors: +
    + Jason Harmon +
    + Tony Tam +
    + + + +
    Participate
    + GitHub OAI/OpenAPI-Specification +
    + File a bug +
    + Commit history +
    + Pull requests +
    +
    +
    + + + +
    +

    What is the OpenAPI Specification?

    The OpenAPI Specification (OAS) defines a standard, programming language-agnostic interface description for HTTP APIs, which allows both humans and computers to discover and understand the capabilities of a service without requiring access to source code, additional documentation, or inspection of network traffic. When properly defined via OpenAPI, a consumer can understand and interact with the remote service with a minimal amount of implementation logic. Similar to what interface descriptions have done for lower-level programming, the OpenAPI Specification removes guesswork in calling a service.

    Status of This Document

    The source-of-truth for the specification is the GitHub markdown file referenced above.
    +

    1. OpenAPI Specification

    +

    1.1 Version 3.0.2

    +

    The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “NOT RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.

    This document is licensed under The Apache License, Version 2.0.

    -

    Introduction

    +

    2. Introduction

    The OpenAPI Specification (OAS) defines a standard, language-agnostic interface to RESTful APIs which allows both humans and computers to discover and understand the capabilities of the service without access to source code, documentation, or through network traffic inspection. When properly defined, a consumer can understand and interact with the remote service with a minimal amount of implementation logic.

    An OpenAPI definition can then be used by documentation generation tools to display the API, code generation tools to generate servers and clients in various programming languages, testing tools, and many other use cases.

    - -

    Definitions

    -

    OpenAPI Document

    + +

    3. Definitions

    +

    3.1 OpenAPI Document

    A document (or set of documents) that defines or describes an API. An OpenAPI definition uses and conforms to the OpenAPI Specification.

    -

    Path Templating

    +

    3.2 Path Templating

    Path templating refers to the usage of curly braces ({}) to mark a section of a URL path as replaceable using path parameters.

    -

    Media Types

    +

    3.3 Media Types

    Media type definitions are spread across several resources. -The media type definitions SHOULD be in compliance with [[!RFC6838]].

    +The media type definitions SHOULD be in compliance with [RFC6838].

    Some examples of possible media type definitions:

    -
    
    +
    
       text/plain; charset=utf-8
       application/json
       application/vnd.github+json
    @@ -36,46 +267,46 @@
       application/vnd.github.v3.diff
       application/vnd.github.v3.patch
     
    -

    HTTP Status Codes

    +

    3.4 HTTP Status Codes

    The HTTP Status Codes are used to indicate the status of the executed operation. -The available status codes are defined by [[!RFC7231]] and registered status codes are listed in the IANA Status Code Registry.

    -

    Specification

    -

    Versions

    +The available status codes are defined by [RFC7231] and registered status codes are listed in the IANA Status Code Registry.

    +

    4. Specification

    +

    4.1 Versions

    The OpenAPI Specification is versioned using Semantic Versioning 2.0.0 (semver) and follows the semver specification.

    -

    The major.minor portion of the semver (for example 3.0) SHALL designate the OAS feature set. Typically, .patch versions address errors in this document, not the feature set. Tooling which supports OAS 3.0 SHOULD be compatible with all OAS 3.0.* versions. The patch version SHOULD NOT be considered by tooling, making no distinction between 3.0.0 and 3.0.1 for example.

    -

    Subsequent minor version releases of the OpenAPI Specification (incrementing the minor version number) SHOULD NOT interfere with tooling developed to a lower minor version and same major version. Thus a hypothetical 3.1.0 specification SHOULD be usable with tooling designed for 3.0.0.

    -

    An OpenAPI document compatible with OAS 3.*.* contains a required openapi field which designates the semantic version of the OAS that it uses. (OAS 2.0 documents contain a top-level version field named swagger and value "2.0".)

    -

    Format

    +

    The major.minor portion of the semver (for example 3.0) SHALL designate the OAS feature set. Typically, .patch versions address errors in this document, not the feature set. Tooling which supports OAS 3.0 SHOULD be compatible with all OAS 3.0.* versions. The patch version SHOULD NOT be considered by tooling, making no distinction between 3.0.0 and 3.0.1 for example.

    +

    Subsequent minor version releases of the OpenAPI Specification (incrementing the minor version number) SHOULD NOT interfere with tooling developed to a lower minor version and same major version. Thus a hypothetical 3.1.0 specification SHOULD be usable with tooling designed for 3.0.0.

    +

    An OpenAPI document compatible with OAS 3.*.* contains a required openapi field which designates the semantic version of the OAS that it uses. (OAS 2.0 documents contain a top-level version field named swagger and value "2.0".)

    +

    4.2 Format

    An OpenAPI document that conforms to the OpenAPI Specification is itself a JSON object, which may be represented either in JSON or YAML format.

    For example, if a field has an array value, the JSON array representation will be used:

    
     {
    -   "field": [ 1, 2, 3 ]
    +   "field": [ 1, 2, 3 ]
     }
     

    All field names in the specification are case sensitive. This includes all fields that are used as keys in a map, except where explicitly noted that keys are case insensitive.

    The schema exposes two types of fields: Fixed fields, which have a declared name, and Patterned fields, which declare a regex pattern for the field name.

    -

    Patterned fields MUST have unique names within the containing object.

    -

    In order to preserve the ability to round-trip between YAML and JSON formats, YAML version 1.2 is RECOMMENDED along with some additional constraints:

    +

    Patterned fields MUST have unique names within the containing object.

    +

    In order to preserve the ability to round-trip between YAML and JSON formats, YAML version 1.2 is RECOMMENDED along with some additional constraints:

    Note: While APIs may be defined by OpenAPI documents in either YAML or JSON format, the API request and response bodies and other content are not required to be JSON or YAML.

    -

    Document Structure

    -

    An OpenAPI document MAY be made up of a single document or be divided into multiple, connected parts at the discretion of the user. In the latter case, $ref fields MUST be used in the specification to reference those parts as follows from the JSON Schema definitions.

    -

    It is RECOMMENDED that the root OpenAPI document be named: openapi.json or openapi.yaml.

    -

    Data Types

    +

    4.3 Document Structure

    +

    An OpenAPI document MAY be made up of a single document or be divided into multiple, connected parts at the discretion of the user. In the latter case, $ref fields MUST be used in the specification to reference those parts as follows from the JSON Schema definitions.

    +

    It is RECOMMENDED that the root OpenAPI document be named: openapi.json or openapi.yaml.

    +

    4.4 Data Types

    Primitive data types in the OAS are based on the types supported by the JSON Schema Specification Wright Draft 00. Note that integer as a type is also supported and is defined as a JSON number without a fraction or exponent part. null is not supported as a type (see nullable for an alternative solution). Models are defined using the Schema Object, which is an extended subset of JSON Schema Specification Wright Draft 00.

    -

    Primitives have an optional modifier property: format. +

    Primitives have an optional modifier property: format. OAS uses several known formats to define in fine detail the data type being used. However, to support documentation needs, the format property is an open string-valued property, and can have any value. -Formats such as "email", "uuid", and so on, MAY be used even though undefined by this specification. -Types that are not accompanied by a format property follow the type definition in the JSON Schema. Tools that do not recognize a specific format MAY default back to the type alone, as if the format is not specified.

    +Formats such as "email", "uuid", and so on, MAY be used even though undefined by this specification. +Types that are not accompanied by a format property follow the type definition in the JSON Schema. Tools that do not recognize a specific format MAY default back to the type alone, as if the format is not specified.

    The formats defined by the OAS are:

    @@ -129,12 +360,12 @@ - + - + @@ -143,18 +374,18 @@
    string dateAs defined by full-date - [!RFC3339]As defined by full-date - [RFC3339]
    string date-timeAs defined by date-time - [!RFC3339]As defined by date-time - [RFC3339]
    string
    -

    Rich Text Formatting

    +

    4.5 Rich Text Formatting

    Throughout the specification description fields are noted as supporting CommonMark markdown formatting. -Where OpenAPI tooling renders rich text it MUST support, at a minimum, markdown syntax as described by CommonMark 0.27. Tooling MAY choose to ignore some CommonMark features to address security concerns.

    -

    Relative References in URLs

    -

    Unless specified otherwise, all properties that are URLs MAY be relative references as defined by [[!RFC3986]]. +Where OpenAPI tooling renders rich text it MUST support, at a minimum, markdown syntax as described by CommonMark 0.27. Tooling MAY choose to ignore some CommonMark features to address security concerns.

    +

    4.6 Relative References in URLs

    +

    Unless specified otherwise, all properties that are URLs MAY be relative references as defined by [RFC3986]. Relative references are resolved using the URLs defined in the Server Object as a Base URI.

    Relative references used in $ref are processed as per JSON Reference, using the URL of the current document as the base URI. See also the Reference Object.

    -

    Schema

    -

    In the following description, if a field is not explicitly REQUIRED or described with a MUST or SHALL, it can be considered OPTIONAL.

    -

    OpenAPI Object

    +

    4.7 Schema

    +

    In the following description, if a field is not explicitly REQUIRED or described with a MUST or SHALL, it can be considered OPTIONAL.

    +

    4.7.1 OpenAPI Object

    This is the root document object of the OpenAPI document.

    -

    Fixed Fields

    +
    4.7.1.1 Fixed Fields
    @@ -165,52 +396,52 @@ - + - + - + - + - + - + - + - + - + - + - + - +
    openapiopenapi stringREQUIRED. This string MUST be the semantic version number of the OpenAPI Specification version that the OpenAPI document uses. The openapi field SHOULD be used by tooling specifications and clients to interpret the OpenAPI document. This is not related to the API info.version string.REQUIRED. This string MUST be the semantic version number of the OpenAPI Specification version that the OpenAPI document uses. The openapi field SHOULD be used by tooling specifications and clients to interpret the OpenAPI document. This is not related to the API info.version string.
    infoinfo Info ObjectREQUIRED. Provides metadata about the API. The metadata MAY be used by tooling as required.REQUIRED. Provides metadata about the API. The metadata MAY be used by tooling as required.
    serversservers [Server Object] An array of Server Objects, which provide connectivity information to a target server. If the servers property is not provided, or is an empty array, the default value would be a Server Object with a url value of /.
    pathspaths Paths ObjectREQUIRED. The available paths and operations for the API.REQUIRED. The available paths and operations for the API.
    componentscomponents Components Object An element to hold various schemas for the specification.
    securitysecurity [Security Requirement Object] A declaration of which security mechanisms can be used across the API. The list of values includes alternative security requirement objects that can be used. Only one of the security requirement objects need to be satisfied to authorize a request. Individual operations can override this definition.
    tagstags [Tag Object]A list of tags used by the specification with additional metadata. The order of the tags can be used to reflect on their order by the parsing tools. Not all tags that are used by the Operation Object must be declared. The tags that are not declared MAY be organized randomly or based on the tools’ logic. Each tag name in the list MUST be unique.A list of tags used by the specification with additional metadata. The order of the tags can be used to reflect on their order by the parsing tools. Not all tags that are used by the Operation Object must be declared. The tags that are not declared MAY be organized randomly or based on the tools’ logic. Each tag name in the list MUST be unique.
    externalDocsexternalDocs External Documentation Object Additional external documentation.
    -

    This object MAY be extended with Specification Extensions.

    -

    Info Object

    +

    This object MAY be extended with Specification Extensions.

    +

    4.7.2 Info Object

    The object provides metadata about the API. -The metadata MAY be used by the clients if needed, and MAY be presented in editing or documentation generation tools for convenience.

    -

    Fixed Fields

    +The metadata MAY be used by the clients if needed, and MAY be presented in editing or documentation generation tools for convenience.

    +
    4.7.2.1 Fixed Fields
    @@ -221,54 +452,54 @@ - + - + - + - + - + - + - + - + - + - +
    titletitle stringREQUIRED. The title of the application.REQUIRED. The title of the application.
    descriptiondescription stringA short description of the application. CommonMark syntax MAY be used for rich text representation.A short description of the application. CommonMark syntax MAY be used for rich text representation.
    termsOfServicetermsOfService stringA URL to the Terms of Service for the API. MUST be in the format of a URL.A URL to the Terms of Service for the API. MUST be in the format of a URL.
    contactcontact Contact Object The contact information for the exposed API.
    licenselicense License Object The license information for the exposed API.
    versionversion stringREQUIRED. The version of the OpenAPI document (which is distinct from the OpenAPI Specification version or the API implementation version).REQUIRED. The version of the OpenAPI document (which is distinct from the OpenAPI Specification version or the API implementation version).
    -

    This object MAY be extended with Specification Extensions.

    -

    Info Object Example

    +

    This object MAY be extended with Specification Extensions.

    +
    4.7.2.2 Info Object Example
    
     {
    -  "title": "Sample Pet Store App",
    -  "description": "This is a sample server for a pet store.",
    -  "termsOfService": "http://example.com/terms/",
    -  "contact": {
    -    "name": "API Support",
    -    "url": "http://www.example.com/support",
    -    "email": "support@example.com"
    +  "title": "Sample Pet Store App",
    +  "description": "This is a sample server for a pet store.",
    +  "termsOfService": "http://example.com/terms/",
    +  "contact": {
    +    "name": "API Support",
    +    "url": "http://www.example.com/support",
    +    "email": "support@example.com"
       },
    -  "license": {
    -    "name": "Apache 2.0",
    -    "url": "https://www.apache.org/licenses/LICENSE-2.0.html"
    +  "license": {
    +    "name": "Apache 2.0",
    +    "url": "https://www.apache.org/licenses/LICENSE-2.0.html"
       },
    -  "version": "1.0.1"
    +  "version": "1.0.1"
     }
     
    
    @@ -284,9 +515,9 @@
       url: https://www.apache.org/licenses/LICENSE-2.0.html
     version: 1.0.1
     
    -

    Contact Object

    +

    4.7.3 Contact Object

    Contact information for the exposed API.

    -

    Fixed Fields

    +
    4.7.3.1 Fixed Fields
    @@ -297,29 +528,29 @@ - + - + - + - + - +
    namename string The identifying name of the contact person/organization.
    urlurl stringThe URL pointing to the contact information. MUST be in the format of a URL.The URL pointing to the contact information. MUST be in the format of a URL.
    emailemail stringThe email address of the contact person/organization. MUST be in the format of an email address.The email address of the contact person/organization. MUST be in the format of an email address.
    -

    This object MAY be extended with Specification Extensions.

    -

    Contact Object Example

    +

    This object MAY be extended with Specification Extensions.

    +
    4.7.3.2 Contact Object Example
    
     {
    -  "name": "API Support",
    -  "url": "http://www.example.com/support",
    -  "email": "support@example.com"
    +  "name": "API Support",
    +  "url": "http://www.example.com/support",
    +  "email": "support@example.com"
     }
     
    
    @@ -327,9 +558,9 @@
     url: http://www.example.com/support
     email: support@example.com
     
    -

    License Object

    +

    4.7.4 License Object

    License information for the exposed API.

    -

    Fixed Fields

    +
    4.7.4.1 Fixed Fields
    @@ -340,32 +571,32 @@ - + - + - + - +
    namename stringREQUIRED. The license name used for the API.REQUIRED. The license name used for the API.
    urlurl stringA URL to the license used for the API. MUST be in the format of a URL.A URL to the license used for the API. MUST be in the format of a URL.
    -

    This object MAY be extended with Specification Extensions.

    -

    License Object Example

    +

    This object MAY be extended with Specification Extensions.

    +
    4.7.4.2 License Object Example
    
     {
    -  "name": "Apache 2.0",
    -  "url": "https://www.apache.org/licenses/LICENSE-2.0.html"
    +  "name": "Apache 2.0",
    +  "url": "https://www.apache.org/licenses/LICENSE-2.0.html"
     }
     
    
     name: Apache 2.0
     url: https://www.apache.org/licenses/LICENSE-2.0.html
     
    -

    Server Object

    +

    4.7.5 Server Object

    An object representing a Server.

    -

    Fixed Fields

    +
    4.7.5.1 Fixed Fields
    @@ -376,29 +607,29 @@ - + - + - + - + - +
    urlurl stringREQUIRED. A URL to the target host. This URL supports Server Variables and MAY be relative, to indicate that the host location is relative to the location where the OpenAPI document is being served. Variable substitutions will be made when a variable is named in {brackets}.REQUIRED. A URL to the target host. This URL supports Server Variables and MAY be relative, to indicate that the host location is relative to the location where the OpenAPI document is being served. Variable substitutions will be made when a variable is named in {brackets}.
    descriptiondescription stringAn optional string describing the host designated by the URL. CommonMark syntax MAY be used for rich text representation.An optional string describing the host designated by the URL. CommonMark syntax MAY be used for rich text representation.
    variablesvariables Map[string, Server Variable Object] A map between a variable name and its value. The value is used for substitution in the server’s URL template.
    -

    This object MAY be extended with Specification Extensions.

    -

    Server Object Example

    +

    This object MAY be extended with Specification Extensions.

    +
    4.7.5.2 Server Object Example

    A single server would be described as:

    
     {
    -  "url": "https://development.gigantic-server.com/v1",
    -  "description": "Development server"
    +  "url": "https://development.gigantic-server.com/v1",
    +  "description": "Development server"
     }
     
    
    @@ -408,18 +639,18 @@
     

    The following shows how multiple servers can be described, for example, at the OpenAPI Object’s servers:

    
     {
    -  "servers": [
    +  "servers": [
         {
    -      "url": "https://development.gigantic-server.com/v1",
    -      "description": "Development server"
    +      "url": "https://development.gigantic-server.com/v1",
    +      "description": "Development server"
         },
         {
    -      "url": "https://staging.gigantic-server.com/v1",
    -      "description": "Staging server"
    +      "url": "https://staging.gigantic-server.com/v1",
    +      "description": "Staging server"
         },
         {
    -      "url": "https://api.gigantic-server.com/v1",
    -      "description": "Production server"
    +      "url": "https://api.gigantic-server.com/v1",
    +      "description": "Production server"
         }
       ]
     }
    @@ -436,24 +667,24 @@
     

    The following shows how variables can be used for a server configuration:

    
     {
    -  "servers": [
    +  "servers": [
         {
    -      "url": "https://{username}.gigantic-server.com:{port}/{basePath}",
    -      "description": "The production API server",
    -      "variables": {
    -        "username": {
    -          "default": "demo",
    -          "description": "this value is assigned by the service provider, in this example `gigantic-server.com`"
    +      "url": "https://{username}.gigantic-server.com:{port}/{basePath}",
    +      "description": "The production API server",
    +      "variables": {
    +        "username": {
    +          "default": "demo",
    +          "description": "this value is assigned by the service provider, in this example `gigantic-server.com`"
             },
    -        "port": {
    -          "enum": [
    -            "8443",
    -            "443"
    +        "port": {
    +          "enum": [
    +            "8443",
    +            "443"
               ],
    -          "default": "8443"
    +          "default": "8443"
             },
    -        "basePath": {
    -          "default": "v2"
    +        "basePath": {
    +          "default": "v2"
             }
           }
         }
    @@ -471,16 +702,16 @@
           description: this value is assigned by the service provider, in this example `gigantic-server.com`
         port:
           enum:
    -        - '8443'
    -        - '443'
    -      default: '8443'
    +        - '8443'
    +        - '443'
    +      default: '8443'
         basePath:
           # open meaning there is the opportunity to use special base paths as assigned by the provider, default is `v2`
           default: v2
     
    -

    Server Variable Object

    +

    4.7.6 Server Variable Object

    An object representing a Server Variable for server URL template substitution.

    -

    Fixed Fields

    +
    4.7.6.1 Fixed Fields
    @@ -491,27 +722,27 @@ - + - + - + - + - +
    enumenum [string] An enumeration of string values to be used if the substitution options are from a limited set.
    defaultdefault stringREQUIRED. The default value to use for substitution, which SHALL be sent if an alternate value is not supplied. Note this behavior is different than the Schema Object’s treatment of default values, because in those cases parameter values are optional.REQUIRED. The default value to use for substitution, which SHALL be sent if an alternate value is not supplied. Note this behavior is different than the Schema Object’s treatment of default values, because in those cases parameter values are optional.
    descriptiondescription stringAn optional description for the server variable. CommonMark syntax MAY be used for rich text representation.An optional description for the server variable. CommonMark syntax MAY be used for rich text representation.
    -

    This object MAY be extended with Specification Extensions.

    -

    Components Object

    +

    This object MAY be extended with Specification Extensions.

    +

    4.7.7 Components Object

    Holds a set of reusable objects for different aspects of the OAS. All objects defined within the components object will have no effect on the API unless they are explicitly referenced from properties outside the components object.

    -

    Fixed Fields

    +
    4.7.7.1 Fixed Fields
    @@ -522,157 +753,157 @@ - + - + - + - + - + - + - + - + - +
    schemas schemas Map[string, Schema Object | Reference Object] An object to hold reusable Schema Objects.
    responses responses Map[string, Response Object | Reference Object] An object to hold reusable Response Objects.
    parameters parameters Map[string, Parameter Object | Reference Object] An object to hold reusable Parameter Objects.
    examples examples Map[string, Example Object | Reference Object] An object to hold reusable Example Objects.
    requestBodies requestBodies Map[string, Request Body Object | Reference Object] An object to hold reusable Request Body Objects.
    headers headers Map[string, Header Object | Reference Object] An object to hold reusable Header Objects.
    securitySchemes securitySchemes Map[string, Security Scheme Object | Reference Object] An object to hold reusable Security Scheme Objects.
    links links Map[string, Link Object | Reference Object] An object to hold reusable Link Objects.
    callbacks callbacks Map[string, Callback Object | Reference Object] An object to hold reusable Callback Objects.
    -

    This object MAY be extended with Specification Extensions.

    -

    All the fixed fields declared above are objects that MUST use keys that match the regular expression: ^[a-zA-Z0-9\.\-_]+$.

    +

    This object MAY be extended with Specification Extensions.

    +

    All the fixed fields declared above are objects that MUST use keys that match the regular expression: ^[a-zA-Z0-9\.\-_]+$.

    Field Name Examples:

    -
    
    +
    
     User
     User_1
     User_Name
     user-name
     my.org.User
     
    -

    Components Object Example

    +
    4.7.7.2 Components Object Example
    
    -"components": {
    -  "schemas": {
    -    "GeneralError": {
    -      "type": "object",
    -      "properties": {
    -        "code": {
    -          "type": "integer",
    -          "format": "int32"
    +"components": {
    +  "schemas": {
    +    "GeneralError": {
    +      "type": "object",
    +      "properties": {
    +        "code": {
    +          "type": "integer",
    +          "format": "int32"
             },
    -        "message": {
    -          "type": "string"
    +        "message": {
    +          "type": "string"
             }
           }
         },
    -    "Category": {
    -      "type": "object",
    -      "properties": {
    -        "id": {
    -          "type": "integer",
    -          "format": "int64"
    +    "Category": {
    +      "type": "object",
    +      "properties": {
    +        "id": {
    +          "type": "integer",
    +          "format": "int64"
             },
    -        "name": {
    -          "type": "string"
    +        "name": {
    +          "type": "string"
             }
           }
         },
    -    "Tag": {
    -      "type": "object",
    -      "properties": {
    -        "id": {
    -          "type": "integer",
    -          "format": "int64"
    +    "Tag": {
    +      "type": "object",
    +      "properties": {
    +        "id": {
    +          "type": "integer",
    +          "format": "int64"
             },
    -        "name": {
    -          "type": "string"
    +        "name": {
    +          "type": "string"
             }
           }
         }
       },
    -  "parameters": {
    -    "skipParam": {
    -      "name": "skip",
    -      "in": "query",
    -      "description": "number of items to skip",
    -      "required": true,
    -      "schema": {
    -        "type": "integer",
    -        "format": "int32"
    +  "parameters": {
    +    "skipParam": {
    +      "name": "skip",
    +      "in": "query",
    +      "description": "number of items to skip",
    +      "required": true,
    +      "schema": {
    +        "type": "integer",
    +        "format": "int32"
           }
         },
    -    "limitParam": {
    -      "name": "limit",
    -      "in": "query",
    -      "description": "max records to return",
    -      "required": true,
    -      "schema" : {
    -        "type": "integer",
    -        "format": "int32"
    +    "limitParam": {
    +      "name": "limit",
    +      "in": "query",
    +      "description": "max records to return",
    +      "required": true,
    +      "schema" : {
    +        "type": "integer",
    +        "format": "int32"
           }
         }
       },
    -  "responses": {
    -    "NotFound": {
    -      "description": "Entity not found."
    +  "responses": {
    +    "NotFound": {
    +      "description": "Entity not found."
         },
    -    "IllegalInput": {
    -      "description": "Illegal input for operation."
    +    "IllegalInput": {
    +      "description": "Illegal input for operation."
         },
    -    "GeneralError": {
    -      "description": "General Error",
    -      "content": {
    -        "application/json": {
    -          "schema": {
    -            "$ref": "#/components/schemas/GeneralError"
    +    "GeneralError": {
    +      "description": "General Error",
    +      "content": {
    +        "application/json": {
    +          "schema": {
    +            "$ref": "#/components/schemas/GeneralError"
               }
             }
           }
         }
       },
    -  "securitySchemes": {
    -    "api_key": {
    -      "type": "apiKey",
    -      "name": "api_key",
    -      "in": "header"
    +  "securitySchemes": {
    +    "api_key": {
    +      "type": "apiKey",
    +      "name": "api_key",
    +      "in": "header"
         },
    -    "petstore_auth": {
    -      "type": "oauth2",
    -      "flows": {
    -        "implicit": {
    -          "authorizationUrl": "http://example.org/api/oauth/dialog",
    -          "scopes": {
    -            "write:pets": "modify pets in your account",
    -            "read:pets": "read your pets"
    +    "petstore_auth": {
    +      "type": "oauth2",
    +      "flows": {
    +        "implicit": {
    +          "authorizationUrl": "http://example.org/api/oauth/dialog",
    +          "scopes": {
    +            "write:pets": "modify pets in your account",
    +            "read:pets": "read your pets"
               }
             }
           }
    @@ -734,7 +965,7 @@
           content:
             application/json:
               schema:
    -            $ref: '#/components/schemas/GeneralError'
    +            $ref: '#/components/schemas/GeneralError'
       securitySchemes:
         api_key:
           type: apiKey
    @@ -749,10 +980,10 @@
                 write:pets: modify pets in your account
                 read:pets: read your pets
     
    -

    Paths Object

    +

    4.7.8 Paths Object

    Holds the relative paths to the individual endpoints and their operations. -The path is appended to the URL from the Server Object in order to construct the full URL. The Paths MAY be empty, due to ACL constraints.

    -

    Patterned Fields

    +The path is appended to the URL from the Server Object in order to construct the full URL. The Paths MAY be empty, due to ACL constraints.

    +
    4.7.8.1 Patterned Fields
    @@ -763,44 +994,44 @@ - + - +
    /{path}/{path} Path Item ObjectA relative path to an individual endpoint. The field name MUST begin with a slash. The path is appended (no relative URL resolution) to the expanded URL from the Server Object’s url field in order to construct the full URL. Path templating is allowed. When matching URLs, concrete (non-templated) paths would be matched before their templated counterparts. Templated paths with the same hierarchy but different templated names MUST NOT exist as they are identical. In case of ambiguous matching, it’s up to the tooling to decide which one to use.A relative path to an individual endpoint. The field name MUST begin with a slash. The path is appended (no relative URL resolution) to the expanded URL from the Server Object’s url field in order to construct the full URL. Path templating is allowed. When matching URLs, concrete (non-templated) paths would be matched before their templated counterparts. Templated paths with the same hierarchy but different templated names MUST NOT exist as they are identical. In case of ambiguous matching, it’s up to the tooling to decide which one to use.
    -

    This object MAY be extended with Specification Extensions.

    -

    Path Templating Matching

    +

    This object MAY be extended with Specification Extensions.

    +
    4.7.8.2 Path Templating Matching

    Assuming the following paths, the concrete definition, /pets/mine, will be matched first if used:

    -
    
    +
    
       /pets/{petId}
       /pets/mine
     

    The following paths are considered identical and invalid:

    -
    
    +
    
       /pets/{petId}
       /pets/{name}
     

    The following may lead to ambiguous resolution:

    -
    
    +
    
       /{entity}/me
       /books/{id}
     
    -

    Paths Object Example

    +
    4.7.8.3 Paths Object Example
    
     {
    -  "/pets": {
    -    "get": {
    -      "description": "Returns all pets from the system that the user has access to",
    -      "responses": {
    -        "200": {         
    -          "description": "A list of pets.",
    -          "content": {
    -            "application/json": {
    -              "schema": {
    -                "type": "array",
    -                "items": {
    -                  "$ref": "#/components/schemas/pet"
    +  "/pets": {
    +    "get": {
    +      "description": "Returns all pets from the system that the user has access to",
    +      "responses": {
    +        "200": {         
    +          "description": "A list of pets.",
    +          "content": {
    +            "application/json": {
    +              "schema": {
    +                "type": "array",
    +                "items": {
    +                  "$ref": "#/components/schemas/pet"
                     }
                   }
                 }
    @@ -816,20 +1047,20 @@
       get:
         description: Returns all pets from the system that the user has access to
         responses:
    -      '200':
    +      '200':
             description: A list of pets.
             content:
               application/json:
                 schema:
                   type: array
                   items:
    -                $ref: '#/components/schemas/pet'
    +                $ref: '#/components/schemas/pet'
     
    -

    Path Item Object

    +

    4.7.9 Path Item Object

    Describes the operations available on a single path. -A Path Item MAY be empty, due to ACL constraints. +A Path Item MAY be empty, due to ACL constraints. The path itself is still exposed to the documentation viewer but they will not know which operations and parameters are available.

    -

    Fixed Fields

    +
    4.7.9.1 Fixed Fields
    @@ -840,119 +1071,119 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
    $ref$ref stringAllows for an external definition of this path item. The referenced structure MUST be in the format of a Path Item Object. If there are conflicts between the referenced definition and this Path Item’s definition, the behavior is undefined.Allows for an external definition of this path item. The referenced structure MUST be in the format of a Path Item Object. If there are conflicts between the referenced definition and this Path Item’s definition, the behavior is undefined.
    summarysummary string An optional, string summary, intended to apply to all operations in this path.
    descriptiondescription stringAn optional, string description, intended to apply to all operations in this path. CommonMark syntax MAY be used for rich text representation.An optional, string description, intended to apply to all operations in this path. CommonMark syntax MAY be used for rich text representation.
    getget Operation Object A definition of a GET operation on this path.
    putput Operation Object A definition of a PUT operation on this path.
    postpost Operation Object A definition of a POST operation on this path.
    deletedelete Operation Object A definition of a DELETE operation on this path.
    optionsoptions Operation Object A definition of a OPTIONS operation on this path.
    headhead Operation Object A definition of a HEAD operation on this path.
    patchpatch Operation Object A definition of a PATCH operation on this path.
    tracetrace Operation Object A definition of a TRACE operation on this path.
    serversservers [Server Object] An alternative server array to service all operations in this path.
    parametersparameters [Parameter Object | Reference Object]A list of parameters that are applicable for all the operations described under this path. These parameters can be overridden at the operation level, but cannot be removed there. The list MUST NOT include duplicated parameters. A unique parameter is defined by a combination of a name and location. The list can use the Reference Object to link to parameters that are defined at the OpenAPI Object’s components/parameters.A list of parameters that are applicable for all the operations described under this path. These parameters can be overridden at the operation level, but cannot be removed there. The list MUST NOT include duplicated parameters. A unique parameter is defined by a combination of a name and location. The list can use the Reference Object to link to parameters that are defined at the OpenAPI Object’s components/parameters.
    -

    This object MAY be extended with Specification Extensions.

    -

    Path Item Object Example

    +

    This object MAY be extended with Specification Extensions.

    +
    4.7.9.2 Path Item Object Example
    
     {
    -  "get": {
    -    "description": "Returns pets based on ID",
    -    "summary": "Find pets by ID",
    -    "operationId": "getPetsById",
    -    "responses": {
    -      "200": {
    -        "description": "pet response",
    -        "content": {
    -          "*/*": {
    -            "schema": {
    -              "type": "array",
    -              "items": {
    -                "$ref": "#/components/schemas/Pet"
    +  "get": {
    +    "description": "Returns pets based on ID",
    +    "summary": "Find pets by ID",
    +    "operationId": "getPetsById",
    +    "responses": {
    +      "200": {
    +        "description": "pet response",
    +        "content": {
    +          "*/*": {
    +            "schema": {
    +              "type": "array",
    +              "items": {
    +                "$ref": "#/components/schemas/Pet"
                   }
                 }
               }
             }
           },
    -      "default": {
    -        "description": "error payload",
    -        "content": {
    -          "text/html": {
    -            "schema": {
    -              "$ref": "#/components/schemas/ErrorModel"
    +      "default": {
    +        "description": "error payload",
    +        "content": {
    +          "text/html": {
    +            "schema": {
    +              "$ref": "#/components/schemas/ErrorModel"
                 }
               }
             }
           }
         }
       },
    -  "parameters": [
    +  "parameters": [
         {
    -      "name": "id",
    -      "in": "path",
    -      "description": "ID of pet to use",
    -      "required": true,
    -      "schema": {
    -        "type": "array",
    -        "items": {
    -          "type": "string"
    +      "name": "id",
    +      "in": "path",
    +      "description": "ID of pet to use",
    +      "required": true,
    +      "schema": {
    +        "type": "array",
    +        "items": {
    +          "type": "string"
             }
           },
    -      "style": "simple"
    +      "style": "simple"
         }
       ]
     }
    @@ -963,20 +1194,20 @@
       summary: Find pets by ID
       operationId: getPetsById
       responses:
    -    '200':
    +    '200':
           description: pet response
           content:
    -        '*/*' :
    +        '*/*' :
               schema:
                 type: array
                 items:
    -              $ref: '#/components/schemas/Pet'
    +              $ref: '#/components/schemas/Pet'
         default:
           description: error payload
           content:
    -        'text/html':
    +        'text/html':
               schema:
    -            $ref: '#/components/schemas/ErrorModel'
    +            $ref: '#/components/schemas/ErrorModel'
     parameters:
     - name: id
       in: path
    @@ -988,9 +1219,9 @@
         items:
           type: string 
     
    -

    Operation Object

    +

    4.7.10 Operation Object

    Describes a single API operation on a path.

    -

    Fixed Fields

    +
    4.7.10.1 Fixed Fields
    @@ -1001,128 +1232,128 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
    tagstags [string] A list of tags for API documentation control. Tags can be used for logical grouping of operations by resources or any other qualifier.
    summarysummary string A short summary of what the operation does.
    descriptiondescription stringA verbose explanation of the operation behavior. CommonMark syntax MAY be used for rich text representation.A verbose explanation of the operation behavior. CommonMark syntax MAY be used for rich text representation.
    externalDocsexternalDocs External Documentation Object Additional external documentation for this operation.
    operationIdoperationId stringUnique string used to identify the operation. The id MUST be unique among all operations described in the API. The operationId value is case-sensitive. Tools and libraries MAY use the operationId to uniquely identify an operation, therefore, it is RECOMMENDED to follow common programming naming conventions.Unique string used to identify the operation. The id MUST be unique among all operations described in the API. The operationId value is case-sensitive. Tools and libraries MAY use the operationId to uniquely identify an operation, therefore, it is RECOMMENDED to follow common programming naming conventions.
    parametersparameters [Parameter Object | Reference Object]A list of parameters that are applicable for this operation. If a parameter is already defined at the Path Item, the new definition will override it but can never remove it. The list MUST NOT include duplicated parameters. A unique parameter is defined by a combination of a name and location. The list can use the Reference Object to link to parameters that are defined at the OpenAPI Object’s components/parameters.A list of parameters that are applicable for this operation. If a parameter is already defined at the Path Item, the new definition will override it but can never remove it. The list MUST NOT include duplicated parameters. A unique parameter is defined by a combination of a name and location. The list can use the Reference Object to link to parameters that are defined at the OpenAPI Object’s components/parameters.
    requestBodyrequestBody Request Body Object | Reference ObjectThe request body applicable for this operation. The requestBody is only supported in HTTP methods where the HTTP 1.1 specification [[!RFC7231]] has explicitly defined semantics for request bodies. In other cases where the HTTP spec is vague, requestBody SHALL be ignored by consumers.The request body applicable for this operation. The requestBody is only supported in HTTP methods where the HTTP 1.1 specification [RFC7231] has explicitly defined semantics for request bodies. In other cases where the HTTP spec is vague, requestBody SHALL be ignored by consumers.
    responsesresponses Responses ObjectREQUIRED. The list of possible responses as they are returned from executing this operation.REQUIRED. The list of possible responses as they are returned from executing this operation.
    callbackscallbacks Map[string, Callback Object | Reference Object] A map of possible out-of band callbacks related to the parent operation. The key is a unique identifier for the Callback Object. Each value in the map is a Callback Object that describes a request that may be initiated by the API provider and the expected responses. The key value used to identify the callback object is an expression, evaluated at runtime, that identifies a URL to use for the callback operation.
    deprecateddeprecated booleanDeclares this operation to be deprecated. Consumers SHOULD refrain from usage of the declared operation. Default value is false.Declares this operation to be deprecated. Consumers SHOULD refrain from usage of the declared operation. Default value is false.
    securitysecurity [Security Requirement Object] A declaration of which security mechanisms can be used for this operation. The list of values includes alternative security requirement objects that can be used. Only one of the security requirement objects need to be satisfied to authorize a request. This definition overrides any declared top-level security. To remove a top-level security declaration, an empty array can be used.
    serversservers [Server Object] An alternative server array to service this operation. If an alternative server object is specified at the Path Item Object or Root level, it will be overridden by this value.
    -

    This object MAY be extended with Specification Extensions.

    -

    Operation Object Example

    +

    This object MAY be extended with Specification Extensions.

    +
    4.7.10.2 Operation Object Example
    
     {
    -  "tags": [
    -    "pet"
    +  "tags": [
    +    "pet"
       ],
    -  "summary": "Updates a pet in the store with form data",
    -  "operationId": "updatePetWithForm",
    -  "parameters": [
    +  "summary": "Updates a pet in the store with form data",
    +  "operationId": "updatePetWithForm",
    +  "parameters": [
         {
    -      "name": "petId",
    -      "in": "path",
    -      "description": "ID of pet that needs to be updated",
    -      "required": true,
    -      "schema": {
    -        "type": "string"
    +      "name": "petId",
    +      "in": "path",
    +      "description": "ID of pet that needs to be updated",
    +      "required": true,
    +      "schema": {
    +        "type": "string"
           }
         }
       ],
    -  "requestBody": {
    -    "content": {
    -      "application/x-www-form-urlencoded": {
    -        "schema": {
    -          "type": "object",
    -           "properties": {
    -              "name": {
    -                "description": "Updated name of the pet",
    -                "type": "string"
    +  "requestBody": {
    +    "content": {
    +      "application/x-www-form-urlencoded": {
    +        "schema": {
    +          "type": "object",
    +           "properties": {
    +              "name": {
    +                "description": "Updated name of the pet",
    +                "type": "string"
                   },
    -              "status": {
    -                "description": "Updated status of the pet",
    -                "type": "string"
    +              "status": {
    +                "description": "Updated status of the pet",
    +                "type": "string"
                  }
                },
    -        "required": ["status"]
    +        "required": ["status"]
             }
           }
         }
       },
    -  "responses": {
    -    "200": {
    -      "description": "Pet updated.",
    -      "content": {
    -        "application/json": {},
    -        "application/xml": {}
    +  "responses": {
    +    "200": {
    +      "description": "Pet updated.",
    +      "content": {
    +        "application/json": {},
    +        "application/xml": {}
           }
         },
    -    "405": {
    -      "description": "Method Not Allowed",
    -      "content": {
    -        "application/json": {},
    -        "application/xml": {}
    +    "405": {
    +      "description": "Method Not Allowed",
    +      "content": {
    +        "application/json": {},
    +        "application/xml": {}
           }
         }
       },
    -  "security": [
    +  "security": [
         {
    -      "petstore_auth": [
    -        "write:pets",
    -        "read:pets"
    +      "petstore_auth": [
    +        "write:pets",
    +        "read:pets"
           ]
         }
       ]
    @@ -1142,7 +1373,7 @@
         type: string
     requestBody:
       content:
    -    'application/x-www-form-urlencoded':
    +    'application/x-www-form-urlencoded':
           schema:
            properties:
               name:
    @@ -1154,24 +1385,24 @@
            required:
              - status
     responses:
    -  '200':
    +  '200':
         description: Pet updated.
         content:
    -      'application/json': {}
    -      'application/xml': {}
    -  '405':
    +      'application/json': {}
    +      'application/xml': {}
    +  '405':
         description: Method Not Allowed
         content:
    -      'application/json': {}
    -      'application/xml': {}
    +      'application/json': {}
    +      'application/xml': {}
     security:
     - petstore_auth:
       - write:pets
       - read:pets
     
    -

    External Documentation Object

    +

    4.7.11 External Documentation Object

    Allows referencing an external resource for extended documentation.

    -

    Fixed Fields

    +
    4.7.11.1 Fixed Fields
    @@ -1182,41 +1413,41 @@ - + - + - + - +
    descriptiondescription stringA short description of the target documentation. CommonMark syntax MAY be used for rich text representation.A short description of the target documentation. CommonMark syntax MAY be used for rich text representation.
    urlurl stringREQUIRED. The URL for the target documentation. Value MUST be in the format of a URL.REQUIRED. The URL for the target documentation. Value MUST be in the format of a URL.
    -

    This object MAY be extended with Specification Extensions.

    -

    External Documentation Object Example

    +

    This object MAY be extended with Specification Extensions.

    +
    4.7.11.2 External Documentation Object Example
    
     {
    -  "description": "Find more info here",
    -  "url": "https://example.com"
    +  "description": "Find more info here",
    +  "url": "https://example.com"
     }
     
    
     description: Find more info here
     url: https://example.com
     
    -

    Parameter Object

    +

    4.7.12 Parameter Object

    Describes a single operation parameter.

    A unique parameter is defined by a combination of a name and location.

    -

    Parameter Locations

    +
    4.7.12.1 Parameter Locations

    There are four possible parameter locations specified by the in field:

    • path - Used together with Path Templating, where the parameter value is actually part of the operation’s URL. This does not include the host or base path of the API. For example, in /items/{itemId}, the path parameter is itemId.
    • query - Parameters that are appended to the URL. For example, in /items?id=###, the query parameter is id.
    • -
    • header - Custom headers that are expected as part of the request. Note that [[!RFC7230]] states header names are case insensitive.
    • +
    • header - Custom headers that are expected as part of the request. Note that [RFC7230] states header names are case insensitive.
    • cookie - Used to pass a specific cookie value to the API.
    -

    Fixed Fields

    +
    4.7.12.2 Fixed Fields
    @@ -1227,34 +1458,34 @@ - + - + - + - + - + - + - + - + - + - + - + - +
    namename stringREQUIRED. The name of the parameter. Parameter names are case sensitive.
    • If in is "path", the name field MUST correspond to the associated path segment from the path field in the Paths Object. See Path Templating for further information.
    • If in is "header" and the name field is "Accept", "Content-Type" or "Authorization", the parameter definition SHALL be ignored.
    • For all other cases, the name corresponds to the parameter name used by the in property.
    REQUIRED. The name of the parameter. Parameter names are case sensitive.
    • If in is "path", the name field MUST correspond to the associated path segment from the path field in the Paths Object. See Path Templating for further information.
    • If in is "header" and the name field is "Accept", "Content-Type" or "Authorization", the parameter definition SHALL be ignored.
    • For all other cases, the name corresponds to the parameter name used by the in property.
    inin stringREQUIRED. The location of the parameter. Possible values are “query”, “header”, “path” or “cookie”.REQUIRED. The location of the parameter. Possible values are “query”, “header”, “path” or “cookie”.
    descriptiondescription stringA brief description of the parameter. This could contain examples of use. CommonMark syntax MAY be used for rich text representation.A brief description of the parameter. This could contain examples of use. CommonMark syntax MAY be used for rich text representation.
    requiredrequired booleanDetermines whether this parameter is mandatory. If the parameter location is “path”, this property is REQUIRED and its value MUST be true. Otherwise, the property MAY be included and its default value is false.Determines whether this parameter is mandatory. If the parameter location is “path”, this property is REQUIRED and its value MUST be true. Otherwise, the property MAY be included and its default value is false.
    deprecated deprecated booleanSpecifies that a parameter is deprecated and SHOULD be transitioned out of usage. Default value is false.Specifies that a parameter is deprecated and SHOULD be transitioned out of usage. Default value is false.
    allowEmptyValue allowEmptyValue booleanSets the ability to pass empty-valued parameters. This is valid only for query parameters and allows sending a parameter with an empty value. Default value is false. If style is used, and if behavior is n/a (cannot be serialized), the value of allowEmptyValue SHALL be ignored. Use of this property is NOT RECOMMENDED, as it is likely to be removed in a later revision.Sets the ability to pass empty-valued parameters. This is valid only for query parameters and allows sending a parameter with an empty value. Default value is false. If style is used, and if behavior is n/a (cannot be serialized), the value of allowEmptyValue SHALL be ignored. Use of this property is NOT RECOMMENDED, as it is likely to be removed in a later revision.
    @@ -1270,40 +1501,40 @@ - style +style string Describes how the parameter value will be serialized depending on the type of the parameter value. Default values (based on value of in): for query - form; for path - simple; for header - simple; for cookie - form. - explode +explode boolean When this is true, parameter values of type array or object generate separate parameters for each value of the array or key-value pair of the map. For other types of parameters this property has no effect. When style is form, the default value is true. For all other styles, the default value is false. - allowReserved +allowReserved boolean -Determines whether the parameter value SHOULD allow reserved characters, as defined by [[!RFC3986]] :/?#[]@!$&'()*+,;= to be included without percent-encoding. This property only applies to parameters with an in value of query. The default value is false. +Determines whether the parameter value SHOULD allow reserved characters, as defined by [RFC3986] :/?#[]@!$&'()*+,;= to be included without percent-encoding. This property only applies to parameters with an in value of query. The default value is false. - schema +schema Schema Object | Reference Object The schema defining the type used for the parameter. - example +example Any -Example of the media type. The example SHOULD match the specified schema and encoding properties if present. The example field is mutually exclusive of the examples field. Furthermore, if referencing a schema which contains an example, the example value SHALL override the example provided by the schema. To represent examples of media types that cannot naturally be represented in JSON or YAML, a string value can contain the example with escaping where necessary. +Example of the media type. The example SHOULD match the specified schema and encoding properties if present. The example field is mutually exclusive of the examples field. Furthermore, if referencing a schema which contains an example, the example value SHALL override the example provided by the schema. To represent examples of media types that cannot naturally be represented in JSON or YAML, a string value can contain the example with escaping where necessary. - examples +examples Map[ string, Example Object | Reference Object] -Examples of the media type. Each example SHOULD contain a value in the correct format as specified in the parameter encoding. The examples field is mutually exclusive of the example field. Furthermore, if referencing a schema which contains an example, the examples value SHALL override the example provided by the schema. +Examples of the media type. Each example SHOULD contain a value in the correct format as specified in the parameter encoding. The examples field is mutually exclusive of the example field. Furthermore, if referencing a schema which contains an example, the examples value SHALL override the example provided by the schema.

    For more complex scenarios, the content property can define the media type and schema of the parameter. -A parameter MUST contain either a schema property, or a content property, but not both. -When example or examples are provided in conjunction with the schema object, the example MUST follow the prescribed serialization strategy for the parameter.

    +A parameter MUST contain either a schema property, or a content property, but not both. +When example or examples are provided in conjunction with the schema object, the example MUST follow the prescribed serialization strategy for the parameter.

    @@ -1314,13 +1545,13 @@ - + - +
    contentcontent Map[string, Media Type Object]A map containing the representations for the parameter. The key is the media type and the value describes it. The map MUST only contain one entry.A map containing the representations for the parameter. The key is the media type and the value describes it. The map MUST only contain one entry.
    -

    Style Values

    +
    4.7.12.3 Style Values

    In order to support common ways of serializing simple parameters, a set of style values are defined.

    @@ -1336,25 +1567,25 @@ - + - + - + - + @@ -1376,12 +1607,12 @@
    matrix primitive, array, object pathPath-style parameters defined by [[!RFC6570]]Path-style parameters defined by [RFC6570]
    label primitive, array, object pathLabel style parameters defined by [[!RFC6570]]Label style parameters defined by [RFC6570]
    form primitive, array, object query, cookieForm style parameters defined by [[!RFC6570]]. This option replaces collectionFormat with a csv (when explode is false) or multi (when explode is true) value from OpenAPI 2.0.Form style parameters defined by [RFC6570]. This option replaces collectionFormat with a csv (when explode is false) or multi (when explode is true) value from OpenAPI 2.0.
    simple array path, headerSimple style parameters defined by [[!RFC6570]]. This option replaces collectionFormat with a csv value from OpenAPI 2.0.Simple style parameters defined by [RFC6570]. This option replaces collectionFormat with a csv value from OpenAPI 2.0.
    spaceDelimited
    -

    Style Examples

    +
    4.7.12.4 Style Examples

    Assume a parameter named color has one of the following values:

    -
    
    -   string -> "blue"
    -   array -> ["blue","black","brown"]
    -   object -> { "R": 100, "G": 200, "B": 150 }
    +
    
    +   string -> "blue"
    +   array -> ["blue","black","brown"]
    +   object -> { "R": 100, "G": 200, "B": 150 }
     

    The following table shows examples of rendering differences for each value.

    @@ -1482,27 +1713,27 @@ - +
    n/a n/a n/acolor[R]=100&color[G]=200&color[B]=150color[R]=100&color[G]=200&color[B]=150
    -

    This object MAY be extended with Specification Extensions.

    -

    Parameter Object Examples

    +

    This object MAY be extended with Specification Extensions.

    +
    4.7.12.5 Parameter Object Examples

    A header parameter with an array of 64 bit integer numbers:

    
     {
    -  "name": "token",
    -  "in": "header",
    -  "description": "token to be passed as a header",
    -  "required": true,
    -  "schema": {
    -    "type": "array",
    -    "items": {
    -      "type": "integer",
    -      "format": "int64"
    +  "name": "token",
    +  "in": "header",
    +  "description": "token to be passed as a header",
    +  "required": true,
    +  "schema": {
    +    "type": "array",
    +    "items": {
    +      "type": "integer",
    +      "format": "int64"
         }
       },
    -  "style": "simple"
    +  "style": "simple"
     }
     
    
    @@ -1520,12 +1751,12 @@
     

    A path parameter of a string value:

    
     {
    -  "name": "username",
    -  "in": "path",
    -  "description": "username to fetch",
    -  "required": true,
    -  "schema": {
    -    "type": "string"
    +  "name": "username",
    +  "in": "path",
    +  "description": "username to fetch",
    +  "required": true,
    +  "schema": {
    +    "type": "string"
       }
     }
     
    @@ -1540,18 +1771,18 @@

    An optional query parameter of a string value, allowing multiple values by repeating the query parameter:

    
     {
    -  "name": "id",
    -  "in": "query",
    -  "description": "ID of the object to fetch",
    -  "required": false,
    -  "schema": {
    -    "type": "array",
    -    "items": {
    -      "type": "string"
    +  "name": "id",
    +  "in": "query",
    +  "description": "ID of the object to fetch",
    +  "required": false,
    +  "schema": {
    +    "type": "array",
    +    "items": {
    +      "type": "string"
         }
       },
    -  "style": "form",
    -  "explode": true
    +  "style": "form",
    +  "explode": true
     }
     
    
    @@ -1569,15 +1800,15 @@
     

    A free-form query parameter, allowing undefined parameters of a specific type:

    
     {
    -  "in": "query",
    -  "name": "freeForm",
    -  "schema": {
    -    "type": "object",
    -    "additionalProperties": {
    -      "type": "integer"
    +  "in": "query",
    +  "name": "freeForm",
    +  "schema": {
    +    "type": "object",
    +    "additionalProperties": {
    +      "type": "integer"
         },
       },
    -  "style": "form"
    +  "style": "form"
     }
     
    
    @@ -1592,22 +1823,22 @@
     

    A complex parameter using content to define serialization:

    
     {
    -  "in": "query",
    -  "name": "coordinates",
    -  "content": {
    -    "application/json": {
    -      "schema": {
    -        "type": "object",
    -        "required": [
    -          "lat",
    -          "long"
    +  "in": "query",
    +  "name": "coordinates",
    +  "content": {
    +    "application/json": {
    +      "schema": {
    +        "type": "object",
    +        "required": [
    +          "lat",
    +          "long"
             ],
    -        "properties": {
    -          "lat": {
    -            "type": "number"
    +        "properties": {
    +          "lat": {
    +            "type": "number"
               },
    -          "long": {
    -            "type": "number"
    +          "long": {
    +            "type": "number"
               }
             }
           }
    @@ -1631,9 +1862,9 @@
             long:
               type: number
     
    -

    Request Body Object

    +

    4.7.13 Request Body Object

    Describes a single request body.

    -

    Fixed Fields

    +
    4.7.13.1 Fixed Fields
    @@ -1644,64 +1875,64 @@ - + - + - + - + - +
    descriptiondescription stringA brief description of the request body. This could contain examples of use. CommonMark syntax MAY be used for rich text representation.A brief description of the request body. This could contain examples of use. CommonMark syntax MAY be used for rich text representation.
    contentcontent Map[string, Media Type Object]REQUIRED. The content of the request body. The key is a media type or media type range and the value describes it. For requests that match multiple keys, only the most specific key is applicable. e.g. text/plain overrides text/*REQUIRED. The content of the request body. The key is a media type or media type range and the value describes it. For requests that match multiple keys, only the most specific key is applicable. e.g. text/plain overrides text/*
    requiredrequired boolean Determines if the request body is required in the request. Defaults to false.
    -

    This object MAY be extended with Specification Extensions.

    -

    Request Body Examples

    +

    This object MAY be extended with Specification Extensions.

    +
    4.7.13.2 Request Body Examples

    A request body with a referenced model definition.

    
     {
    -  "description": "user to add to the system",
    -  "content": {
    -    "application/json": {
    -      "schema": {
    -        "$ref": "#/components/schemas/User"
    +  "description": "user to add to the system",
    +  "content": {
    +    "application/json": {
    +      "schema": {
    +        "$ref": "#/components/schemas/User"
           },
    -      "examples": {
    -          "user" : {
    -            "summary": "User Example",
    -            "externalValue": "http://foo.bar/examples/user-example.json"
    +      "examples": {
    +          "user" : {
    +            "summary": "User Example",
    +            "externalValue": "http://foo.bar/examples/user-example.json"
               }
             }
         },
    -    "application/xml": {
    -      "schema": {
    -        "$ref": "#/components/schemas/User"
    +    "application/xml": {
    +      "schema": {
    +        "$ref": "#/components/schemas/User"
           },
    -      "examples": {
    -          "user" : {
    -            "summary": "User example in XML",
    -            "externalValue": "http://foo.bar/examples/user-example.xml"
    +      "examples": {
    +          "user" : {
    +            "summary": "User example in XML",
    +            "externalValue": "http://foo.bar/examples/user-example.xml"
               }
             }
         },
    -    "text/plain": {
    -      "examples": {
    -        "user" : {
    -            "summary": "User example in Plain text",
    -            "externalValue": "http://foo.bar/examples/user-example.txt"
    +    "text/plain": {
    +      "examples": {
    +        "user" : {
    +            "summary": "User example in Plain text",
    +            "externalValue": "http://foo.bar/examples/user-example.txt"
             }
           }
         },
    -    "*/*": {
    -      "examples": {
    -        "user" : {
    -            "summary": "User example in other format",
    -            "externalValue": "http://foo.bar/examples/user-example.whatever"
    +    "*/*": {
    +      "examples": {
    +        "user" : {
    +            "summary": "User example in other format",
    +            "externalValue": "http://foo.bar/examples/user-example.whatever"
             }
           }
         }
    @@ -1711,41 +1942,41 @@
     
    
     description: user to add to the system
     content:
    -  'application/json':
    +  'application/json':
         schema:
    -      $ref: '#/components/schemas/User'
    +      $ref: '#/components/schemas/User'
         examples:
           user:
             summary: User Example
    -        externalValue: 'http://foo.bar/examples/user-example.json'
    -  'application/xml':
    +        externalValue: 'http://foo.bar/examples/user-example.json'
    +  'application/xml':
         schema:
    -      $ref: '#/components/schemas/User'
    +      $ref: '#/components/schemas/User'
         examples:
           user:
             summary: User Example in XML
    -        externalValue: 'http://foo.bar/examples/user-example.xml'
    -  'text/plain':
    +        externalValue: 'http://foo.bar/examples/user-example.xml'
    +  'text/plain':
         examples:
           user:
             summary: User example in text plain format
    -        externalValue: 'http://foo.bar/examples/user-example.txt'
    -  '*/*':
    +        externalValue: 'http://foo.bar/examples/user-example.txt'
    +  '*/*':
         examples:
           user:
             summary: User example in other format
    -        externalValue: 'http://foo.bar/examples/user-example.whatever'
    +        externalValue: 'http://foo.bar/examples/user-example.whatever'
     

    A body parameter that is an array of string values:

    
     {
    -  "description": "user to add to the system",
    -  "content": {
    -    "text/plain": {
    -      "schema": {
    -        "type": "array",
    -        "items": {
    -          "type": "string"
    +  "description": "user to add to the system",
    +  "content": {
    +    "text/plain": {
    +      "schema": {
    +        "type": "array",
    +        "items": {
    +          "type": "string"
             }
           }
         }
    @@ -1762,9 +1993,9 @@
           items:
             type: string
     
    -

    Media Type Object

    +

    4.7.14 Media Type Object

    Each Media Type Object provides schema and examples for the media type identified by its key.

    -

    Fixed Fields

    +
    4.7.14.1 Fixed Fields
    @@ -1775,58 +2006,58 @@ - + - + - + - + - + - + - +
    schemaschema Schema Object | Reference Object The schema defining the content of the request, response, or parameter.
    exampleexample AnyExample of the media type. The example object SHOULD be in the correct format as specified by the media type. The example field is mutually exclusive of the examples field. Furthermore, if referencing a schema which contains an example, the example value SHALL override the example provided by the schema.Example of the media type. The example object SHOULD be in the correct format as specified by the media type. The example field is mutually exclusive of the examples field. Furthermore, if referencing a schema which contains an example, the example value SHALL override the example provided by the schema.
    examplesexamples Map[ string, Example Object | Reference Object]Examples of the media type. Each example object SHOULD match the media type and specified schema if present. The examples field is mutually exclusive of the example field. Furthermore, if referencing a schema which contains an example, the examples value SHALL override the example provided by the schema.Examples of the media type. Each example object SHOULD match the media type and specified schema if present. The examples field is mutually exclusive of the example field. Furthermore, if referencing a schema which contains an example, the examples value SHALL override the example provided by the schema.
    encodingencoding Map[string, Encoding Object]A map between a property name and its encoding information. The key, being the property name, MUST exist in the schema as a property. The encoding object SHALL only apply to requestBody objects when the media type is multipart or application/x-www-form-urlencoded.A map between a property name and its encoding information. The key, being the property name, MUST exist in the schema as a property. The encoding object SHALL only apply to requestBody objects when the media type is multipart or application/x-www-form-urlencoded.
    -

    This object MAY be extended with Specification Extensions.

    -

    Media Type Examples

    +

    This object MAY be extended with Specification Extensions.

    +
    4.7.14.2 Media Type Examples
    
     {
    -  "application/json": {
    -    "schema": {
    -         "$ref": "#/components/schemas/Pet"
    +  "application/json": {
    +    "schema": {
    +         "$ref": "#/components/schemas/Pet"
         },
    -    "examples": {
    -      "cat" : {
    -        "summary": "An example of a cat",
    -        "value":
    +    "examples": {
    +      "cat" : {
    +        "summary": "An example of a cat",
    +        "value":
               {
    -            "name": "Fluffy",
    -            "petType": "Cat",
    -            "color": "White",
    -            "gender": "male",
    -            "breed": "Persian"
    +            "name": "Fluffy",
    +            "petType": "Cat",
    +            "color": "White",
    +            "gender": "male",
    +            "breed": "Persian"
               }
           },
    -      "dog": {
    -        "summary": "An example of a dog with a cat's name",
    -        "value" :  {
    -          "name": "Puma",
    -          "petType": "Dog",
    -          "color": "Black",
    -          "gender": "Female",
    -          "breed": "Mixed"
    +      "dog": {
    +        "summary": "An example of a dog with a cat's name",
    +        "value" :  {
    +          "name": "Puma",
    +          "petType": "Dog",
    +          "color": "Black",
    +          "gender": "Female",
    +          "breed": "Mixed"
             },
    -      "frog": {
    -          "$ref": "#/components/examples/frog-example"
    +      "frog": {
    +          "$ref": "#/components/examples/frog-example"
             }
           }
         }
    @@ -1836,7 +2067,7 @@
     
    
     application/json:
       schema:
    -    $ref: "#/components/schemas/Pet"
    +    $ref: "#/components/schemas/Pet"
       examples:
         cat:
           summary: An example of a cat
    @@ -1847,7 +2078,7 @@
             gender: male
             breed: Persian
         dog:
    -      summary: An example of a dog with a cat's name
    +      summary: An example of a dog with a cat's name
           value:
             name: Puma
             petType: Dog
    @@ -1855,9 +2086,9 @@
             gender: Female
             breed: Mixed
         frog:
    -      $ref: "#/components/examples/frog-example"
    +      $ref: "#/components/examples/frog-example"
     
    -

    Considerations for File Uploads

    +
    4.7.14.3 Considerations for File Uploads

    In contrast with the 2.0 specification, file input/output content in OpenAPI is described with the same semantics as any other schema type. Specifically:

    
     # content transferred with base64 encoding
    @@ -1883,29 +2114,29 @@
             type: string
             format: binary
     
    -

    In addition, specific media types MAY be specified:

    +

    In addition, specific media types MAY be specified:

    
     # multiple, specific media types may be specified:
     requestBody:
       content:
           # a binary file of type png or jpeg
    -    'image/jpeg':
    +    'image/jpeg':
           schema:
             type: string
             format: binary
    -    'image/png':
    +    'image/png':
           schema:
             type: string
             format: binary       
     
    -

    To upload multiple files, a multipart media type MUST be used:

    +

    To upload multiple files, a multipart media type MUST be used:

    
     requestBody:
       content:
         multipart/form-data:
           schema:
             properties:
    -          # The property name 'file' will be used for all files.
    +          # The property name 'file' will be used for all files.
               file:
                 type: array
                 items:
    @@ -1913,8 +2144,8 @@
                   format: binary
     
     
    -

    Support for x-www-form-urlencoded Request Bodies

    -

    To submit content using form url encoding via [[!RFC1866]], the following +

    4.7.14.4 Support for x-www-form-urlencoded Request Bodies
    +

    To submit content using form url encoding via [RFC1866], the following definition may be used:

    
     requestBody:
    @@ -1931,11 +2162,11 @@
                 type: object
                 properties: {}
     
    -

    In this example, the contents in the requestBody MUST be stringified per [[!RFC1866]] when passed to the server. In addition, the address field complex object will be stringified.

    +

    In this example, the contents in the requestBody MUST be stringified per [RFC1866] when passed to the server. In addition, the address field complex object will be stringified.

    When passing complex objects in the application/x-www-form-urlencoded content type, the default serialization strategy of such properties is described in the Encoding Object’s style property as form.

    -

    Special Considerations for multipart Content

    -

    It is common to use multipart/form-data as a Content-Type when transferring request bodies to operations. In contrast to 2.0, a schema is REQUIRED to define the input parameters to the operation when using multipart content. This supports complex structures as well as supporting mechanisms for multiple file uploads.

    -

    When passing in multipart types, boundaries MAY be used to separate sections of the content being transferred — thus, the following default Content-Types are defined for multipart:

    +
    4.7.14.5 Special Considerations for multipart Content
    +

    It is common to use multipart/form-data as a Content-Type when transferring request bodies to operations. In contrast to 2.0, a schema is REQUIRED to define the input parameters to the operation when using multipart content. This supports complex structures as well as supporting mechanisms for multiple file uploads.

    +

    When passing in multipart types, boundaries MAY be used to separate sections of the content being transferred — thus, the following default Content-Types are defined for multipart:

    • If the property is a primitive, or an array of primitive values, the default Content-Type is text/plain
    • If the property is complex, or an array of complex values, the default Content-Type is application/json
    • @@ -1969,12 +2200,12 @@ # default Content-Type for arrays is based on the `inner` type (object shown, so `application/json` in this example) type: array items: - type: '#/components/schemas/Address' + type: '#/components/schemas/Address'

      An encoding attribute is introduced to give you control over the serialization of parts of multipart request bodies. This attribute is only applicable to multipart and application/x-www-form-urlencoded request bodies.

      -

    Encoding Object

    +

    4.7.15 Encoding Object

    A single encoding definition applied to a single schema property.

    -

    Fixed Fields

    +
    4.7.15.1 Fixed Fields
    @@ -1985,34 +2216,34 @@ - + - + - + - + - + - + - + - + - +
    contentTypecontentType string The Content-Type for encoding a specific property. Default value depends on the property type: for string with format being binaryapplication/octet-stream; for other primitive types – text/plain; for object - application/json; for array – the default is defined based on the inner type. The value can be a specific media type (e.g. application/json), a wildcard media type (e.g. image/*), or a comma-separated list of the two types.
    headersheaders Map[string, Header Object | Reference Object]A map allowing additional information to be provided as headers, for example Content-Disposition. Content-Type is described separately and SHALL be ignored in this section. This property SHALL be ignored if the request body media type is not a multipart.A map allowing additional information to be provided as headers, for example Content-Disposition. Content-Type is described separately and SHALL be ignored in this section. This property SHALL be ignored if the request body media type is not a multipart.
    stylestyle stringDescribes how a specific property value will be serialized depending on its type. See Parameter Object for details on the style property. The behavior follows the same values as query parameters, including default values. This property SHALL be ignored if the request body media type is not application/x-www-form-urlencoded.Describes how a specific property value will be serialized depending on its type. See Parameter Object for details on the style property. The behavior follows the same values as query parameters, including default values. This property SHALL be ignored if the request body media type is not application/x-www-form-urlencoded.
    explodeexplode booleanWhen this is true, property values of type array or object generate separate parameters for each value of the array, or key-value-pair of the map. For other types of properties this property has no effect. When style is form, the default value is true. For all other styles, the default value is false. This property SHALL be ignored if the request body media type is not application/x-www-form-urlencoded.When this is true, property values of type array or object generate separate parameters for each value of the array, or key-value-pair of the map. For other types of properties this property has no effect. When style is form, the default value is true. For all other styles, the default value is false. This property SHALL be ignored if the request body media type is not application/x-www-form-urlencoded.
    allowReservedallowReserved booleanDetermines whether the parameter value SHOULD allow reserved characters, as defined by [[!RFC3986]] :/?#[]@!$&'()*+,;= to be included without percent-encoding. The default value is false. This property SHALL be ignored if the request body media type is not application/x-www-form-urlencoded.Determines whether the parameter value SHOULD allow reserved characters, as defined by [RFC3986] :/?#[]@!$&'()*+,;= to be included without percent-encoding. The default value is false. This property SHALL be ignored if the request body media type is not application/x-www-form-urlencoded.
    -

    This object MAY be extended with Specification Extensions.

    -

    Encoding Object Example

    +

    This object MAY be extended with Specification Extensions.

    +
    4.7.15.2 Encoding Object Example
    
     requestBody:
       content:
    @@ -2050,16 +2281,16 @@
                   schema:
                     type: integer
     
    -

    Responses Object

    +

    4.7.16 Responses Object

    A container for the expected responses of an operation. The container maps a HTTP response code to the expected response.

    The documentation is not necessarily expected to cover all possible HTTP response codes because they may not be known in advance. However, documentation is expected to cover a successful operation response and any known errors.

    -

    The default MAY be used as a default response object for all HTTP codes +

    The default MAY be used as a default response object for all HTTP codes that are not covered individually by the specification.

    -

    The Responses Object MUST contain at least one response code, and it -SHOULD be the response for a successful operation call.

    -

    Fixed Fields

    +

    The Responses Object MUST contain at least one response code, and it +SHOULD be the response for a successful operation call.

    +
    4.7.16.1 Fixed Fields
    @@ -2070,13 +2301,13 @@ - +
    defaultdefault Response Object | Reference Object The documentation of responses other than the ones declared for specific HTTP response codes. Use this field to cover undeclared responses. A Reference Object can link to a response that the OpenAPI Object’s components/responses section defines.
    -

    Patterned Fields

    +
    4.7.16.2 Patterned Fields
    @@ -2087,33 +2318,33 @@ - + - +
    HTTP Status CodeHTTP Status Code Response Object | Reference ObjectAny HTTP status code can be used as the property name, but only one property per code, to describe the expected response for that HTTP status code. A Reference Object can link to a response that is defined in the OpenAPI Object’s components/responses section. This field MUST be enclosed in quotation marks (for example, “200”) for compatibility between JSON and YAML. To define a range of response codes, this field MAY contain the uppercase wildcard character X. For example, 2XX represents all response codes between [200-299]. Only the following range definitions are allowed: 1XX, 2XX, 3XX, 4XX, and 5XX. If a response is defined using an explicit code, the explicit code definition takes precedence over the range definition for that code.Any HTTP status code can be used as the property name, but only one property per code, to describe the expected response for that HTTP status code. A Reference Object can link to a response that is defined in the OpenAPI Object’s components/responses section. This field MUST be enclosed in quotation marks (for example, “200”) for compatibility between JSON and YAML. To define a range of response codes, this field MAY contain the uppercase wildcard character X. For example, 2XX represents all response codes between [200-299]. Only the following range definitions are allowed: 1XX, 2XX, 3XX, 4XX, and 5XX. If a response is defined using an explicit code, the explicit code definition takes precedence over the range definition for that code.
    -

    This object MAY be extended with Specification Extensions.

    -

    Responses Object Example

    +

    This object MAY be extended with Specification Extensions.

    +
    4.7.16.3 Responses Object Example

    A 200 response for a successful operation and a default response for others (implying an error):

    
     {
    -  "200": {
    -    "description": "a pet to be returned",
    -    "content": {
    -      "application/json": {
    -        "schema": {
    -          "$ref": "#/components/schemas/Pet"
    +  "200": {
    +    "description": "a pet to be returned",
    +    "content": {
    +      "application/json": {
    +        "schema": {
    +          "$ref": "#/components/schemas/Pet"
             }
           }
         }
       },
    -  "default": {
    -    "description": "Unexpected error",
    -    "content": {
    -      "application/json": {
    -        "schema": {
    -          "$ref": "#/components/schemas/ErrorModel"
    +  "default": {
    +    "description": "Unexpected error",
    +    "content": {
    +      "application/json": {
    +        "schema": {
    +          "$ref": "#/components/schemas/ErrorModel"
             }
           }
         }
    @@ -2121,23 +2352,23 @@
     }
     
    
    -'200':
    +'200':
       description: a pet to be returned
       content:
         application/json:
           schema:
    -        $ref: '#/components/schemas/Pet'
    +        $ref: '#/components/schemas/Pet'
     default:
       description: Unexpected error
       content:
         application/json:
           schema:
    -        $ref: '#/components/schemas/ErrorModel'
    +        $ref: '#/components/schemas/ErrorModel'
     
    -

    Response Object

    +

    4.7.17 Response Object

    Describes a single response from an API Operation, including design-time, static links to operations based on the response.

    -

    Fixed Fields

    +
    4.7.17.1 Fixed Fields
    @@ -2148,39 +2379,39 @@ - + - + - + - + - + - +
    descriptiondescription stringREQUIRED. A short description of the response. CommonMark syntax MAY be used for rich text representation.REQUIRED. A short description of the response. CommonMark syntax MAY be used for rich text representation.
    headersheaders Map[string, Header Object | Reference Object]Maps a header name to its definition. [[!RFC7230]] states header names are case insensitive. If a response header is defined with the name "Content-Type", it SHALL be ignored.Maps a header name to its definition. [RFC7230] states header names are case insensitive. If a response header is defined with the name "Content-Type", it SHALL be ignored.
    contentcontent Map[string, Media Type Object] A map containing descriptions of potential response payloads. The key is a media type or media type range and the value describes it. For responses that match multiple keys, only the most specific key is applicable. e.g. text/plain overrides text/*
    linkslinks Map[string, Link Object | Reference Object] A map of operations links that can be followed from the response. The key of the map is a short name for the link, following the naming constraints of the names for Component Objects.
    -

    This object MAY be extended with Specification Extensions.

    -

    Response Object Examples

    +

    This object MAY be extended with Specification Extensions.

    +
    4.7.17.2 Response Object Examples

    Response of an array of a complex type:

    
     {
    -  "description": "A complex object array response",
    -  "content": {
    -    "application/json": {
    -      "schema": {
    -        "type": "array",
    -        "items": {
    -          "$ref": "#/components/schemas/VeryComplexType"
    +  "description": "A complex object array response",
    +  "content": {
    +    "application/json": {
    +      "schema": {
    +        "type": "array",
    +        "items": {
    +          "$ref": "#/components/schemas/VeryComplexType"
             }
           }
         }
    @@ -2194,16 +2425,16 @@
         schema:
           type: array
           items:
    -        $ref: '#/components/schemas/VeryComplexType'
    +        $ref: '#/components/schemas/VeryComplexType'
     

    Response with a string type:

    
     {
    -  "description": "A simple string response",
    -  "content": {
    -    "text/plain": {
    -      "schema": {
    -        "type": "string"
    +  "description": "A simple string response",
    +  "content": {
    +    "text/plain": {
    +      "schema": {
    +        "type": "string"
           }
         }
       }
    @@ -2220,31 +2451,31 @@
     

    Plain text response with headers:

    
     {
    -  "description": "A simple string response",
    -  "content": {
    -    "text/plain": {
    -      "schema": {
    -        "type": "string"
    +  "description": "A simple string response",
    +  "content": {
    +    "text/plain": {
    +      "schema": {
    +        "type": "string"
           }
         }
       },
    -  "headers": {
    -    "X-Rate-Limit-Limit": {
    -      "description": "The number of allowed requests in the current period",
    -      "schema": {
    -        "type": "integer"
    +  "headers": {
    +    "X-Rate-Limit-Limit": {
    +      "description": "The number of allowed requests in the current period",
    +      "schema": {
    +        "type": "integer"
           }
         },
    -    "X-Rate-Limit-Remaining": {
    -      "description": "The number of remaining requests in the current period",
    -      "schema": {
    -        "type": "integer"
    +    "X-Rate-Limit-Remaining": {
    +      "description": "The number of remaining requests in the current period",
    +      "schema": {
    +        "type": "integer"
           }
         },
    -    "X-Rate-Limit-Reset": {
    -      "description": "The number of seconds left in the current period",
    -      "schema": {
    -        "type": "integer"
    +    "X-Rate-Limit-Reset": {
    +      "description": "The number of seconds left in the current period",
    +      "schema": {
    +        "type": "integer"
           }
         }
       }
    @@ -2256,7 +2487,7 @@
       text/plain:
         schema:
           type: string
    -    example: 'whoa!'
    +    example: 'whoa!'
     headers:
       X-Rate-Limit-Limit:
         description: The number of allowed requests in the current period
    @@ -2274,17 +2505,17 @@
     

    Response with no return value:

    
     {
    -  "description": "object created"
    +  "description": "object created"
     }
     
    
     description: object created
     
    -

    Callback Object

    +

    4.7.18 Callback Object

    A map of possible out-of band callbacks related to the parent operation. Each value in the map is a Path Item Object that describes a set of requests that may be initiated by the API provider and the expected responses. The key value used to identify the callback object is an expression, evaluated at runtime, that identifies a URL to use for the callback operation.

    -

    Patterned Fields

    +
    4.7.18.1 Patterned Fields
    @@ -2295,18 +2526,18 @@ - +
    {expression}{expression} Path Item Object A Path Item Object used to define a callback request and expected responses. A complete example is available.
    -

    This object MAY be extended with Specification Extensions.

    -

    Key Expression

    +

    This object MAY be extended with Specification Extensions.

    +
    4.7.18.2 Key Expression

    The key that identifies the Path Item Object is a runtime expression that can be evaluated in the context of a runtime HTTP request/response to identify the URL to be used for the callback request. A simple example might be $request.body#/url. However, using a runtime expression the complete HTTP message can be accessed. -This includes accessing any part of a body that a JSON Pointer [[!RFC6901]] can reference.

    +This includes accessing any part of a body that a JSON Pointer [RFC6901] can reference.

    For example, given the following HTTP request:

    
     POST /subscribe/myevent?queryUrl=http://clientdomain.com/stillrunning HTTP/1.1
    @@ -2315,11 +2546,11 @@
     Content-Length: 187
     
     {
    -  "failedUrl" : "http://clientdomain.com/failed",
    -  "successUrls" : [
    -    "http://clientdomain.com/fast",
    -    "http://clientdomain.com/medium",
    -    "http://clientdomain.com/slow"
    +  "failedUrl" : "http://clientdomain.com/failed",
    +  "successUrls" : [
    +    "http://clientdomain.com/fast",
    +    "http://clientdomain.com/medium",
    +    "http://clientdomain.com/slow"
       ]
     }
     
    @@ -2369,24 +2600,24 @@
     
     
     
    -

    Callback Object Example

    +
    4.7.18.3 Callback Object Example

    The following example shows a callback to the URL specified by the id and email property in the request body.

    
     myWebhook:
    -  'http://notificationServer.com?transactionId={$request.body#/id}&email={$request.body#/email}':
    +  'http://notificationServer.com?transactionId={$request.body#/id}&email={$request.body#/email}':
         post:
           requestBody:
             description: Callback payload
             content:
    -          'application/json':
    +          'application/json':
                 schema:
    -              $ref: '#/components/schemas/SomePayload'
    +              $ref: '#/components/schemas/SomePayload'
           responses:
    -        '200':
    +        '200':
               description: webhook successfully processed and no retries will be performed
     
    -

    Example Object

    -

    Fixed Fields

    +

    4.7.19 Example Object

    +
    4.7.19.1 Fixed Fields
    @@ -2397,32 +2628,32 @@ - + - + - + - + - +
    summarysummary string Short description for the example.
    descriptiondescription stringLong description for the example. CommonMark syntax MAY be used for rich text representation.Long description for the example. CommonMark syntax MAY be used for rich text representation.
    valuevalue Any Embedded literal example. The value field and externalValue field are mutually exclusive. To represent examples of media types that cannot naturally represented in JSON or YAML, use a string value to contain the example, escaping where necessary.
    externalValueexternalValue string A URL that points to the literal example. This provides the capability to reference examples that cannot easily be included in JSON or YAML documents. The value field and externalValue field are mutually exclusive.
    -

    This object MAY be extended with Specification Extensions.

    +

    This object MAY be extended with Specification Extensions.

    In all cases, the example value is expected to be compatible with the type schema -of its associated value. Tooling implementations MAY choose to +of its associated value. Tooling implementations MAY choose to validate compatibility automatically, and reject the example value(s) if incompatible.

    -

    Example Object Examples

    +
    4.7.19.2 Example Object Examples

    In a model:

    
     schemas:
    @@ -2437,58 +2668,58 @@
     
    
     requestBody:
       content:
    -    'application/json':
    +    'application/json':
           schema:
    -        $ref: '#/components/schemas/Address'
    +        $ref: '#/components/schemas/Address'
           examples:
             foo:
               summary: A foo example
    -          value: {"foo": "bar"}
    +          value: {"foo": "bar"}
             bar:
               summary: A bar example
    -          value: {"bar": "baz"}
    -    'application/xml':
    +          value: {"bar": "baz"}
    +    'application/xml':
           examples:
             xmlExample:
               summary: This is an example in XML
    -          externalValue: 'http://example.org/examples/address-example.xml'
    -    'text/plain':
    +          externalValue: 'http://example.org/examples/address-example.xml'
    +    'text/plain':
           examples:
             textExample:
               summary: This is a text example
    -          externalValue: 'http://foo.bar/examples/address-example.txt'
    +          externalValue: 'http://foo.bar/examples/address-example.txt'
     

    In a parameter:

    
     parameters:
    -  - name: 'zipCode'
    -    in: 'query'
    +  - name: 'zipCode'
    +    in: 'query'
         schema:
    -      type: 'string'
    -      format: 'zip-code'
    +      type: 'string'
    +      format: 'zip-code'
           examples:
             zip-example:
    -          $ref: '#/components/examples/zip-example'
    +          $ref: '#/components/examples/zip-example'
     

    In a response:

    
     responses:
    -  '200':
    +  '200':
         description: your car appointment has been booked
         content:
           application/json:
             schema:
    -          $ref: '#/components/schemas/SuccessResponse'
    +          $ref: '#/components/schemas/SuccessResponse'
             examples:
               confirmation-success:
    -            $ref: '#/components/examples/confirmation-success'
    +            $ref: '#/components/examples/confirmation-success'
     
    -

    Link Object

    +

    4.7.21 Header Object

    The Header Object follows the structure of the Parameter Object with the following changes:

      -
    1. name MUST NOT be specified, it is given in the corresponding headers map.
    2. -
    3. in MUST NOT be specified, it is implicitly in header.
    4. -
    5. All traits that are affected by the location MUST be applicable to a location of header (for example, style).
    6. +
    7. name MUST NOT be specified, it is given in the corresponding headers map.
    8. +
    9. in MUST NOT be specified, it is implicitly in header.
    10. +
    11. All traits that are affected by the location MUST be applicable to a location of header (for example, style).
    -

    Header Object Example

    +
    4.7.21.1 Header Object Example

    A simple header of type integer:

    
     {
    -  "description": "The number of allowed requests in the current period",
    -  "schema": {
    -    "type": "integer"
    +  "description": "The number of allowed requests in the current period",
    +  "schema": {
    +    "type": "integer"
       }
     }
     
    @@ -2706,10 +2937,10 @@ schema: type: integer
    -

    Tag Object

    +

    4.7.22 Tag Object

    Adds metadata to a single tag that is used by the Operation Object. It is not mandatory to have a Tag Object per tag defined in the Operation Object instances.

    -

    Fixed Fields

    +
    4.7.22.1 Fixed Fields
    @@ -2720,39 +2951,39 @@ - + - + - + - + - +
    namename stringREQUIRED. The name of the tag.REQUIRED. The name of the tag.
    descriptiondescription stringA short description for the tag. CommonMark syntax MAY be used for rich text representation.A short description for the tag. CommonMark syntax MAY be used for rich text representation.
    externalDocsexternalDocs External Documentation Object Additional external documentation for this tag.
    -

    This object MAY be extended with Specification Extensions.

    -

    Tag Object Example

    +

    This object MAY be extended with Specification Extensions.

    +
    4.7.22.2 Tag Object Example
    
     {
    -	"name": "pet",
    -	"description": "Pets operations"
    +	"name": "pet",
    +	"description": "Pets operations"
     }
     
    
     name: pet
     description: Pets operations
     
    -

    Reference Object

    +

    4.7.23 Reference Object

    A simple object to allow referencing other components in the specification, internally and externally.

    The Reference Object is defined by JSON Reference and follows the same structure, behavior and rules.

    For this specification, reference resolution is accomplished as defined by the JSON Reference specification and not by the JSON Schema specification.

    -

    Fixed Fields

    +
    4.7.23.1 Fixed Fields
    @@ -2763,47 +2994,47 @@ - + - +
    $ref$ref stringREQUIRED. The reference string.REQUIRED. The reference string.
    -

    This object cannot be extended with additional properties and any properties added SHALL be ignored.

    -

    Reference Object Example

    +

    This object cannot be extended with additional properties and any properties added SHALL be ignored.

    +
    4.7.23.2 Reference Object Example
    
     {
    -	"$ref": "#/components/schemas/Pet"
    +	"$ref": "#/components/schemas/Pet"
     }
     
    
    -$ref: '#/components/schemas/Pet'
    +$ref: '#/components/schemas/Pet'
     
    -

    Relative Schema Document Example

    +
    4.7.23.3 Relative Schema Document Example
    
     {
    -  "$ref": "Pet.json"
    +  "$ref": "Pet.json"
     }
     
    
     $ref: Pet.yaml
     
    -

    Relative Documents With Embedded Schema Example

    +
    4.7.23.4 Relative Documents With Embedded Schema Example
    
     {
    -  "$ref": "definitions.json#/Pet"
    +  "$ref": "definitions.json#/Pet"
     }
     
    
     $ref: definitions.yaml#/Pet
     
    -

    Schema Object

    +

    4.7.24 Schema Object

    The Schema Object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. This object is an extended subset of the JSON Schema Specification Wright Draft 00.

    For more information about the properties, see JSON Schema Core and JSON Schema Validation. Unless stated otherwise, the property definitions follow the JSON Schema.

    -

    Properties

    +
    4.7.24.1 Properties

    The following properties are taken directly from the JSON Schema definition and follow the same specifications:

    • title
    • @@ -2814,7 +3045,7 @@
    • exclusiveMinimum
    • maxLength
    • minLength
    • -
    • pattern (This string SHOULD be a valid regular expression, according to the ECMA 262 regular expression dialect)
    • +
    • pattern (This string SHOULD be a valid regular expression, according to the ECMA 262 regular expression dialect)
    • maxItems
    • minItems
    • uniqueItems
    • @@ -2825,22 +3056,22 @@

    The following properties are taken from the JSON Schema definition but their definitions were adjusted to the OpenAPI Specification.

      -
    • type - Value MUST be a string. Multiple types via an array are not supported.
    • -
    • allOf - Inline or referenced schema MUST be of a Schema Object and not a standard JSON Schema.
    • -
    • oneOf - Inline or referenced schema MUST be of a Schema Object and not a standard JSON Schema.
    • -
    • anyOf - Inline or referenced schema MUST be of a Schema Object and not a standard JSON Schema.
    • -
    • not - Inline or referenced schema MUST be of a Schema Object and not a standard JSON Schema.
    • -
    • items - Value MUST be an object and not an array. Inline or referenced schema MUST be of a Schema Object and not a standard JSON Schema. items MUST be present if the type is array.
    • -
    • properties - Property definitions MUST be a Schema Object and not a standard JSON Schema (inline or referenced).
    • -
    • additionalProperties - Value can be boolean or object. Inline or referenced schema MUST be of a Schema Object and not a standard JSON Schema. Consistent with JSON Schema, additionalProperties defaults to true.
    • -
    • description - CommonMark syntax MAY be used for rich text representation.
    • +
    • type - Value MUST be a string. Multiple types via an array are not supported.
    • +
    • allOf - Inline or referenced schema MUST be of a Schema Object and not a standard JSON Schema.
    • +
    • oneOf - Inline or referenced schema MUST be of a Schema Object and not a standard JSON Schema.
    • +
    • anyOf - Inline or referenced schema MUST be of a Schema Object and not a standard JSON Schema.
    • +
    • not - Inline or referenced schema MUST be of a Schema Object and not a standard JSON Schema.
    • +
    • items - Value MUST be an object and not an array. Inline or referenced schema MUST be of a Schema Object and not a standard JSON Schema. items MUST be present if the type is array.
    • +
    • properties - Property definitions MUST be a Schema Object and not a standard JSON Schema (inline or referenced).
    • +
    • additionalProperties - Value can be boolean or object. Inline or referenced schema MUST be of a Schema Object and not a standard JSON Schema. Consistent with JSON Schema, additionalProperties defaults to true.
    • +
    • description - CommonMark syntax MAY be used for rich text representation.
    • format - See Data Type Formats for further details. While relying on JSON Schema’s defined formats, the OAS offers a few additional predefined formats.
    • -
    • default - The default value represents what would be assumed by the consumer of the input as the value of the schema if one is not provided. Unlike JSON Schema, the value MUST conform to the defined type for the Schema Object defined at the same level. For example, if type is string, then default can be "foo" but cannot be 1.
    • +
    • default - The default value represents what would be assumed by the consumer of the input as the value of the schema if one is not provided. Unlike JSON Schema, the value MUST conform to the defined type for the Schema Object defined at the same level. For example, if type is string, then default can be "foo" but cannot be 1.

    Alternatively, any time a Schema Object can be used, a Reference Object can be used in its place. This allows referencing definitions instead of defining them inline.

    Additional properties defined by the JSON Schema specification that are not mentioned here are strictly unsupported.

    -

    Other than the JSON Schema subset fields, the following fields MAY be used for further schema documentation:

    -

    Fixed Fields

    +

    Other than the JSON Schema subset fields, the following fields MAY be used for further schema documentation:

    +
    4.7.24.2 Fixed Fields
    @@ -2851,94 +3082,94 @@ - + - + - + - + - + - + - + - + - + - + - + - +
    nullablenullable boolean Allows sending a null value for the defined schema. Default value is false.
    discriminatordiscriminator Discriminator Object Adds support for polymorphism. The discriminator is an object name that is used to differentiate between other schemas which may satisfy the payload description. See Composition and Inheritance for more details.
    readOnlyreadOnly booleanRelevant only for Schema "properties" definitions. Declares the property as “read only”. This means that it MAY be sent as part of a response but SHOULD NOT be sent as part of the request. If the property is marked as readOnly being true and is in the required list, the required will take effect on the response only. A property MUST NOT be marked as both readOnly and writeOnly being true. Default value is false.Relevant only for Schema "properties" definitions. Declares the property as “read only”. This means that it MAY be sent as part of a response but SHOULD NOT be sent as part of the request. If the property is marked as readOnly being true and is in the required list, the required will take effect on the response only. A property MUST NOT be marked as both readOnly and writeOnly being true. Default value is false.
    writeOnlywriteOnly booleanRelevant only for Schema "properties" definitions. Declares the property as “write only”. Therefore, it MAY be sent as part of a request but SHOULD NOT be sent as part of the response. If the property is marked as writeOnly being true and is in the required list, the required will take effect on the request only. A property MUST NOT be marked as both readOnly and writeOnly being true. Default value is false.Relevant only for Schema "properties" definitions. Declares the property as “write only”. Therefore, it MAY be sent as part of a request but SHOULD NOT be sent as part of the response. If the property is marked as writeOnly being true and is in the required list, the required will take effect on the request only. A property MUST NOT be marked as both readOnly and writeOnly being true. Default value is false.
    xmlxml XML ObjectThis MAY be used only on properties schemas. It has no effect on root schemas. Adds additional metadata to describe the XML representation of this property.This MAY be used only on properties schemas. It has no effect on root schemas. Adds additional metadata to describe the XML representation of this property.
    externalDocsexternalDocs External Documentation Object Additional external documentation for this schema.
    exampleexample Any A free-form property to include an example of an instance for this schema. To represent examples that cannot be naturally represented in JSON or YAML, a string value can be used to contain the example with escaping where necessary.
    deprecated deprecated booleanSpecifies that a schema is deprecated and SHOULD be transitioned out of usage. Default value is false.Specifies that a schema is deprecated and SHOULD be transitioned out of usage. Default value is false.
    -

    This object MAY be extended with Specification Extensions.

    -
    Composition and Inheritance (Polymorphism)
    +

    This object MAY be extended with Specification Extensions.

    +
    4.7.24.2.1 Composition and Inheritance (Polymorphism)

    The OpenAPI Specification allows combining and extending model definitions using the allOf property of JSON Schema, in effect offering model composition. allOf takes an array of object definitions that are validated independently but together compose a single object.

    While composition offers model extensibility, it does not imply a hierarchy between the models. To support polymorphism, the OpenAPI Specification adds the discriminator field. When used, the discriminator will be the name of the property that decides which schema definition validates the structure of the model. -As such, the discriminator field MUST be a required field. +As such, the discriminator field MUST be a required field. There are two ways to define the value of a discriminator for an inheriting instance.

    • Use the schema name.
    • Override the schema name by overriding the property with a new value. If a new value exists, this takes precedence over the schema name. As such, inline schema definitions, which do not have a given id, cannot be used in polymorphism.
    -
    XML Modeling
    +
    4.7.24.2.2 XML Modeling

    The xml property allows extra definitions when translating the JSON definition to XML. The XML Object contains additional information about the available options.

    -

    Schema Object Examples

    -
    Primitive Sample
    +
    4.7.24.3 Schema Object Examples
    +
    4.7.24.3.1 Primitive Sample
    
     {
    -  "type": "string",
    -  "format": "email"
    +  "type": "string",
    +  "format": "email"
     }
     
    
     type: string
     format: email
     
    -
    Simple Model
    +
    4.7.24.3.2 Simple Model
    
     {
    -  "type": "object",
    -  "required": [
    -    "name"
    +  "type": "object",
    +  "required": [
    +    "name"
       ],
    -  "properties": {
    -    "name": {
    -      "type": "string"
    +  "properties": {
    +    "name": {
    +      "type": "string"
         },
    -    "address": {
    -      "$ref": "#/components/schemas/Address"
    +    "address": {
    +      "$ref": "#/components/schemas/Address"
         },
    -    "age": {
    -      "type": "integer",
    -      "format": "int32",
    -      "minimum": 0
    +    "age": {
    +      "type": "integer",
    +      "format": "int32",
    +      "minimum": 0
         }
       }
     }
    @@ -2951,19 +3182,19 @@
       name:
         type: string
       address:
    -    $ref: '#/components/schemas/Address'
    +    $ref: '#/components/schemas/Address'
       age:
         type: integer
         format: int32
         minimum: 0
     
    -
    Model with Map/Dictionary Properties
    +
    4.7.24.3.3 Model with Map/Dictionary Properties

    For a simple string to string mapping:

    
     {
    -  "type": "object",
    -  "additionalProperties": {
    -    "type": "string"
    +  "type": "object",
    +  "additionalProperties": {
    +    "type": "string"
       }
     }
     
    @@ -2975,36 +3206,36 @@

    For a string to model mapping:

    
     {
    -  "type": "object",
    -  "additionalProperties": {
    -    "$ref": "#/components/schemas/ComplexModel"
    +  "type": "object",
    +  "additionalProperties": {
    +    "$ref": "#/components/schemas/ComplexModel"
       }
     }
     
    
     type: object
     additionalProperties:
    -  $ref: '#/components/schemas/ComplexModel'
    +  $ref: '#/components/schemas/ComplexModel'
     
    -
    Model with Example
    +
    4.7.24.3.4 Model with Example
    
     {
    -  "type": "object",
    -  "properties": {
    -    "id": {
    -      "type": "integer",
    -      "format": "int64"
    +  "type": "object",
    +  "properties": {
    +    "id": {
    +      "type": "integer",
    +      "format": "int64"
         },
    -    "name": {
    -      "type": "string"
    +    "name": {
    +      "type": "string"
         }
       },
    -  "required": [
    -    "name"
    +  "required": [
    +    "name"
       ],
    -  "example": {
    -    "name": "Puma",
    -    "id": 1
    +  "example": {
    +    "name": "Puma",
    +    "id": 1
       }
     }
     
    @@ -3022,41 +3253,41 @@ name: Puma id: 1
    -
    Models with Composition
    +
    4.7.24.3.5 Models with Composition
    
     {
    -  "components": {
    -    "schemas": {
    -      "ErrorModel": {
    -        "type": "object",
    -        "required": [
    -          "message",
    -          "code"
    +  "components": {
    +    "schemas": {
    +      "ErrorModel": {
    +        "type": "object",
    +        "required": [
    +          "message",
    +          "code"
             ],
    -        "properties": {
    -          "message": {
    -            "type": "string"
    +        "properties": {
    +          "message": {
    +            "type": "string"
               },
    -          "code": {
    -            "type": "integer",
    -            "minimum": 100,
    -            "maximum": 600
    +          "code": {
    +            "type": "integer",
    +            "minimum": 100,
    +            "maximum": 600
               }
             }
           },
    -      "ExtendedErrorModel": {
    -        "allOf": [
    +      "ExtendedErrorModel": {
    +        "allOf": [
               {
    -            "$ref": "#/components/schemas/ErrorModel"
    +            "$ref": "#/components/schemas/ErrorModel"
               },
               {
    -            "type": "object",
    -            "required": [
    -              "rootCause"
    +            "type": "object",
    +            "required": [
    +              "rootCause"
                 ],
    -            "properties": {
    -              "rootCause": {
    -                "type": "string"
    +            "properties": {
    +              "rootCause": {
    +                "type": "string"
                   }
                 }
               }
    @@ -3083,7 +3314,7 @@
               maximum: 600
         ExtendedErrorModel:
           allOf:
    -      - $ref: '#/components/schemas/ErrorModel'
    +      - $ref: '#/components/schemas/ErrorModel'
           - type: object
             required:
             - rootCause
    @@ -3091,75 +3322,75 @@
               rootCause:
                 type: string
     
    -
    Models with Polymorphism Support
    +
    4.7.24.3.6 Models with Polymorphism Support
    
     {
    -  "components": {
    -    "schemas": {
    -      "Pet": {
    -        "type": "object",
    -        "discriminator": {
    -          "propertyName": "petType"
    +  "components": {
    +    "schemas": {
    +      "Pet": {
    +        "type": "object",
    +        "discriminator": {
    +          "propertyName": "petType"
             },
    -        "properties": {
    -          "name": {
    -            "type": "string"
    +        "properties": {
    +          "name": {
    +            "type": "string"
               },
    -          "petType": {
    -            "type": "string"
    +          "petType": {
    +            "type": "string"
               }
             },
    -        "required": [
    -          "name",
    -          "petType"
    +        "required": [
    +          "name",
    +          "petType"
             ]
           },
    -      "Cat": {
    -        "description": "A representation of a cat. Note that `Cat` will be used as the discriminator value.",
    -        "allOf": [
    +      "Cat": {
    +        "description": "A representation of a cat. Note that `Cat` will be used as the discriminator value.",
    +        "allOf": [
               {
    -            "$ref": "#/components/schemas/Pet"
    +            "$ref": "#/components/schemas/Pet"
               },
               {
    -            "type": "object",
    -            "properties": {
    -              "huntingSkill": {
    -                "type": "string",
    -                "description": "The measured skill for hunting",
    -                "default": "lazy",
    -                "enum": [
    -                  "clueless",
    -                  "lazy",
    -                  "adventurous",
    -                  "aggressive"
    +            "type": "object",
    +            "properties": {
    +              "huntingSkill": {
    +                "type": "string",
    +                "description": "The measured skill for hunting",
    +                "default": "lazy",
    +                "enum": [
    +                  "clueless",
    +                  "lazy",
    +                  "adventurous",
    +                  "aggressive"
                     ]
                   }
                 },
    -            "required": [
    -              "huntingSkill"
    +            "required": [
    +              "huntingSkill"
                 ]
               }
             ]
           },
    -      "Dog": {
    -        "description": "A representation of a dog. Note that `Dog` will be used as the discriminator value.",
    -        "allOf": [
    +      "Dog": {
    +        "description": "A representation of a dog. Note that `Dog` will be used as the discriminator value.",
    +        "allOf": [
               {
    -            "$ref": "#/components/schemas/Pet"
    +            "$ref": "#/components/schemas/Pet"
               },
               {
    -            "type": "object",
    -            "properties": {
    -              "packSize": {
    -                "type": "integer",
    -                "format": "int32",
    -                "description": "the size of the pack the dog is from",
    -                "default": 0,
    -                "minimum": 0
    +            "type": "object",
    +            "properties": {
    +              "packSize": {
    +                "type": "integer",
    +                "format": "int32",
    +                "description": "the size of the pack the dog is from",
    +                "default": 0,
    +                "minimum": 0
                   }
                 },
    -            "required": [
    -              "packSize"
    +            "required": [
    +              "packSize"
                 ]
               }
             ]
    @@ -3183,10 +3414,10 @@
           required:
           - name
           - petType
    -    Cat:  ## "Cat" will be used as the discriminator value
    +    Cat:  ## "Cat" will be used as the discriminator value
           description: A representation of a cat
           allOf:
    -      - $ref: '#/components/schemas/Pet'
    +      - $ref: '#/components/schemas/Pet'
           - type: object
             properties:
               huntingSkill:
    @@ -3199,10 +3430,10 @@
                 - aggressive
             required:
             - huntingSkill
    -    Dog:  ## "Dog" will be used as the discriminator value
    +    Dog:  ## "Dog" will be used as the discriminator value
           description: A representation of a dog
           allOf:
    -      - $ref: '#/components/schemas/Pet'
    +      - $ref: '#/components/schemas/Pet'
           - type: object
             properties:
               packSize:
    @@ -3214,10 +3445,10 @@
             required:
             - packSize
     
    -

    Discriminator Object

    +

    4.7.25 Discriminator Object

    When request bodies or response payloads may be one of a number of different schemas, a discriminator object can be used to aid in serialization, deserialization, and validation. The discriminator is a specific object in a schema which is used to inform the consumer of the specification of an alternative schema based on the value associated with it.

    When using the discriminator, inline schemas will not be considered.

    -

    Fixed Fields

    +
    4.7.25.1 Fixed Fields
    @@ -3228,61 +3459,61 @@ - + - + - +
    propertyNamepropertyName stringREQUIRED. The name of the property in the payload that will hold the discriminator value.REQUIRED. The name of the property in the payload that will hold the discriminator value.
    mapping mapping Map[string, string] An object to hold mappings between payload values and schema names or references.

    The discriminator object is legal only when using one of the composite keywords oneOf, anyOf, allOf.

    -

    In OAS 3.0, a response payload MAY be described to be exactly one of any number of types:

    +

    In OAS 3.0, a response payload MAY be described to be exactly one of any number of types:

    
     MyResponseType:
       oneOf:
    -  - $ref: '#/components/schemas/Cat'
    -  - $ref: '#/components/schemas/Dog'
    -  - $ref: '#/components/schemas/Lizard'
    +  - $ref: '#/components/schemas/Cat'
    +  - $ref: '#/components/schemas/Dog'
    +  - $ref: '#/components/schemas/Lizard'
     
    -

    which means the payload MUST, by validation, match exactly one of the schemas described by Cat, Dog, or Lizard. In this case, a discriminator MAY act as a “hint” to shortcut validation and selection of the matching schema which may be a costly operation, depending on the complexity of the schema. We can then describe exactly which field tells us which schema to use:

    +

    which means the payload MUST, by validation, match exactly one of the schemas described by Cat, Dog, or Lizard. In this case, a discriminator MAY act as a “hint” to shortcut validation and selection of the matching schema which may be a costly operation, depending on the complexity of the schema. We can then describe exactly which field tells us which schema to use:

    
     MyResponseType:
       oneOf:
    -  - $ref: '#/components/schemas/Cat'
    -  - $ref: '#/components/schemas/Dog'
    -  - $ref: '#/components/schemas/Lizard'
    +  - $ref: '#/components/schemas/Cat'
    +  - $ref: '#/components/schemas/Dog'
    +  - $ref: '#/components/schemas/Lizard'
       discriminator:
         propertyName: petType
     
    -

    The expectation now is that a property with name petType MUST be present in the response payload, and the value will correspond to the name of a schema defined in the OAS document. Thus the response payload:

    +

    The expectation now is that a property with name petType MUST be present in the response payload, and the value will correspond to the name of a schema defined in the OAS document. Thus the response payload:

    
     {
    -  "id": 12345,
    -  "petType": "Cat"
    +  "id": 12345,
    +  "petType": "Cat"
     }
     

    Will indicate that the Cat schema be used in conjunction with this payload.

    -

    In scenarios where the value of the discriminator field does not match the schema name or implicit mapping is not possible, an optional mapping definition MAY be used:

    +

    In scenarios where the value of the discriminator field does not match the schema name or implicit mapping is not possible, an optional mapping definition MAY be used:

    
     MyResponseType:
       oneOf:
    -  - $ref: '#/components/schemas/Cat'
    -  - $ref: '#/components/schemas/Dog'
    -  - $ref: '#/components/schemas/Lizard'
    -  - $ref: 'https://gigantic-server.com/schemas/Monster/schema.json'
    +  - $ref: '#/components/schemas/Cat'
    +  - $ref: '#/components/schemas/Dog'
    +  - $ref: '#/components/schemas/Lizard'
    +  - $ref: 'https://gigantic-server.com/schemas/Monster/schema.json'
       discriminator:
         propertyName: petType
         mapping:
    -      dog: '#/components/schemas/Dog'
    -      monster: 'https://gigantic-server.com/schemas/Monster/schema.json'
    +      dog: '#/components/schemas/Dog'
    +      monster: 'https://gigantic-server.com/schemas/Monster/schema.json'
     
    -

    Here the discriminator value of dog will map to the schema #/components/schemas/Dog, rather than the default (implicit) value of Dog. If the discriminator value does not match an implicit or explicit mapping, no schema can be determined and validation SHOULD fail. Mapping keys MUST be string values, but tooling MAY convert response values to strings for comparison.

    +

    Here the discriminator value of dog will map to the schema #/components/schemas/Dog, rather than the default (implicit) value of Dog. If the discriminator value does not match an implicit or explicit mapping, no schema can be determined and validation SHOULD fail. Mapping keys MUST be string values, but tooling MAY convert response values to strings for comparison.

    When used in conjunction with the anyOf construct, the use of the discriminator can avoid ambiguity where multiple schemas may satisfy a single payload.

    -

    In both the oneOf and anyOf use cases, all possible schemas MUST be listed explicitly. To avoid redundancy, the discriminator MAY be added to a parent schema definition, and all schemas comprising the parent schema in an allOf construct may be used as an alternate schema.

    +

    In both the oneOf and anyOf use cases, all possible schemas MUST be listed explicitly. To avoid redundancy, the discriminator MAY be added to a parent schema definition, and all schemas comprising the parent schema in an allOf construct may be used as an alternate schema.

    For example:

    
     components:
    @@ -3300,7 +3531,7 @@
               dog: Dog
         Cat:
           allOf:
    -      - $ref: '#/components/schemas/Pet'
    +      - $ref: '#/components/schemas/Pet'
           - type: object
             # all other properties specific to a `Cat`
             properties:
    @@ -3308,7 +3539,7 @@
                 type: string
         Dog:
           allOf:
    -      - $ref: '#/components/schemas/Pet'
    +      - $ref: '#/components/schemas/Pet'
           - type: object
             # all other properties specific to a `Dog`
             properties:
    @@ -3316,7 +3547,7 @@
                 type: string
         Lizard:
           allOf:
    -      - $ref: '#/components/schemas/Pet'
    +      - $ref: '#/components/schemas/Pet'
           - type: object
             # all other properties specific to a `Lizard`
             properties:
    @@ -3326,23 +3557,23 @@
     

    a payload like this:

    
     {
    -  "petType": "Cat",
    -  "name": "misty"
    +  "petType": "Cat",
    +  "name": "misty"
     }
     

    will indicate that the Cat schema be used. Likewise this schema:

    
     {
    -  "petType": "dog",
    -  "bark": "soft"
    +  "petType": "dog",
    +  "bark": "soft"
     }
     

    will map to Dog because of the definition in the mappings element.

    -

    XML Object

    +

    4.7.26 XML Object

    A metadata object that allows for more fine-tuned XML model definitions.

    -

    When using arrays, XML element names are not inferred (for singular/plural forms) and the name property SHOULD be used to add that information. +

    When using arrays, XML element names are not inferred (for singular/plural forms) and the name property SHOULD be used to add that information. See examples for expected behavior.

    -

    Fixed Fields

    +
    4.7.26.1 Fixed Fields
    @@ -3353,41 +3584,41 @@ - + - + - + - + - + - + - +
    namename string Replaces the name of the element/attribute used for the described schema property. When defined within items, it will affect the name of the individual XML elements within the list. When defined alongside type being array (outside the items), it will affect the wrapping element and only if wrapped is true. If wrapped is false, it will be ignored.
    namespacenamespace stringThe URI of the namespace definition. Value MUST be in the form of an absolute URI.The URI of the namespace definition. Value MUST be in the form of an absolute URI.
    prefixprefix string The prefix to be used for the name.
    attributeattribute boolean Declares whether the property definition translates to an attribute instead of an element. Default value is false.
    wrappedwrapped booleanMAY be used only for an array definition. Signifies whether the array is wrapped (for example, <books><book/><book/></books>) or unwrapped (<book/><book/>). Default value is false. The definition takes effect only when defined alongside type being array (outside the items).MAY be used only for an array definition. Signifies whether the array is wrapped (for example, <books><book/><book/></books>) or unwrapped (<book/><book/>). Default value is false. The definition takes effect only when defined alongside type being array (outside the items).
    -

    This object MAY be extended with Specification Extensions.

    -

    XML Object Examples

    +

    This object MAY be extended with Specification Extensions.

    +
    4.7.26.2 XML Object Examples

    The examples of the XML object definitions are included inside a property definition of a Schema Object with a sample of the XML representation of it.

    -
    No XML Element
    +
    4.7.26.2.1 No XML Element

    Basic string property:

    
     {
    -    "animals": {
    -        "type": "string"
    +    "animals": {
    +        "type": "string"
         }
     }
     
    @@ -3401,10 +3632,10 @@

    Basic string array property (wrapped is false by default):

    
     {
    -    "animals": {
    -        "type": "array",
    -        "items": {
    -            "type": "string"
    +    "animals": {
    +        "type": "array",
    +        "items": {
    +            "type": "string"
             }
         }
     }
    @@ -3420,13 +3651,13 @@
     <animals>...</animals>
     <animals>...</animals>
     
    -
    XML Name Replacement
    +
    4.7.26.2.2 XML Name Replacement
    
     {
    -  "animals": {
    -    "type": "string",
    -    "xml": {
    -      "name": "animal"
    +  "animals": {
    +    "type": "string",
    +    "xml": {
    +      "name": "animal"
         }
       }
     }
    @@ -3440,25 +3671,25 @@
     
    
     <animal>...</animal>
     
    -
    XML Attribute, Prefix and Namespace
    +
    4.7.26.2.3 XML Attribute, Prefix and Namespace

    In this example, a full model definition is shown.

    
     {
    -  "Person": {
    -    "type": "object",
    -    "properties": {
    -      "id": {
    -        "type": "integer",
    -        "format": "int32",
    -        "xml": {
    -          "attribute": true
    +  "Person": {
    +    "type": "object",
    +    "properties": {
    +      "id": {
    +        "type": "integer",
    +        "format": "int32",
    +        "xml": {
    +          "attribute": true
             }
           },
    -      "name": {
    -        "type": "string",
    -        "xml": {
    -          "namespace": "http://example.com/schema/sample",
    -          "prefix": "sample"
    +      "name": {
    +        "type": "string",
    +        "xml": {
    +          "namespace": "http://example.com/schema/sample",
    +          "prefix": "sample"
             }
           }
         }
    @@ -3481,20 +3712,20 @@
             prefix: sample
     
    
    -<Person id="123">
    -    <sample:name xmlns:sample="http://example.com/schema/sample">example</sample:name>
    +<Person id="123">
    +    <sample:name xmlns:sample="http://example.com/schema/sample">example</sample:name>
     </Person>
     
    -
    XML Arrays
    +
    4.7.26.2.4 XML Arrays

    Changing the element names:

    
     {
    -  "animals": {
    -    "type": "array",
    -    "items": {
    -      "type": "string",
    -      "xml": {
    -        "name": "animal"
    +  "animals": {
    +    "type": "array",
    +    "items": {
    +      "type": "string",
    +      "xml": {
    +        "name": "animal"
           }
         }
       }
    @@ -3515,16 +3746,16 @@
     

    The external name property has no effect on the XML:

    
     {
    -  "animals": {
    -    "type": "array",
    -    "items": {
    -      "type": "string",
    -      "xml": {
    -        "name": "animal"
    +  "animals": {
    +    "type": "array",
    +    "items": {
    +      "type": "string",
    +      "xml": {
    +        "name": "animal"
           }
         },
    -    "xml": {
    -      "name": "aliens"
    +    "xml": {
    +      "name": "aliens"
         }
       }
     }
    @@ -3546,13 +3777,13 @@
     

    Even when the array is wrapped, if a name is not explicitly defined, the same name will be used both internally and externally:

    
     {
    -  "animals": {
    -    "type": "array",
    -    "items": {
    -      "type": "string"
    +  "animals": {
    +    "type": "array",
    +    "items": {
    +      "type": "string"
         },
    -    "xml": {
    -      "wrapped": true
    +    "xml": {
    +      "wrapped": true
         }
       }
     }
    @@ -3574,16 +3805,16 @@
     

    To overcome the naming problem in the example above, the following definition can be used:

    
     {
    -  "animals": {
    -    "type": "array",
    -    "items": {
    -      "type": "string",
    -      "xml": {
    -        "name": "animal"
    +  "animals": {
    +    "type": "array",
    +    "items": {
    +      "type": "string",
    +      "xml": {
    +        "name": "animal"
           }
         },
    -    "xml": {
    -      "wrapped": true
    +    "xml": {
    +      "wrapped": true
         }
       }
     }
    @@ -3607,17 +3838,17 @@
     

    Affecting both internal and external names:

    
     {
    -  "animals": {
    -    "type": "array",
    -    "items": {
    -      "type": "string",
    -      "xml": {
    -        "name": "animal"
    +  "animals": {
    +    "type": "array",
    +    "items": {
    +      "type": "string",
    +      "xml": {
    +        "name": "animal"
           }
         },
    -    "xml": {
    -      "name": "aliens",
    -      "wrapped": true
    +    "xml": {
    +      "name": "aliens",
    +      "wrapped": true
         }
       }
     }
    @@ -3642,14 +3873,14 @@
     

    If we change the external element but not the internal ones:

    
     {
    -  "animals": {
    -    "type": "array",
    -    "items": {
    -      "type": "string"
    +  "animals": {
    +    "type": "array",
    +    "items": {
    +      "type": "string"
         },
    -    "xml": {
    -      "name": "aliens",
    -      "wrapped": true
    +    "xml": {
    +      "name": "aliens",
    +      "wrapped": true
         }
       }
     }
    @@ -3669,10 +3900,10 @@
       <aliens>value</aliens>
     </aliens>
     
    -

    Security Scheme Object

    +

    4.7.27 Security Scheme Object

    Defines a security scheme that can be used by the operations. -Supported schemes are HTTP authentication, an API key (either as a header, a cookie parameter or as a query parameter), OAuth2’s common flows (implicit, password, application and access code) as defined in [[!RFC6749]], and OpenID Connect Discovery.

    -

    Fixed Fields

    +Supported schemes are HTTP authentication, an API key (either as a header, a cookie parameter or as a query parameter), OAuth2’s common flows (implicit, password, application and access code) as defined in [RFC6749], and OpenID Connect Discovery.

    +
    4.7.27.1 Fixed Fields
    @@ -3684,74 +3915,74 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
    typetype string AnyREQUIRED. The type of the security scheme. Valid values are "apiKey", "http", "oauth2", "openIdConnect".REQUIRED. The type of the security scheme. Valid values are "apiKey", "http", "oauth2", "openIdConnect".
    descriptiondescription string AnyA short description for security scheme. CommonMark syntax MAY be used for rich text representation.A short description for security scheme. CommonMark syntax MAY be used for rich text representation.
    namename string apiKeyREQUIRED. The name of the header, query or cookie parameter to be used.REQUIRED. The name of the header, query or cookie parameter to be used.
    inin string apiKeyREQUIRED. The location of the API key. Valid values are "query", "header" or "cookie".REQUIRED. The location of the API key. Valid values are "query", "header" or "cookie".
    schemescheme string httpREQUIRED. The name of the HTTP Authorization scheme to be used in the Authorization header as defined in [[!RFC7235]].REQUIRED. The name of the HTTP Authorization scheme to be used in the Authorization header as defined in [RFC7235].
    bearerFormatbearerFormat stringhttp ("bearer")http ("bearer") A hint to the client to identify how the bearer token is formatted. Bearer tokens are usually generated by an authorization server, so this information is primarily for documentation purposes.
    flowsflows OAuth Flows Object oauth2REQUIRED. An object containing configuration information for the flow types supported.REQUIRED. An object containing configuration information for the flow types supported.
    openIdConnectUrlopenIdConnectUrl string openIdConnectREQUIRED. OpenId Connect URL to discover OAuth2 configuration values. This MUST be in the form of a URL.REQUIRED. OpenId Connect URL to discover OAuth2 configuration values. This MUST be in the form of a URL.
    -

    This object MAY be extended with Specification Extensions.

    -

    Security Scheme Object Example

    -
    Basic Authentication Sample
    +

    This object MAY be extended with Specification Extensions.

    +
    4.7.27.2 Security Scheme Object Example
    +
    4.7.27.2.1 Basic Authentication Sample
    
     {
    -  "type": "http",
    -  "scheme": "basic"
    +  "type": "http",
    +  "scheme": "basic"
     }
     
    
     type: http
     scheme: basic
     
    -
    API Key Sample
    +
    4.7.27.2.2 API Key Sample
    
     {
    -  "type": "apiKey",
    -  "name": "api_key",
    -  "in": "header"
    +  "type": "apiKey",
    +  "name": "api_key",
    +  "in": "header"
     }
     
    
    @@ -3759,12 +3990,12 @@
     name: api_key
     in: header
     
    -
    JWT Bearer Sample
    +
    4.7.27.2.3 JWT Bearer Sample
    
     {
    -  "type": "http",
    -  "scheme": "bearer",
    -  "bearerFormat": "JWT",
    +  "type": "http",
    +  "scheme": "bearer",
    +  "bearerFormat": "JWT",
     }
     
    
    @@ -3772,16 +4003,16 @@
     scheme: bearer
     bearerFormat: JWT
     
    -
    Implicit OAuth2 Sample
    +
    4.7.27.2.4 Implicit OAuth2 Sample
    
     {
    -  "type": "oauth2",
    -  "flows": {
    -    "implicit": {
    -      "authorizationUrl": "https://example.com/api/oauth/dialog",
    -      "scopes": {
    -        "write:pets": "modify pets in your account",
    -        "read:pets": "read your pets"
    +  "type": "oauth2",
    +  "flows": {
    +    "implicit": {
    +      "authorizationUrl": "https://example.com/api/oauth/dialog",
    +      "scopes": {
    +        "write:pets": "modify pets in your account",
    +        "read:pets": "read your pets"
           }
         }
       }
    @@ -3796,9 +4027,9 @@
           write:pets: modify pets in your account
           read:pets: read your pets
     
    -

    OAuth Flows Object

    +

    4.7.28 OAuth Flows Object

    Allows configuration of the supported OAuth Flows.

    -

    Fixed Fields

    +
    4.7.28.1 Fixed Fields
    @@ -3809,31 +4040,31 @@ - + - + - + - +
    implicitimplicit OAuth Flow Object Configuration for the OAuth Implicit flow
    passwordpassword OAuth Flow Object Configuration for the OAuth Resource Owner Password flow
    clientCredentialsclientCredentials OAuth Flow Object Configuration for the OAuth Client Credentials flow. Previously called application in OpenAPI 2.0.
    authorizationCodeauthorizationCode OAuth Flow Object Configuration for the OAuth Authorization Code flow. Previously called accessCode in OpenAPI 2.0.
    -

    This object MAY be extended with Specification Extensions.

    -

    OAuth Flow Object

    +

    This object MAY be extended with Specification Extensions.

    +

    4.7.29 OAuth Flow Object

    Configuration details for a supported OAuth Flow

    -

    Fixed Fields

    +
    4.7.29.1 Fixed Fields
    @@ -3845,50 +4076,50 @@ - + - - + + - + - - + + - + - + - + - +
    authorizationUrlauthorizationUrl stringoauth2 ("implicit", "authorizationCode")REQUIRED. The authorization URL to be used for this flow. This MUST be in the form of a URL.oauth2 ("implicit", "authorizationCode")REQUIRED. The authorization URL to be used for this flow. This MUST be in the form of a URL.
    tokenUrltokenUrl stringoauth2 ("password", "clientCredentials", "authorizationCode")REQUIRED. The token URL to be used for this flow. This MUST be in the form of a URL.oauth2 ("password", "clientCredentials", "authorizationCode")REQUIRED. The token URL to be used for this flow. This MUST be in the form of a URL.
    refreshUrlrefreshUrl string oauth2The URL to be used for obtaining refresh tokens. This MUST be in the form of a URL.The URL to be used for obtaining refresh tokens. This MUST be in the form of a URL.
    scopesscopes Map[string, string] oauth2REQUIRED. The available scopes for the OAuth2 security scheme. A map between the scope name and a short description for it.REQUIRED. The available scopes for the OAuth2 security scheme. A map between the scope name and a short description for it.
    -

    This object MAY be extended with Specification Extensions.

    -

    OAuth Flow Object Examples

    +

    This object MAY be extended with Specification Extensions.

    +
    4.7.29.2 OAuth Flow Object Examples
    
     {
    -  "type": "oauth2",
    -  "flows": {
    -    "implicit": {
    -      "authorizationUrl": "https://example.com/api/oauth/dialog",
    -      "scopes": {
    -        "write:pets": "modify pets in your account",
    -        "read:pets": "read your pets"
    +  "type": "oauth2",
    +  "flows": {
    +    "implicit": {
    +      "authorizationUrl": "https://example.com/api/oauth/dialog",
    +      "scopes": {
    +        "write:pets": "modify pets in your account",
    +        "read:pets": "read your pets"
           }
         },
    -    "authorizationCode": {
    -      "authorizationUrl": "https://example.com/api/oauth/dialog",
    -      "tokenUrl": "https://example.com/api/oauth/token",
    -      "scopes": {
    -        "write:pets": "modify pets in your account",
    -        "read:pets": "read your pets"
    +    "authorizationCode": {
    +      "authorizationUrl": "https://example.com/api/oauth/dialog",
    +      "tokenUrl": "https://example.com/api/oauth/token",
    +      "scopes": {
    +        "write:pets": "modify pets in your account",
    +        "read:pets": "read your pets"
           }
         }
       }
    @@ -3909,13 +4140,13 @@
           write:pets: modify pets in your account
           read:pets: read your pets
     
    -

    Security Requirement Object

    +

    4.7.30 Security Requirement Object

    Lists the required security schemes to execute this operation. -The name used for each property MUST correspond to a security scheme declared in the Security Schemes under the Components Object.

    -

    Security Requirement Objects that contain multiple schemes require that all schemes MUST be satisfied for a request to be authorized. +The name used for each property MUST correspond to a security scheme declared in the Security Schemes under the Components Object.

    +

    Security Requirement Objects that contain multiple schemes require that all schemes MUST be satisfied for a request to be authorized. This enables support for scenarios where multiple query parameters or HTTP headers are required to convey security information.

    When a list of Security Requirement Objects is defined on the OpenAPI Object or Operation Object, only one of the Security Requirement Objects in the list needs to be satisfied to authorize the request.

    -

    Patterned Fields

    +
    4.7.30.1 Patterned Fields
    @@ -3926,28 +4157,28 @@ - + - +
    {name}{name} [string]Each name MUST correspond to a security scheme which is declared in the Security Schemes under the Components Object. If the security scheme is of type "oauth2" or "openIdConnect", then the value is a list of scope names required for the execution. For other security scheme types, the array MUST be empty.Each name MUST correspond to a security scheme which is declared in the Security Schemes under the Components Object. If the security scheme is of type "oauth2" or "openIdConnect", then the value is a list of scope names required for the execution. For other security scheme types, the array MUST be empty.
    -

    Security Requirement Object Examples

    -
    Non-OAuth2 Security Requirement
    +
    4.7.30.2 Security Requirement Object Examples
    +
    4.7.30.2.1 Non-OAuth2 Security Requirement
    
     {
    -  "api_key": []
    +  "api_key": []
     }
     
    
     api_key: []
     
    -
    OAuth2 Security Requirement
    +
    4.7.30.2.2 OAuth2 Security Requirement
    
     {
    -  "petstore_auth": [
    -    "write:pets",
    -    "read:pets"
    +  "petstore_auth": [
    +    "write:pets",
    +    "read:pets"
       ]
     }
     
    @@ -3956,9 +4187,9 @@ - write:pets - read:pets
    -

    Specification Extensions

    +

    4.8 Specification Extensions

    While the OpenAPI Specification tries to accommodate most use cases, additional data can be added to extend the specification at certain points.

    -

    The extensions properties are implemented as patterned fields that are always prefixed by "x-".

    +

    The extensions properties are implemented as patterned fields that are always prefixed by "x-".

    @@ -3969,23 +4200,23 @@ - + - +
    ^x-^x- AnyAllows extensions to the OpenAPI Schema. The field name MUST begin with x-, for example, x-internal-id. The value can be null, a primitive, an array or an object. Can have any valid JSON format value.Allows extensions to the OpenAPI Schema. The field name MUST begin with x-, for example, x-internal-id. The value can be null, a primitive, an array or an object. Can have any valid JSON format value.

    The extensions may or may not be supported by the available tooling, but those may be extended as well to add requested support (if tools are internal or open-sourced).

    -

    Security Filtering

    -

    Some objects in the OpenAPI Specification MAY be declared and remain empty, or be completely removed, even though they are inherently the core of the API documentation.

    +

    4.9 Security Filtering

    +

    Some objects in the OpenAPI Specification MAY be declared and remain empty, or be completely removed, even though they are inherently the core of the API documentation.

    The reasoning is to allow an additional layer of access control over the documentation. -While not part of the specification itself, certain libraries MAY choose to allow access to parts of the documentation based on some form of authentication/authorization.

    +While not part of the specification itself, certain libraries MAY choose to allow access to parts of the documentation based on some form of authentication/authorization.

    Two examples of this:

      -
    1. The Paths Object MAY be empty. It may be counterintuitive, but this may tell the viewer that they got to the right place, but can’t access any documentation. They’d still have access to the Info Object which may contain additional information regarding authentication.
    2. -
    3. The Path Item Object MAY be empty. In this case, the viewer will be aware that the path exists, but will not be able to see any of its operations or parameters. This is different than hiding the path itself from the Paths Object, so the user will not be aware of its existence. This allows the documentation provider to finely control what the viewer can see.
    4. +
    5. The Paths Object MAY be empty. It may be counterintuitive, but this may tell the viewer that they got to the right place, but can’t access any documentation. They’d still have access to the Info Object which may contain additional information regarding authentication.
    6. +
    7. The Path Item Object MAY be empty. In this case, the viewer will be aware that the path exists, but will not be able to see any of its operations or parameters. This is different than hiding the path itself from the Paths Object, so the user will not be aware of its existence. This allows the documentation provider to finely control what the viewer can see.
    -

    Appendix A: Revision History

    +

    A. Appendix A: Revision History

    @@ -4053,3 +4284,303 @@
    +

    B. References

    B.1 Normative references

    + +
    [RFC1866]
    + Hypertext Markup Language - 2.0. T. Berners-Lee; D. Connolly. IETF. November 1995. Historic. URL: https://www.rfc-editor.org/rfc/rfc1866 +
    [RFC2119]
    + Key words for use in RFCs to Indicate Requirement Levels. S. Bradner. IETF. March 1997. Best Current Practice. URL: https://www.rfc-editor.org/rfc/rfc2119 +
    [RFC3986]
    + Uniform Resource Identifier (URI): Generic Syntax. T. Berners-Lee; R. Fielding; L. Masinter. IETF. January 2005. Internet Standard. URL: https://www.rfc-editor.org/rfc/rfc3986 +
    [RFC6570]
    + URI Template. J. Gregorio; R. Fielding; M. Hadley; M. Nottingham; D. Orchard. IETF. March 2012. Proposed Standard. URL: https://www.rfc-editor.org/rfc/rfc6570 +
    [RFC6749]
    + The OAuth 2.0 Authorization Framework. D. Hardt, Ed.. IETF. October 2012. Proposed Standard. URL: https://www.rfc-editor.org/rfc/rfc6749 +
    [RFC6838]
    + Media Type Specifications and Registration Procedures. N. Freed; J. Klensin; T. Hansen. IETF. January 2013. Best Current Practice. URL: https://www.rfc-editor.org/rfc/rfc6838 +
    [RFC6901]
    + JavaScript Object Notation (JSON) Pointer. P. Bryan, Ed.; K. Zyp; M. Nottingham, Ed.. IETF. April 2013. Proposed Standard. URL: https://www.rfc-editor.org/rfc/rfc6901 +
    [RFC7230]
    + Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing. R. Fielding, Ed.; J. Reschke, Ed.. IETF. June 2014. Proposed Standard. URL: https://httpwg.org/specs/rfc7230.html +
    [RFC7231]
    + Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content. R. Fielding, Ed.; J. Reschke, Ed.. IETF. June 2014. Proposed Standard. URL: https://httpwg.org/specs/rfc7231.html +
    [RFC7235]
    + Hypertext Transfer Protocol (HTTP/1.1): Authentication. R. Fielding, Ed.; J. Reschke, Ed.. IETF. June 2014. Proposed Standard. URL: https://httpwg.org/specs/rfc7235.html +
    [RFC8174]
    + Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words. B. Leiba. IETF. May 2017. Best Current Practice. URL: https://www.rfc-editor.org/rfc/rfc8174 +
    +
    \ No newline at end of file diff --git a/oas/v3.0.3.html b/oas/v3.0.3.html index 9120ca4656..4c7f42246d 100644 --- a/oas/v3.0.3.html +++ b/oas/v3.0.3.html @@ -1,31 +1,262 @@ -OpenAPI Specification v3.0.3 | Introduction, Definitions, & More - + + + + + +OpenAPI Specification v3.0.3 + + + + + + + + -

    OpenAPI Specification v3.0.3

    What is the OpenAPI Specification?

    The OpenAPI Specification (OAS) defines a standard, programming language-agnostic interface description for HTTP APIs, which allows both humans and computers to discover and understand the capabilities of a service without requiring access to source code, additional documentation, or inspection of network traffic. When properly defined via OpenAPI, a consumer can understand and interact with the remote service with a minimal amount of implementation logic. Similar to what interface descriptions have done for lower-level programming, the OpenAPI Specification removes guesswork in calling a service.

    Status of This Document

    The source-of-truth for the specification is the GitHub markdown file referenced above.
    -

    OpenAPI Specification

    -

    Version 3.0.3

    -

    The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “NOT RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in BCP 14 [[!RFC2119]] [[!RFC8174]] when, and only when, they appear in all capitals, as shown here.

    + + + + + +
    +

    +

    OpenAPI Specification v3.0.3

    Version 3.0.3

    +

    +
    + More details about this document +
    + +
    Latest published version:
    + https://spec.openapis.org/oas/latest.html +
    +
    Latest editor's draft:
    https://github.com/OAI/OpenAPI-Specification/
    + + + + + + +
    Editors:
    + Darrel Miller +
    + Jeremy Whitlock +
    + Marsh Gardiner +
    + Mike Ralphson +
    + Ron Ratovsky +
    + Uri Sarid +
    +
    + Former editors: +
    + Jason Harmon +
    + Tony Tam +
    + + + +
    Participate
    + GitHub OAI/OpenAPI-Specification +
    + File a bug +
    + Commit history +
    + Pull requests +
    +
    +
    + + + +
    +

    What is the OpenAPI Specification?

    The OpenAPI Specification (OAS) defines a standard, programming language-agnostic interface description for HTTP APIs, which allows both humans and computers to discover and understand the capabilities of a service without requiring access to source code, additional documentation, or inspection of network traffic. When properly defined via OpenAPI, a consumer can understand and interact with the remote service with a minimal amount of implementation logic. Similar to what interface descriptions have done for lower-level programming, the OpenAPI Specification removes guesswork in calling a service.

    Status of This Document

    The source-of-truth for the specification is the GitHub markdown file referenced above.
    +

    1. OpenAPI Specification

    +

    1.1 Version 3.0.3

    +

    The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “NOT RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.

    This document is licensed under The Apache License, Version 2.0.

    -

    Introduction

    +

    2. Introduction

    The OpenAPI Specification (OAS) defines a standard, language-agnostic interface to RESTful APIs which allows both humans and computers to discover and understand the capabilities of the service without access to source code, documentation, or through network traffic inspection. When properly defined, a consumer can understand and interact with the remote service with a minimal amount of implementation logic.

    An OpenAPI definition can then be used by documentation generation tools to display the API, code generation tools to generate servers and clients in various programming languages, testing tools, and many other use cases.

    - -

    Definitions

    -

    OpenAPI Document

    + +

    3. Definitions

    +

    3.1 OpenAPI Document

    A document (or set of documents) that defines or describes an API. An OpenAPI definition uses and conforms to the OpenAPI Specification.

    -

    Path Templating

    +

    3.2 Path Templating

    Path templating refers to the usage of template expressions, delimited by curly braces ({}), to mark a section of a URL path as replaceable using path parameters.

    -

    Each template expression in the path MUST correspond to a path parameter that is included in the Path Item itself and/or in each of the Path Item’s Operations.

    -

    Media Types

    +

    Each template expression in the path MUST correspond to a path parameter that is included in the Path Item itself and/or in each of the Path Item’s Operations.

    +

    3.3 Media Types

    Media type definitions are spread across several resources. -The media type definitions SHOULD be in compliance with [[!RFC6838]].

    +The media type definitions SHOULD be in compliance with [RFC6838].

    Some examples of possible media type definitions:

    -
    
    +
    
       text/plain; charset=utf-8
       application/json
       application/vnd.github+json
    @@ -37,47 +268,47 @@
       application/vnd.github.v3.diff
       application/vnd.github.v3.patch
     
    -

    HTTP Status Codes

    +

    3.4 HTTP Status Codes

    The HTTP Status Codes are used to indicate the status of the executed operation. -The available status codes are defined by [[!RFC7231]] and registered status codes are listed in the IANA Status Code Registry.

    -

    Specification

    -

    Versions

    +The available status codes are defined by [RFC7231] and registered status codes are listed in the IANA Status Code Registry.

    +

    4. Specification

    +

    4.1 Versions

    The OpenAPI Specification is versioned using Semantic Versioning 2.0.0 (semver) and follows the semver specification.

    -

    The major.minor portion of the semver (for example 3.0) SHALL designate the OAS feature set. Typically, .patch versions address errors in this document, not the feature set. Tooling which supports OAS 3.0 SHOULD be compatible with all OAS 3.0.* versions. The patch version SHOULD NOT be considered by tooling, making no distinction between 3.0.0 and 3.0.1 for example.

    -

    Each new minor version of the OpenAPI Specification SHALL allow any OpenAPI document that is valid against any previous minor version of the Specification, within the same major version, to be updated to the new Specification version with equivalent semantics. Such an update MUST only require changing the openapi property to the new minor version.

    -

    For example, a valid OpenAPI 3.0.2 document, upon changing its openapi property to 3.1.0, SHALL be a valid OpenAPI 3.1.0 document, semantically equivalent to the original OpenAPI 3.0.2 document. New minor versions of the OpenAPI Specification MUST be written to ensure this form of backward compatibility.

    -

    An OpenAPI document compatible with OAS 3.*.* contains a required openapi field which designates the semantic version of the OAS that it uses. (OAS 2.0 documents contain a top-level version field named swagger and value "2.0".)

    -

    Format

    +

    The major.minor portion of the semver (for example 3.0) SHALL designate the OAS feature set. Typically, .patch versions address errors in this document, not the feature set. Tooling which supports OAS 3.0 SHOULD be compatible with all OAS 3.0.* versions. The patch version SHOULD NOT be considered by tooling, making no distinction between 3.0.0 and 3.0.1 for example.

    +

    Each new minor version of the OpenAPI Specification SHALL allow any OpenAPI document that is valid against any previous minor version of the Specification, within the same major version, to be updated to the new Specification version with equivalent semantics. Such an update MUST only require changing the openapi property to the new minor version.

    +

    For example, a valid OpenAPI 3.0.2 document, upon changing its openapi property to 3.1.0, SHALL be a valid OpenAPI 3.1.0 document, semantically equivalent to the original OpenAPI 3.0.2 document. New minor versions of the OpenAPI Specification MUST be written to ensure this form of backward compatibility.

    +

    An OpenAPI document compatible with OAS 3.*.* contains a required openapi field which designates the semantic version of the OAS that it uses. (OAS 2.0 documents contain a top-level version field named swagger and value "2.0".)

    +

    4.2 Format

    An OpenAPI document that conforms to the OpenAPI Specification is itself a JSON object, which may be represented either in JSON or YAML format.

    For example, if a field has an array value, the JSON array representation will be used:

    
     {
    -   "field": [ 1, 2, 3 ]
    +   "field": [ 1, 2, 3 ]
     }
     

    All field names in the specification are case sensitive. This includes all fields that are used as keys in a map, except where explicitly noted that keys are case insensitive.

    The schema exposes two types of fields: Fixed fields, which have a declared name, and Patterned fields, which declare a regex pattern for the field name.

    -

    Patterned fields MUST have unique names within the containing object.

    -

    In order to preserve the ability to round-trip between YAML and JSON formats, YAML version 1.2 is RECOMMENDED along with some additional constraints:

    +

    Patterned fields MUST have unique names within the containing object.

    +

    In order to preserve the ability to round-trip between YAML and JSON formats, YAML version 1.2 is RECOMMENDED along with some additional constraints:

    Note: While APIs may be defined by OpenAPI documents in either YAML or JSON format, the API request and response bodies and other content are not required to be JSON or YAML.

    -

    Document Structure

    -

    An OpenAPI document MAY be made up of a single document or be divided into multiple, connected parts at the discretion of the user. In the latter case, $ref fields MUST be used in the specification to reference those parts as follows from the JSON Schema definitions.

    -

    It is RECOMMENDED that the root OpenAPI document be named: openapi.json or openapi.yaml.

    -

    Data Types

    +

    4.3 Document Structure

    +

    An OpenAPI document MAY be made up of a single document or be divided into multiple, connected parts at the discretion of the user. In the latter case, $ref fields MUST be used in the specification to reference those parts as follows from the JSON Schema definitions.

    +

    It is RECOMMENDED that the root OpenAPI document be named: openapi.json or openapi.yaml.

    +

    4.4 Data Types

    Primitive data types in the OAS are based on the types supported by the JSON Schema Specification Wright Draft 00. Note that integer as a type is also supported and is defined as a JSON number without a fraction or exponent part. null is not supported as a type (see nullable for an alternative solution). Models are defined using the Schema Object, which is an extended subset of JSON Schema Specification Wright Draft 00.

    -

    Primitives have an optional modifier property: format. +

    Primitives have an optional modifier property: format. OAS uses several known formats to define in fine detail the data type being used. However, to support documentation needs, the format property is an open string-valued property, and can have any value. -Formats such as "email", "uuid", and so on, MAY be used even though undefined by this specification. -Types that are not accompanied by a format property follow the type definition in the JSON Schema. Tools that do not recognize a specific format MAY default back to the type alone, as if the format is not specified.

    +Formats such as "email", "uuid", and so on, MAY be used even though undefined by this specification. +Types that are not accompanied by a format property follow the type definition in the JSON Schema. Tools that do not recognize a specific format MAY default back to the type alone, as if the format is not specified.

    The formats defined by the OAS are:

    @@ -131,12 +362,12 @@ - + - + @@ -145,18 +376,18 @@
    string dateAs defined by full-date - [!RFC3339]As defined by full-date - [RFC3339]
    string date-timeAs defined by date-time - [!RFC3339]As defined by date-time - [RFC3339]
    string
    -

    Rich Text Formatting

    +

    4.5 Rich Text Formatting

    Throughout the specification description fields are noted as supporting CommonMark markdown formatting. -Where OpenAPI tooling renders rich text it MUST support, at a minimum, markdown syntax as described by CommonMark 0.27. Tooling MAY choose to ignore some CommonMark features to address security concerns.

    -

    Relative References in URLs

    -

    Unless specified otherwise, all properties that are URLs MAY be relative references as defined by [[!RFC3986]]. +Where OpenAPI tooling renders rich text it MUST support, at a minimum, markdown syntax as described by CommonMark 0.27. Tooling MAY choose to ignore some CommonMark features to address security concerns.

    +

    4.6 Relative References in URLs

    +

    Unless specified otherwise, all properties that are URLs MAY be relative references as defined by [RFC3986]. Relative references are resolved using the URLs defined in the Server Object as a Base URI.

    Relative references used in $ref are processed as per JSON Reference, using the URL of the current document as the base URI. See also the Reference Object.

    -

    Schema

    -

    In the following description, if a field is not explicitly REQUIRED or described with a MUST or SHALL, it can be considered OPTIONAL.

    -

    OpenAPI Object

    +

    4.7 Schema

    +

    In the following description, if a field is not explicitly REQUIRED or described with a MUST or SHALL, it can be considered OPTIONAL.

    +

    4.7.1 OpenAPI Object

    This is the root document object of the OpenAPI document.

    -

    Fixed Fields

    +
    4.7.1.1 Fixed Fields
    @@ -167,52 +398,52 @@ - + - + - + - + - + - + - + - + - + - + - + - +
    openapiopenapi stringREQUIRED. This string MUST be the semantic version number of the OpenAPI Specification version that the OpenAPI document uses. The openapi field SHOULD be used by tooling specifications and clients to interpret the OpenAPI document. This is not related to the API info.version string.REQUIRED. This string MUST be the semantic version number of the OpenAPI Specification version that the OpenAPI document uses. The openapi field SHOULD be used by tooling specifications and clients to interpret the OpenAPI document. This is not related to the API info.version string.
    infoinfo Info ObjectREQUIRED. Provides metadata about the API. The metadata MAY be used by tooling as required.REQUIRED. Provides metadata about the API. The metadata MAY be used by tooling as required.
    serversservers [Server Object] An array of Server Objects, which provide connectivity information to a target server. If the servers property is not provided, or is an empty array, the default value would be a Server Object with a url value of /.
    pathspaths Paths ObjectREQUIRED. The available paths and operations for the API.REQUIRED. The available paths and operations for the API.
    componentscomponents Components Object An element to hold various schemas for the specification.
    securitysecurity [Security Requirement Object] A declaration of which security mechanisms can be used across the API. The list of values includes alternative security requirement objects that can be used. Only one of the security requirement objects need to be satisfied to authorize a request. Individual operations can override this definition. To make security optional, an empty security requirement ({}) can be included in the array.
    tagstags [Tag Object]A list of tags used by the specification with additional metadata. The order of the tags can be used to reflect on their order by the parsing tools. Not all tags that are used by the Operation Object must be declared. The tags that are not declared MAY be organized randomly or based on the tools’ logic. Each tag name in the list MUST be unique.A list of tags used by the specification with additional metadata. The order of the tags can be used to reflect on their order by the parsing tools. Not all tags that are used by the Operation Object must be declared. The tags that are not declared MAY be organized randomly or based on the tools’ logic. Each tag name in the list MUST be unique.
    externalDocsexternalDocs External Documentation Object Additional external documentation.
    -

    This object MAY be extended with Specification Extensions.

    -

    Info Object

    +

    This object MAY be extended with Specification Extensions.

    +

    4.7.2 Info Object

    The object provides metadata about the API. -The metadata MAY be used by the clients if needed, and MAY be presented in editing or documentation generation tools for convenience.

    -

    Fixed Fields

    +The metadata MAY be used by the clients if needed, and MAY be presented in editing or documentation generation tools for convenience.

    +
    4.7.2.1 Fixed Fields
    @@ -223,54 +454,54 @@ - + - + - + - + - + - + - + - + - + - +
    titletitle stringREQUIRED. The title of the API.REQUIRED. The title of the API.
    descriptiondescription stringA short description of the API. CommonMark syntax MAY be used for rich text representation.A short description of the API. CommonMark syntax MAY be used for rich text representation.
    termsOfServicetermsOfService stringA URL to the Terms of Service for the API. MUST be in the format of a URL.A URL to the Terms of Service for the API. MUST be in the format of a URL.
    contactcontact Contact Object The contact information for the exposed API.
    licenselicense License Object The license information for the exposed API.
    versionversion stringREQUIRED. The version of the OpenAPI document (which is distinct from the OpenAPI Specification version or the API implementation version).REQUIRED. The version of the OpenAPI document (which is distinct from the OpenAPI Specification version or the API implementation version).
    -

    This object MAY be extended with Specification Extensions.

    -

    Info Object Example

    +

    This object MAY be extended with Specification Extensions.

    +
    4.7.2.2 Info Object Example
    
     {
    -  "title": "Sample Pet Store App",
    -  "description": "This is a sample server for a pet store.",
    -  "termsOfService": "http://example.com/terms/",
    -  "contact": {
    -    "name": "API Support",
    -    "url": "http://www.example.com/support",
    -    "email": "support@example.com"
    +  "title": "Sample Pet Store App",
    +  "description": "This is a sample server for a pet store.",
    +  "termsOfService": "http://example.com/terms/",
    +  "contact": {
    +    "name": "API Support",
    +    "url": "http://www.example.com/support",
    +    "email": "support@example.com"
       },
    -  "license": {
    -    "name": "Apache 2.0",
    -    "url": "https://www.apache.org/licenses/LICENSE-2.0.html"
    +  "license": {
    +    "name": "Apache 2.0",
    +    "url": "https://www.apache.org/licenses/LICENSE-2.0.html"
       },
    -  "version": "1.0.1"
    +  "version": "1.0.1"
     }
     
    
    @@ -286,9 +517,9 @@
       url: https://www.apache.org/licenses/LICENSE-2.0.html
     version: 1.0.1
     
    -

    Contact Object

    +

    4.7.3 Contact Object

    Contact information for the exposed API.

    -

    Fixed Fields

    +
    4.7.3.1 Fixed Fields
    @@ -299,29 +530,29 @@ - + - + - + - + - +
    namename string The identifying name of the contact person/organization.
    urlurl stringThe URL pointing to the contact information. MUST be in the format of a URL.The URL pointing to the contact information. MUST be in the format of a URL.
    emailemail stringThe email address of the contact person/organization. MUST be in the format of an email address.The email address of the contact person/organization. MUST be in the format of an email address.
    -

    This object MAY be extended with Specification Extensions.

    -

    Contact Object Example

    +

    This object MAY be extended with Specification Extensions.

    +
    4.7.3.2 Contact Object Example
    
     {
    -  "name": "API Support",
    -  "url": "http://www.example.com/support",
    -  "email": "support@example.com"
    +  "name": "API Support",
    +  "url": "http://www.example.com/support",
    +  "email": "support@example.com"
     }
     
    
    @@ -329,9 +560,9 @@
     url: http://www.example.com/support
     email: support@example.com
     
    -

    License Object

    +

    4.7.4 License Object

    License information for the exposed API.

    -

    Fixed Fields

    +
    4.7.4.1 Fixed Fields
    @@ -342,32 +573,32 @@ - + - + - + - +
    namename stringREQUIRED. The license name used for the API.REQUIRED. The license name used for the API.
    urlurl stringA URL to the license used for the API. MUST be in the format of a URL.A URL to the license used for the API. MUST be in the format of a URL.
    -

    This object MAY be extended with Specification Extensions.

    -

    License Object Example

    +

    This object MAY be extended with Specification Extensions.

    +
    4.7.4.2 License Object Example
    
     {
    -  "name": "Apache 2.0",
    -  "url": "https://www.apache.org/licenses/LICENSE-2.0.html"
    +  "name": "Apache 2.0",
    +  "url": "https://www.apache.org/licenses/LICENSE-2.0.html"
     }
     
    
     name: Apache 2.0
     url: https://www.apache.org/licenses/LICENSE-2.0.html
     
    -

    Server Object

    +

    4.7.5 Server Object

    An object representing a Server.

    -

    Fixed Fields

    +
    4.7.5.1 Fixed Fields
    @@ -378,29 +609,29 @@ - + - + - + - + - +
    urlurl stringREQUIRED. A URL to the target host. This URL supports Server Variables and MAY be relative, to indicate that the host location is relative to the location where the OpenAPI document is being served. Variable substitutions will be made when a variable is named in {brackets}.REQUIRED. A URL to the target host. This URL supports Server Variables and MAY be relative, to indicate that the host location is relative to the location where the OpenAPI document is being served. Variable substitutions will be made when a variable is named in {brackets}.
    descriptiondescription stringAn optional string describing the host designated by the URL. CommonMark syntax MAY be used for rich text representation.An optional string describing the host designated by the URL. CommonMark syntax MAY be used for rich text representation.
    variablesvariables Map[string, Server Variable Object] A map between a variable name and its value. The value is used for substitution in the server’s URL template.
    -

    This object MAY be extended with Specification Extensions.

    -

    Server Object Example

    +

    This object MAY be extended with Specification Extensions.

    +
    4.7.5.2 Server Object Example

    A single server would be described as:

    
     {
    -  "url": "https://development.gigantic-server.com/v1",
    -  "description": "Development server"
    +  "url": "https://development.gigantic-server.com/v1",
    +  "description": "Development server"
     }
     
    
    @@ -410,18 +641,18 @@
     

    The following shows how multiple servers can be described, for example, at the OpenAPI Object’s servers:

    
     {
    -  "servers": [
    +  "servers": [
         {
    -      "url": "https://development.gigantic-server.com/v1",
    -      "description": "Development server"
    +      "url": "https://development.gigantic-server.com/v1",
    +      "description": "Development server"
         },
         {
    -      "url": "https://staging.gigantic-server.com/v1",
    -      "description": "Staging server"
    +      "url": "https://staging.gigantic-server.com/v1",
    +      "description": "Staging server"
         },
         {
    -      "url": "https://api.gigantic-server.com/v1",
    -      "description": "Production server"
    +      "url": "https://api.gigantic-server.com/v1",
    +      "description": "Production server"
         }
       ]
     }
    @@ -438,24 +669,24 @@
     

    The following shows how variables can be used for a server configuration:

    
     {
    -  "servers": [
    +  "servers": [
         {
    -      "url": "https://{username}.gigantic-server.com:{port}/{basePath}",
    -      "description": "The production API server",
    -      "variables": {
    -        "username": {
    -          "default": "demo",
    -          "description": "this value is assigned by the service provider, in this example `gigantic-server.com`"
    +      "url": "https://{username}.gigantic-server.com:{port}/{basePath}",
    +      "description": "The production API server",
    +      "variables": {
    +        "username": {
    +          "default": "demo",
    +          "description": "this value is assigned by the service provider, in this example `gigantic-server.com`"
             },
    -        "port": {
    -          "enum": [
    -            "8443",
    -            "443"
    +        "port": {
    +          "enum": [
    +            "8443",
    +            "443"
               ],
    -          "default": "8443"
    +          "default": "8443"
             },
    -        "basePath": {
    -          "default": "v2"
    +        "basePath": {
    +          "default": "v2"
             }
           }
         }
    @@ -473,16 +704,16 @@
           description: this value is assigned by the service provider, in this example `gigantic-server.com`
         port:
           enum:
    -        - '8443'
    -        - '443'
    -      default: '8443'
    +        - '8443'
    +        - '443'
    +      default: '8443'
         basePath:
           # open meaning there is the opportunity to use special base paths as assigned by the provider, default is `v2`
           default: v2
     
    -

    Server Variable Object

    +

    4.7.6 Server Variable Object

    An object representing a Server Variable for server URL template substitution.

    -

    Fixed Fields

    +
    4.7.6.1 Fixed Fields
    @@ -493,27 +724,27 @@ - + - + - + - + - + - +
    enumenum [string]An enumeration of string values to be used if the substitution options are from a limited set. The array SHOULD NOT be empty.An enumeration of string values to be used if the substitution options are from a limited set. The array SHOULD NOT be empty.
    defaultdefault stringREQUIRED. The default value to use for substitution, which SHALL be sent if an alternate value is not supplied. Note this behavior is different than the Schema Object’s treatment of default values, because in those cases parameter values are optional. If the enum is defined, the value SHOULD exist in the enum’s values.REQUIRED. The default value to use for substitution, which SHALL be sent if an alternate value is not supplied. Note this behavior is different than the Schema Object’s treatment of default values, because in those cases parameter values are optional. If the enum is defined, the value SHOULD exist in the enum’s values.
    descriptiondescription stringAn optional description for the server variable. CommonMark syntax MAY be used for rich text representation.An optional description for the server variable. CommonMark syntax MAY be used for rich text representation.
    -

    This object MAY be extended with Specification Extensions.

    -

    Components Object

    +

    This object MAY be extended with Specification Extensions.

    +

    4.7.7 Components Object

    Holds a set of reusable objects for different aspects of the OAS. All objects defined within the components object will have no effect on the API unless they are explicitly referenced from properties outside the components object.

    -

    Fixed Fields

    +
    4.7.7.1 Fixed Fields
    @@ -524,157 +755,157 @@ - + - + - + - + - + - + - + - + - +
    schemas schemas Map[string, Schema Object | Reference Object] An object to hold reusable Schema Objects.
    responses responses Map[string, Response Object | Reference Object] An object to hold reusable Response Objects.
    parameters parameters Map[string, Parameter Object | Reference Object] An object to hold reusable Parameter Objects.
    examples examples Map[string, Example Object | Reference Object] An object to hold reusable Example Objects.
    requestBodies requestBodies Map[string, Request Body Object | Reference Object] An object to hold reusable Request Body Objects.
    headers headers Map[string, Header Object | Reference Object] An object to hold reusable Header Objects.
    securitySchemes securitySchemes Map[string, Security Scheme Object | Reference Object] An object to hold reusable Security Scheme Objects.
    links links Map[string, Link Object | Reference Object] An object to hold reusable Link Objects.
    callbacks callbacks Map[string, Callback Object | Reference Object] An object to hold reusable Callback Objects.
    -

    This object MAY be extended with Specification Extensions.

    -

    All the fixed fields declared above are objects that MUST use keys that match the regular expression: ^[a-zA-Z0-9\.\-_]+$.

    +

    This object MAY be extended with Specification Extensions.

    +

    All the fixed fields declared above are objects that MUST use keys that match the regular expression: ^[a-zA-Z0-9\.\-_]+$.

    Field Name Examples:

    -
    
    +
    
     User
     User_1
     User_Name
     user-name
     my.org.User
     
    -

    Components Object Example

    +
    4.7.7.2 Components Object Example
    
    -"components": {
    -  "schemas": {
    -    "GeneralError": {
    -      "type": "object",
    -      "properties": {
    -        "code": {
    -          "type": "integer",
    -          "format": "int32"
    +"components": {
    +  "schemas": {
    +    "GeneralError": {
    +      "type": "object",
    +      "properties": {
    +        "code": {
    +          "type": "integer",
    +          "format": "int32"
             },
    -        "message": {
    -          "type": "string"
    +        "message": {
    +          "type": "string"
             }
           }
         },
    -    "Category": {
    -      "type": "object",
    -      "properties": {
    -        "id": {
    -          "type": "integer",
    -          "format": "int64"
    +    "Category": {
    +      "type": "object",
    +      "properties": {
    +        "id": {
    +          "type": "integer",
    +          "format": "int64"
             },
    -        "name": {
    -          "type": "string"
    +        "name": {
    +          "type": "string"
             }
           }
         },
    -    "Tag": {
    -      "type": "object",
    -      "properties": {
    -        "id": {
    -          "type": "integer",
    -          "format": "int64"
    +    "Tag": {
    +      "type": "object",
    +      "properties": {
    +        "id": {
    +          "type": "integer",
    +          "format": "int64"
             },
    -        "name": {
    -          "type": "string"
    +        "name": {
    +          "type": "string"
             }
           }
         }
       },
    -  "parameters": {
    -    "skipParam": {
    -      "name": "skip",
    -      "in": "query",
    -      "description": "number of items to skip",
    -      "required": true,
    -      "schema": {
    -        "type": "integer",
    -        "format": "int32"
    +  "parameters": {
    +    "skipParam": {
    +      "name": "skip",
    +      "in": "query",
    +      "description": "number of items to skip",
    +      "required": true,
    +      "schema": {
    +        "type": "integer",
    +        "format": "int32"
           }
         },
    -    "limitParam": {
    -      "name": "limit",
    -      "in": "query",
    -      "description": "max records to return",
    -      "required": true,
    -      "schema" : {
    -        "type": "integer",
    -        "format": "int32"
    +    "limitParam": {
    +      "name": "limit",
    +      "in": "query",
    +      "description": "max records to return",
    +      "required": true,
    +      "schema" : {
    +        "type": "integer",
    +        "format": "int32"
           }
         }
       },
    -  "responses": {
    -    "NotFound": {
    -      "description": "Entity not found."
    +  "responses": {
    +    "NotFound": {
    +      "description": "Entity not found."
         },
    -    "IllegalInput": {
    -      "description": "Illegal input for operation."
    +    "IllegalInput": {
    +      "description": "Illegal input for operation."
         },
    -    "GeneralError": {
    -      "description": "General Error",
    -      "content": {
    -        "application/json": {
    -          "schema": {
    -            "$ref": "#/components/schemas/GeneralError"
    +    "GeneralError": {
    +      "description": "General Error",
    +      "content": {
    +        "application/json": {
    +          "schema": {
    +            "$ref": "#/components/schemas/GeneralError"
               }
             }
           }
         }
       },
    -  "securitySchemes": {
    -    "api_key": {
    -      "type": "apiKey",
    -      "name": "api_key",
    -      "in": "header"
    +  "securitySchemes": {
    +    "api_key": {
    +      "type": "apiKey",
    +      "name": "api_key",
    +      "in": "header"
         },
    -    "petstore_auth": {
    -      "type": "oauth2",
    -      "flows": {
    -        "implicit": {
    -          "authorizationUrl": "http://example.org/api/oauth/dialog",
    -          "scopes": {
    -            "write:pets": "modify pets in your account",
    -            "read:pets": "read your pets"
    +    "petstore_auth": {
    +      "type": "oauth2",
    +      "flows": {
    +        "implicit": {
    +          "authorizationUrl": "http://example.org/api/oauth/dialog",
    +          "scopes": {
    +            "write:pets": "modify pets in your account",
    +            "read:pets": "read your pets"
               }
             }
           }
    @@ -736,7 +967,7 @@
           content:
             application/json:
               schema:
    -            $ref: '#/components/schemas/GeneralError'
    +            $ref: '#/components/schemas/GeneralError'
       securitySchemes:
         api_key:
           type: apiKey
    @@ -751,10 +982,10 @@
                 write:pets: modify pets in your account
                 read:pets: read your pets
     
    -

    Paths Object

    +

    4.7.8 Paths Object

    Holds the relative paths to the individual endpoints and their operations. -The path is appended to the URL from the Server Object in order to construct the full URL. The Paths MAY be empty, due to ACL constraints.

    -

    Patterned Fields

    +The path is appended to the URL from the Server Object in order to construct the full URL. The Paths MAY be empty, due to ACL constraints.

    +
    4.7.8.1 Patterned Fields
    @@ -765,44 +996,44 @@ - + - +
    /{path}/{path} Path Item ObjectA relative path to an individual endpoint. The field name MUST begin with a forward slash (/). The path is appended (no relative URL resolution) to the expanded URL from the Server Object’s url field in order to construct the full URL. Path templating is allowed. When matching URLs, concrete (non-templated) paths would be matched before their templated counterparts. Templated paths with the same hierarchy but different templated names MUST NOT exist as they are identical. In case of ambiguous matching, it’s up to the tooling to decide which one to use.A relative path to an individual endpoint. The field name MUST begin with a forward slash (/). The path is appended (no relative URL resolution) to the expanded URL from the Server Object’s url field in order to construct the full URL. Path templating is allowed. When matching URLs, concrete (non-templated) paths would be matched before their templated counterparts. Templated paths with the same hierarchy but different templated names MUST NOT exist as they are identical. In case of ambiguous matching, it’s up to the tooling to decide which one to use.
    -

    This object MAY be extended with Specification Extensions.

    -

    Path Templating Matching

    +

    This object MAY be extended with Specification Extensions.

    +
    4.7.8.2 Path Templating Matching

    Assuming the following paths, the concrete definition, /pets/mine, will be matched first if used:

    -
    
    +
    
       /pets/{petId}
       /pets/mine
     

    The following paths are considered identical and invalid:

    -
    
    +
    
       /pets/{petId}
       /pets/{name}
     

    The following may lead to ambiguous resolution:

    -
    
    +
    
       /{entity}/me
       /books/{id}
     
    -

    Paths Object Example

    +
    4.7.8.3 Paths Object Example
    
     {
    -  "/pets": {
    -    "get": {
    -      "description": "Returns all pets from the system that the user has access to",
    -      "responses": {
    -        "200": {         
    -          "description": "A list of pets.",
    -          "content": {
    -            "application/json": {
    -              "schema": {
    -                "type": "array",
    -                "items": {
    -                  "$ref": "#/components/schemas/pet"
    +  "/pets": {
    +    "get": {
    +      "description": "Returns all pets from the system that the user has access to",
    +      "responses": {
    +        "200": {         
    +          "description": "A list of pets.",
    +          "content": {
    +            "application/json": {
    +              "schema": {
    +                "type": "array",
    +                "items": {
    +                  "$ref": "#/components/schemas/pet"
                     }
                   }
                 }
    @@ -818,20 +1049,20 @@
       get:
         description: Returns all pets from the system that the user has access to
         responses:
    -      '200':
    +      '200':
             description: A list of pets.
             content:
               application/json:
                 schema:
                   type: array
                   items:
    -                $ref: '#/components/schemas/pet'
    +                $ref: '#/components/schemas/pet'
     
    -

    Path Item Object

    +

    4.7.9 Path Item Object

    Describes the operations available on a single path. -A Path Item MAY be empty, due to ACL constraints. +A Path Item MAY be empty, due to ACL constraints. The path itself is still exposed to the documentation viewer but they will not know which operations and parameters are available.

    -

    Fixed Fields

    +
    4.7.9.1 Fixed Fields
    @@ -842,119 +1073,119 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
    $ref$ref stringAllows for an external definition of this path item. The referenced structure MUST be in the format of a Path Item Object. In case a Path Item Object field appears both in the defined object and the referenced object, the behavior is undefined.Allows for an external definition of this path item. The referenced structure MUST be in the format of a Path Item Object. In case a Path Item Object field appears both in the defined object and the referenced object, the behavior is undefined.
    summarysummary string An optional, string summary, intended to apply to all operations in this path.
    descriptiondescription stringAn optional, string description, intended to apply to all operations in this path. CommonMark syntax MAY be used for rich text representation.An optional, string description, intended to apply to all operations in this path. CommonMark syntax MAY be used for rich text representation.
    getget Operation Object A definition of a GET operation on this path.
    putput Operation Object A definition of a PUT operation on this path.
    postpost Operation Object A definition of a POST operation on this path.
    deletedelete Operation Object A definition of a DELETE operation on this path.
    optionsoptions Operation Object A definition of a OPTIONS operation on this path.
    headhead Operation Object A definition of a HEAD operation on this path.
    patchpatch Operation Object A definition of a PATCH operation on this path.
    tracetrace Operation Object A definition of a TRACE operation on this path.
    serversservers [Server Object] An alternative server array to service all operations in this path.
    parametersparameters [Parameter Object | Reference Object]A list of parameters that are applicable for all the operations described under this path. These parameters can be overridden at the operation level, but cannot be removed there. The list MUST NOT include duplicated parameters. A unique parameter is defined by a combination of a name and location. The list can use the Reference Object to link to parameters that are defined at the OpenAPI Object’s components/parameters.A list of parameters that are applicable for all the operations described under this path. These parameters can be overridden at the operation level, but cannot be removed there. The list MUST NOT include duplicated parameters. A unique parameter is defined by a combination of a name and location. The list can use the Reference Object to link to parameters that are defined at the OpenAPI Object’s components/parameters.
    -

    This object MAY be extended with Specification Extensions.

    -

    Path Item Object Example

    +

    This object MAY be extended with Specification Extensions.

    +
    4.7.9.2 Path Item Object Example
    
     {
    -  "get": {
    -    "description": "Returns pets based on ID",
    -    "summary": "Find pets by ID",
    -    "operationId": "getPetsById",
    -    "responses": {
    -      "200": {
    -        "description": "pet response",
    -        "content": {
    -          "*/*": {
    -            "schema": {
    -              "type": "array",
    -              "items": {
    -                "$ref": "#/components/schemas/Pet"
    +  "get": {
    +    "description": "Returns pets based on ID",
    +    "summary": "Find pets by ID",
    +    "operationId": "getPetsById",
    +    "responses": {
    +      "200": {
    +        "description": "pet response",
    +        "content": {
    +          "*/*": {
    +            "schema": {
    +              "type": "array",
    +              "items": {
    +                "$ref": "#/components/schemas/Pet"
                   }
                 }
               }
             }
           },
    -      "default": {
    -        "description": "error payload",
    -        "content": {
    -          "text/html": {
    -            "schema": {
    -              "$ref": "#/components/schemas/ErrorModel"
    +      "default": {
    +        "description": "error payload",
    +        "content": {
    +          "text/html": {
    +            "schema": {
    +              "$ref": "#/components/schemas/ErrorModel"
                 }
               }
             }
           }
         }
       },
    -  "parameters": [
    +  "parameters": [
         {
    -      "name": "id",
    -      "in": "path",
    -      "description": "ID of pet to use",
    -      "required": true,
    -      "schema": {
    -        "type": "array",
    -        "items": {
    -          "type": "string"
    +      "name": "id",
    +      "in": "path",
    +      "description": "ID of pet to use",
    +      "required": true,
    +      "schema": {
    +        "type": "array",
    +        "items": {
    +          "type": "string"
             }
           },
    -      "style": "simple"
    +      "style": "simple"
         }
       ]
     }
    @@ -965,20 +1196,20 @@
       summary: Find pets by ID
       operationId: getPetsById
       responses:
    -    '200':
    +    '200':
           description: pet response
           content:
    -        '*/*' :
    +        '*/*' :
               schema:
                 type: array
                 items:
    -              $ref: '#/components/schemas/Pet'
    +              $ref: '#/components/schemas/Pet'
         default:
           description: error payload
           content:
    -        'text/html':
    +        'text/html':
               schema:
    -            $ref: '#/components/schemas/ErrorModel'
    +            $ref: '#/components/schemas/ErrorModel'
     parameters:
     - name: id
       in: path
    @@ -990,9 +1221,9 @@
           type: string 
       style: simple
     
    -

    Operation Object

    +

    4.7.10 Operation Object

    Describes a single API operation on a path.

    -

    Fixed Fields

    +
    4.7.10.1 Fixed Fields
    @@ -1003,128 +1234,128 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
    tagstags [string] A list of tags for API documentation control. Tags can be used for logical grouping of operations by resources or any other qualifier.
    summarysummary string A short summary of what the operation does.
    descriptiondescription stringA verbose explanation of the operation behavior. CommonMark syntax MAY be used for rich text representation.A verbose explanation of the operation behavior. CommonMark syntax MAY be used for rich text representation.
    externalDocsexternalDocs External Documentation Object Additional external documentation for this operation.
    operationIdoperationId stringUnique string used to identify the operation. The id MUST be unique among all operations described in the API. The operationId value is case-sensitive. Tools and libraries MAY use the operationId to uniquely identify an operation, therefore, it is RECOMMENDED to follow common programming naming conventions.Unique string used to identify the operation. The id MUST be unique among all operations described in the API. The operationId value is case-sensitive. Tools and libraries MAY use the operationId to uniquely identify an operation, therefore, it is RECOMMENDED to follow common programming naming conventions.
    parametersparameters [Parameter Object | Reference Object]A list of parameters that are applicable for this operation. If a parameter is already defined at the Path Item, the new definition will override it but can never remove it. The list MUST NOT include duplicated parameters. A unique parameter is defined by a combination of a name and location. The list can use the Reference Object to link to parameters that are defined at the OpenAPI Object’s components/parameters.A list of parameters that are applicable for this operation. If a parameter is already defined at the Path Item, the new definition will override it but can never remove it. The list MUST NOT include duplicated parameters. A unique parameter is defined by a combination of a name and location. The list can use the Reference Object to link to parameters that are defined at the OpenAPI Object’s components/parameters.
    requestBodyrequestBody Request Body Object | Reference ObjectThe request body applicable for this operation. The requestBody is only supported in HTTP methods where the HTTP 1.1 specification [[!RFC7231]] has explicitly defined semantics for request bodies. In other cases where the HTTP spec is vague, requestBody SHALL be ignored by consumers.The request body applicable for this operation. The requestBody is only supported in HTTP methods where the HTTP 1.1 specification [RFC7231] has explicitly defined semantics for request bodies. In other cases where the HTTP spec is vague, requestBody SHALL be ignored by consumers.
    responsesresponses Responses ObjectREQUIRED. The list of possible responses as they are returned from executing this operation.REQUIRED. The list of possible responses as they are returned from executing this operation.
    callbackscallbacks Map[string, Callback Object | Reference Object] A map of possible out-of band callbacks related to the parent operation. The key is a unique identifier for the Callback Object. Each value in the map is a Callback Object that describes a request that may be initiated by the API provider and the expected responses.
    deprecateddeprecated booleanDeclares this operation to be deprecated. Consumers SHOULD refrain from usage of the declared operation. Default value is false.Declares this operation to be deprecated. Consumers SHOULD refrain from usage of the declared operation. Default value is false.
    securitysecurity [Security Requirement Object] A declaration of which security mechanisms can be used for this operation. The list of values includes alternative security requirement objects that can be used. Only one of the security requirement objects need to be satisfied to authorize a request. To make security optional, an empty security requirement ({}) can be included in the array. This definition overrides any declared top-level security. To remove a top-level security declaration, an empty array can be used.
    serversservers [Server Object] An alternative server array to service this operation. If an alternative server object is specified at the Path Item Object or Root level, it will be overridden by this value.
    -

    This object MAY be extended with Specification Extensions.

    -

    Operation Object Example

    +

    This object MAY be extended with Specification Extensions.

    +
    4.7.10.2 Operation Object Example
    
     {
    -  "tags": [
    -    "pet"
    +  "tags": [
    +    "pet"
       ],
    -  "summary": "Updates a pet in the store with form data",
    -  "operationId": "updatePetWithForm",
    -  "parameters": [
    +  "summary": "Updates a pet in the store with form data",
    +  "operationId": "updatePetWithForm",
    +  "parameters": [
         {
    -      "name": "petId",
    -      "in": "path",
    -      "description": "ID of pet that needs to be updated",
    -      "required": true,
    -      "schema": {
    -        "type": "string"
    +      "name": "petId",
    +      "in": "path",
    +      "description": "ID of pet that needs to be updated",
    +      "required": true,
    +      "schema": {
    +        "type": "string"
           }
         }
       ],
    -  "requestBody": {
    -    "content": {
    -      "application/x-www-form-urlencoded": {
    -        "schema": {
    -          "type": "object",
    -          "properties": {
    -            "name": {
    -              "description": "Updated name of the pet",
    -              "type": "string"
    +  "requestBody": {
    +    "content": {
    +      "application/x-www-form-urlencoded": {
    +        "schema": {
    +          "type": "object",
    +          "properties": {
    +            "name": {
    +              "description": "Updated name of the pet",
    +              "type": "string"
                 },
    -            "status": {
    -              "description": "Updated status of the pet",
    -              "type": "string"
    +            "status": {
    +              "description": "Updated status of the pet",
    +              "type": "string"
                 }
               },
    -          "required": ["status"]
    +          "required": ["status"]
             }
           }
         }
       },
    -  "responses": {
    -    "200": {
    -      "description": "Pet updated.",
    -      "content": {
    -        "application/json": {},
    -        "application/xml": {}
    +  "responses": {
    +    "200": {
    +      "description": "Pet updated.",
    +      "content": {
    +        "application/json": {},
    +        "application/xml": {}
           }
         },
    -    "405": {
    -      "description": "Method Not Allowed",
    -      "content": {
    -        "application/json": {},
    -        "application/xml": {}
    +    "405": {
    +      "description": "Method Not Allowed",
    +      "content": {
    +        "application/json": {},
    +        "application/xml": {}
           }
         }
       },
    -  "security": [
    +  "security": [
         {
    -      "petstore_auth": [
    -        "write:pets",
    -        "read:pets"
    +      "petstore_auth": [
    +        "write:pets",
    +        "read:pets"
           ]
         }
       ]
    @@ -1144,7 +1375,7 @@
         type: string
     requestBody:
       content:
    -    'application/x-www-form-urlencoded':
    +    'application/x-www-form-urlencoded':
           schema:
            properties:
               name:
    @@ -1156,24 +1387,24 @@
            required:
              - status
     responses:
    -  '200':
    +  '200':
         description: Pet updated.
         content:
    -      'application/json': {}
    -      'application/xml': {}
    -  '405':
    +      'application/json': {}
    +      'application/xml': {}
    +  '405':
         description: Method Not Allowed
         content:
    -      'application/json': {}
    -      'application/xml': {}
    +      'application/json': {}
    +      'application/xml': {}
     security:
     - petstore_auth:
       - write:pets
       - read:pets
     
    -

    External Documentation Object

    +

    4.7.11 External Documentation Object

    Allows referencing an external resource for extended documentation.

    -

    Fixed Fields

    +
    4.7.11.1 Fixed Fields
    @@ -1184,41 +1415,41 @@ - + - + - + - +
    descriptiondescription stringA short description of the target documentation. CommonMark syntax MAY be used for rich text representation.A short description of the target documentation. CommonMark syntax MAY be used for rich text representation.
    urlurl stringREQUIRED. The URL for the target documentation. Value MUST be in the format of a URL.REQUIRED. The URL for the target documentation. Value MUST be in the format of a URL.
    -

    This object MAY be extended with Specification Extensions.

    -

    External Documentation Object Example

    +

    This object MAY be extended with Specification Extensions.

    +
    4.7.11.2 External Documentation Object Example
    
     {
    -  "description": "Find more info here",
    -  "url": "https://example.com"
    +  "description": "Find more info here",
    +  "url": "https://example.com"
     }
     
    
     description: Find more info here
     url: https://example.com
     
    -

    Parameter Object

    +

    4.7.12 Parameter Object

    Describes a single operation parameter.

    A unique parameter is defined by a combination of a name and location.

    -

    Parameter Locations

    +
    4.7.12.1 Parameter Locations

    There are four possible parameter locations specified by the in field:

    • path - Used together with Path Templating, where the parameter value is actually part of the operation’s URL. This does not include the host or base path of the API. For example, in /items/{itemId}, the path parameter is itemId.
    • query - Parameters that are appended to the URL. For example, in /items?id=###, the query parameter is id.
    • -
    • header - Custom headers that are expected as part of the request. Note that [[!RFC7230]] states header names are case insensitive.
    • +
    • header - Custom headers that are expected as part of the request. Note that [RFC7230] states header names are case insensitive.
    • cookie - Used to pass a specific cookie value to the API.
    -

    Fixed Fields

    +
    4.7.12.2 Fixed Fields
    @@ -1229,34 +1460,34 @@ - + - + - + - + - + - + - + - + - + - + - + - +
    namename stringREQUIRED. The name of the parameter. Parameter names are case sensitive.
    • If in is "path", the name field MUST correspond to a template expression occurring within the path field in the Paths Object. See Path Templating for further information.
    • If in is "header" and the name field is "Accept", "Content-Type" or "Authorization", the parameter definition SHALL be ignored.
    • For all other cases, the name corresponds to the parameter name used by the in property.
    REQUIRED. The name of the parameter. Parameter names are case sensitive.
    • If in is "path", the name field MUST correspond to a template expression occurring within the path field in the Paths Object. See Path Templating for further information.
    • If in is "header" and the name field is "Accept", "Content-Type" or "Authorization", the parameter definition SHALL be ignored.
    • For all other cases, the name corresponds to the parameter name used by the in property.
    inin stringREQUIRED. The location of the parameter. Possible values are "query", "header", "path" or "cookie".REQUIRED. The location of the parameter. Possible values are "query", "header", "path" or "cookie".
    descriptiondescription stringA brief description of the parameter. This could contain examples of use. CommonMark syntax MAY be used for rich text representation.A brief description of the parameter. This could contain examples of use. CommonMark syntax MAY be used for rich text representation.
    requiredrequired booleanDetermines whether this parameter is mandatory. If the parameter location is "path", this property is REQUIRED and its value MUST be true. Otherwise, the property MAY be included and its default value is false.Determines whether this parameter is mandatory. If the parameter location is "path", this property is REQUIRED and its value MUST be true. Otherwise, the property MAY be included and its default value is false.
    deprecated deprecated booleanSpecifies that a parameter is deprecated and SHOULD be transitioned out of usage. Default value is false.Specifies that a parameter is deprecated and SHOULD be transitioned out of usage. Default value is false.
    allowEmptyValue allowEmptyValue booleanSets the ability to pass empty-valued parameters. This is valid only for query parameters and allows sending a parameter with an empty value. Default value is false. If style is used, and if behavior is n/a (cannot be serialized), the value of allowEmptyValue SHALL be ignored. Use of this property is NOT RECOMMENDED, as it is likely to be removed in a later revision.Sets the ability to pass empty-valued parameters. This is valid only for query parameters and allows sending a parameter with an empty value. Default value is false. If style is used, and if behavior is n/a (cannot be serialized), the value of allowEmptyValue SHALL be ignored. Use of this property is NOT RECOMMENDED, as it is likely to be removed in a later revision.
    @@ -1272,40 +1503,40 @@ - style +style string Describes how the parameter value will be serialized depending on the type of the parameter value. Default values (based on value of in): for query - form; for path - simple; for header - simple; for cookie - form. - explode +explode boolean When this is true, parameter values of type array or object generate separate parameters for each value of the array or key-value pair of the map. For other types of parameters this property has no effect. When style is form, the default value is true. For all other styles, the default value is false. - allowReserved +allowReserved boolean -Determines whether the parameter value SHOULD allow reserved characters, as defined by [[!RFC3986]] :/?#[]@!$&'()*+,;= to be included without percent-encoding. This property only applies to parameters with an in value of query. The default value is false. +Determines whether the parameter value SHOULD allow reserved characters, as defined by [RFC3986] :/?#[]@!$&'()*+,;= to be included without percent-encoding. This property only applies to parameters with an in value of query. The default value is false. - schema +schema Schema Object | Reference Object The schema defining the type used for the parameter. - example +example Any -Example of the parameter’s potential value. The example SHOULD match the specified schema and encoding properties if present. The example field is mutually exclusive of the examples field. Furthermore, if referencing a schema that contains an example, the example value SHALL override the example provided by the schema. To represent examples of media types that cannot naturally be represented in JSON or YAML, a string value can contain the example with escaping where necessary. +Example of the parameter’s potential value. The example SHOULD match the specified schema and encoding properties if present. The example field is mutually exclusive of the examples field. Furthermore, if referencing a schema that contains an example, the example value SHALL override the example provided by the schema. To represent examples of media types that cannot naturally be represented in JSON or YAML, a string value can contain the example with escaping where necessary. - examples +examples Map[ string, Example Object | Reference Object] -Examples of the parameter’s potential value. Each example SHOULD contain a value in the correct format as specified in the parameter encoding. The examples field is mutually exclusive of the example field. Furthermore, if referencing a schema that contains an example, the examples value SHALL override the example provided by the schema. +Examples of the parameter’s potential value. Each example SHOULD contain a value in the correct format as specified in the parameter encoding. The examples field is mutually exclusive of the example field. Furthermore, if referencing a schema that contains an example, the examples value SHALL override the example provided by the schema.

    For more complex scenarios, the content property can define the media type and schema of the parameter. -A parameter MUST contain either a schema property, or a content property, but not both. -When example or examples are provided in conjunction with the schema object, the example MUST follow the prescribed serialization strategy for the parameter.

    +A parameter MUST contain either a schema property, or a content property, but not both. +When example or examples are provided in conjunction with the schema object, the example MUST follow the prescribed serialization strategy for the parameter.

    @@ -1316,13 +1547,13 @@ - + - +
    contentcontent Map[string, Media Type Object]A map containing the representations for the parameter. The key is the media type and the value describes it. The map MUST only contain one entry.A map containing the representations for the parameter. The key is the media type and the value describes it. The map MUST only contain one entry.
    -

    Style Values

    +
    4.7.12.3 Style Values

    In order to support common ways of serializing simple parameters, a set of style values are defined.

    @@ -1338,25 +1569,25 @@ - + - + - + - + @@ -1378,12 +1609,12 @@
    matrix primitive, array, object pathPath-style parameters defined by [[!RFC6570]]Path-style parameters defined by [RFC6570]
    label primitive, array, object pathLabel style parameters defined by [[!RFC6570]]Label style parameters defined by [RFC6570]
    form primitive, array, object query, cookieForm style parameters defined by [[!RFC6570]]. This option replaces collectionFormat with a csv (when explode is false) or multi (when explode is true) value from OpenAPI 2.0.Form style parameters defined by [RFC6570]. This option replaces collectionFormat with a csv (when explode is false) or multi (when explode is true) value from OpenAPI 2.0.
    simple array path, headerSimple style parameters defined by [[!RFC6570]]. This option replaces collectionFormat with a csv value from OpenAPI 2.0.Simple style parameters defined by [RFC6570]. This option replaces collectionFormat with a csv value from OpenAPI 2.0.
    spaceDelimited
    -

    Style Examples

    +
    4.7.12.4 Style Examples

    Assume a parameter named color has one of the following values:

    -
    
    -   string -> "blue"
    -   array -> ["blue","black","brown"]
    -   object -> { "R": 100, "G": 200, "B": 150 }
    +
    
    +   string -> "blue"
    +   array -> ["blue","black","brown"]
    +   object -> { "R": 100, "G": 200, "B": 150 }
     

    The following table shows examples of rendering differences for each value.

    @@ -1484,27 +1715,27 @@ - +
    n/a n/a n/acolor[R]=100&color[G]=200&color[B]=150color[R]=100&color[G]=200&color[B]=150
    -

    This object MAY be extended with Specification Extensions.

    -

    Parameter Object Examples

    +

    This object MAY be extended with Specification Extensions.

    +
    4.7.12.5 Parameter Object Examples

    A header parameter with an array of 64 bit integer numbers:

    
     {
    -  "name": "token",
    -  "in": "header",
    -  "description": "token to be passed as a header",
    -  "required": true,
    -  "schema": {
    -    "type": "array",
    -    "items": {
    -      "type": "integer",
    -      "format": "int64"
    +  "name": "token",
    +  "in": "header",
    +  "description": "token to be passed as a header",
    +  "required": true,
    +  "schema": {
    +    "type": "array",
    +    "items": {
    +      "type": "integer",
    +      "format": "int64"
         }
       },
    -  "style": "simple"
    +  "style": "simple"
     }
     
    
    @@ -1522,12 +1753,12 @@
     

    A path parameter of a string value:

    
     {
    -  "name": "username",
    -  "in": "path",
    -  "description": "username to fetch",
    -  "required": true,
    -  "schema": {
    -    "type": "string"
    +  "name": "username",
    +  "in": "path",
    +  "description": "username to fetch",
    +  "required": true,
    +  "schema": {
    +    "type": "string"
       }
     }
     
    @@ -1542,18 +1773,18 @@

    An optional query parameter of a string value, allowing multiple values by repeating the query parameter:

    
     {
    -  "name": "id",
    -  "in": "query",
    -  "description": "ID of the object to fetch",
    -  "required": false,
    -  "schema": {
    -    "type": "array",
    -    "items": {
    -      "type": "string"
    +  "name": "id",
    +  "in": "query",
    +  "description": "ID of the object to fetch",
    +  "required": false,
    +  "schema": {
    +    "type": "array",
    +    "items": {
    +      "type": "string"
         }
       },
    -  "style": "form",
    -  "explode": true
    +  "style": "form",
    +  "explode": true
     }
     
    
    @@ -1571,15 +1802,15 @@
     

    A free-form query parameter, allowing undefined parameters of a specific type:

    
     {
    -  "in": "query",
    -  "name": "freeForm",
    -  "schema": {
    -    "type": "object",
    -    "additionalProperties": {
    -      "type": "integer"
    +  "in": "query",
    +  "name": "freeForm",
    +  "schema": {
    +    "type": "object",
    +    "additionalProperties": {
    +      "type": "integer"
         },
       },
    -  "style": "form"
    +  "style": "form"
     }
     
    
    @@ -1594,22 +1825,22 @@
     

    A complex parameter using content to define serialization:

    
     {
    -  "in": "query",
    -  "name": "coordinates",
    -  "content": {
    -    "application/json": {
    -      "schema": {
    -        "type": "object",
    -        "required": [
    -          "lat",
    -          "long"
    +  "in": "query",
    +  "name": "coordinates",
    +  "content": {
    +    "application/json": {
    +      "schema": {
    +        "type": "object",
    +        "required": [
    +          "lat",
    +          "long"
             ],
    -        "properties": {
    -          "lat": {
    -            "type": "number"
    +        "properties": {
    +          "lat": {
    +            "type": "number"
               },
    -          "long": {
    -            "type": "number"
    +          "long": {
    +            "type": "number"
               }
             }
           }
    @@ -1633,9 +1864,9 @@
             long:
               type: number
     
    -

    Request Body Object

    +

    4.7.13 Request Body Object

    Describes a single request body.

    -

    Fixed Fields

    +
    4.7.13.1 Fixed Fields
    @@ -1646,64 +1877,64 @@ - + - + - + - + - +
    descriptiondescription stringA brief description of the request body. This could contain examples of use. CommonMark syntax MAY be used for rich text representation.A brief description of the request body. This could contain examples of use. CommonMark syntax MAY be used for rich text representation.
    contentcontent Map[string, Media Type Object]REQUIRED. The content of the request body. The key is a media type or media type range and the value describes it. For requests that match multiple keys, only the most specific key is applicable. e.g. text/plain overrides text/*REQUIRED. The content of the request body. The key is a media type or media type range and the value describes it. For requests that match multiple keys, only the most specific key is applicable. e.g. text/plain overrides text/*
    requiredrequired boolean Determines if the request body is required in the request. Defaults to false.
    -

    This object MAY be extended with Specification Extensions.

    -

    Request Body Examples

    +

    This object MAY be extended with Specification Extensions.

    +
    4.7.13.2 Request Body Examples

    A request body with a referenced model definition.

    
     {
    -  "description": "user to add to the system",
    -  "content": {
    -    "application/json": {
    -      "schema": {
    -        "$ref": "#/components/schemas/User"
    +  "description": "user to add to the system",
    +  "content": {
    +    "application/json": {
    +      "schema": {
    +        "$ref": "#/components/schemas/User"
           },
    -      "examples": {
    -          "user" : {
    -            "summary": "User Example",
    -            "externalValue": "http://foo.bar/examples/user-example.json"
    +      "examples": {
    +          "user" : {
    +            "summary": "User Example",
    +            "externalValue": "http://foo.bar/examples/user-example.json"
               }
             }
         },
    -    "application/xml": {
    -      "schema": {
    -        "$ref": "#/components/schemas/User"
    +    "application/xml": {
    +      "schema": {
    +        "$ref": "#/components/schemas/User"
           },
    -      "examples": {
    -          "user" : {
    -            "summary": "User example in XML",
    -            "externalValue": "http://foo.bar/examples/user-example.xml"
    +      "examples": {
    +          "user" : {
    +            "summary": "User example in XML",
    +            "externalValue": "http://foo.bar/examples/user-example.xml"
               }
             }
         },
    -    "text/plain": {
    -      "examples": {
    -        "user" : {
    -            "summary": "User example in Plain text",
    -            "externalValue": "http://foo.bar/examples/user-example.txt"
    +    "text/plain": {
    +      "examples": {
    +        "user" : {
    +            "summary": "User example in Plain text",
    +            "externalValue": "http://foo.bar/examples/user-example.txt"
             }
           }
         },
    -    "*/*": {
    -      "examples": {
    -        "user" : {
    -            "summary": "User example in other format",
    -            "externalValue": "http://foo.bar/examples/user-example.whatever"
    +    "*/*": {
    +      "examples": {
    +        "user" : {
    +            "summary": "User example in other format",
    +            "externalValue": "http://foo.bar/examples/user-example.whatever"
             }
           }
         }
    @@ -1713,41 +1944,41 @@
     
    
     description: user to add to the system
     content:
    -  'application/json':
    +  'application/json':
         schema:
    -      $ref: '#/components/schemas/User'
    +      $ref: '#/components/schemas/User'
         examples:
           user:
             summary: User Example
    -        externalValue: 'http://foo.bar/examples/user-example.json'
    -  'application/xml':
    +        externalValue: 'http://foo.bar/examples/user-example.json'
    +  'application/xml':
         schema:
    -      $ref: '#/components/schemas/User'
    +      $ref: '#/components/schemas/User'
         examples:
           user:
             summary: User Example in XML
    -        externalValue: 'http://foo.bar/examples/user-example.xml'
    -  'text/plain':
    +        externalValue: 'http://foo.bar/examples/user-example.xml'
    +  'text/plain':
         examples:
           user:
             summary: User example in text plain format
    -        externalValue: 'http://foo.bar/examples/user-example.txt'
    -  '*/*':
    +        externalValue: 'http://foo.bar/examples/user-example.txt'
    +  '*/*':
         examples:
           user:
             summary: User example in other format
    -        externalValue: 'http://foo.bar/examples/user-example.whatever'
    +        externalValue: 'http://foo.bar/examples/user-example.whatever'
     

    A body parameter that is an array of string values:

    
     {
    -  "description": "user to add to the system",
    -  "content": {
    -    "text/plain": {
    -      "schema": {
    -        "type": "array",
    -        "items": {
    -          "type": "string"
    +  "description": "user to add to the system",
    +  "content": {
    +    "text/plain": {
    +      "schema": {
    +        "type": "array",
    +        "items": {
    +          "type": "string"
             }
           }
         }
    @@ -1764,9 +1995,9 @@
           items:
             type: string
     
    -

    Media Type Object

    +

    4.7.14 Media Type Object

    Each Media Type Object provides schema and examples for the media type identified by its key.

    -

    Fixed Fields

    +
    4.7.14.1 Fixed Fields
    @@ -1777,58 +2008,58 @@ - + - + - + - + - + - + - +
    schemaschema Schema Object | Reference Object The schema defining the content of the request, response, or parameter.
    exampleexample AnyExample of the media type. The example object SHOULD be in the correct format as specified by the media type. The example field is mutually exclusive of the examples field. Furthermore, if referencing a schema which contains an example, the example value SHALL override the example provided by the schema.Example of the media type. The example object SHOULD be in the correct format as specified by the media type. The example field is mutually exclusive of the examples field. Furthermore, if referencing a schema which contains an example, the example value SHALL override the example provided by the schema.
    examplesexamples Map[ string, Example Object | Reference Object]Examples of the media type. Each example object SHOULD match the media type and specified schema if present. The examples field is mutually exclusive of the example field. Furthermore, if referencing a schema which contains an example, the examples value SHALL override the example provided by the schema.Examples of the media type. Each example object SHOULD match the media type and specified schema if present. The examples field is mutually exclusive of the example field. Furthermore, if referencing a schema which contains an example, the examples value SHALL override the example provided by the schema.
    encodingencoding Map[string, Encoding Object]A map between a property name and its encoding information. The key, being the property name, MUST exist in the schema as a property. The encoding object SHALL only apply to requestBody objects when the media type is multipart or application/x-www-form-urlencoded.A map between a property name and its encoding information. The key, being the property name, MUST exist in the schema as a property. The encoding object SHALL only apply to requestBody objects when the media type is multipart or application/x-www-form-urlencoded.
    -

    This object MAY be extended with Specification Extensions.

    -

    Media Type Examples

    +

    This object MAY be extended with Specification Extensions.

    +
    4.7.14.2 Media Type Examples
    
     {
    -  "application/json": {
    -    "schema": {
    -         "$ref": "#/components/schemas/Pet"
    +  "application/json": {
    +    "schema": {
    +         "$ref": "#/components/schemas/Pet"
         },
    -    "examples": {
    -      "cat" : {
    -        "summary": "An example of a cat",
    -        "value":
    +    "examples": {
    +      "cat" : {
    +        "summary": "An example of a cat",
    +        "value":
               {
    -            "name": "Fluffy",
    -            "petType": "Cat",
    -            "color": "White",
    -            "gender": "male",
    -            "breed": "Persian"
    +            "name": "Fluffy",
    +            "petType": "Cat",
    +            "color": "White",
    +            "gender": "male",
    +            "breed": "Persian"
               }
           },
    -      "dog": {
    -        "summary": "An example of a dog with a cat's name",
    -        "value" :  {
    -          "name": "Puma",
    -          "petType": "Dog",
    -          "color": "Black",
    -          "gender": "Female",
    -          "breed": "Mixed"
    +      "dog": {
    +        "summary": "An example of a dog with a cat's name",
    +        "value" :  {
    +          "name": "Puma",
    +          "petType": "Dog",
    +          "color": "Black",
    +          "gender": "Female",
    +          "breed": "Mixed"
             },
    -      "frog": {
    -          "$ref": "#/components/examples/frog-example"
    +      "frog": {
    +          "$ref": "#/components/examples/frog-example"
             }
           }
         }
    @@ -1838,7 +2069,7 @@
     
    
     application/json:
       schema:
    -    $ref: "#/components/schemas/Pet"
    +    $ref: "#/components/schemas/Pet"
       examples:
         cat:
           summary: An example of a cat
    @@ -1849,7 +2080,7 @@
             gender: male
             breed: Persian
         dog:
    -      summary: An example of a dog with a cat's name
    +      summary: An example of a dog with a cat's name
           value:
             name: Puma
             petType: Dog
    @@ -1857,9 +2088,9 @@
             gender: Female
             breed: Mixed
         frog:
    -      $ref: "#/components/examples/frog-example"
    +      $ref: "#/components/examples/frog-example"
     
    -

    Considerations for File Uploads

    +
    4.7.14.3 Considerations for File Uploads

    In contrast with the 2.0 specification, file input/output content in OpenAPI is described with the same semantics as any other schema type. Specifically:

    
     # content transferred with base64 encoding
    @@ -1884,29 +2115,29 @@
             type: string
             format: binary
     
    -

    In addition, specific media types MAY be specified:

    +

    In addition, specific media types MAY be specified:

    
     # multiple, specific media types may be specified:
     requestBody:
       content:
           # a binary file of type png or jpeg
    -    'image/jpeg':
    +    'image/jpeg':
           schema:
             type: string
             format: binary
    -    'image/png':
    +    'image/png':
           schema:
             type: string
             format: binary       
     
    -

    To upload multiple files, a multipart media type MUST be used:

    +

    To upload multiple files, a multipart media type MUST be used:

    
     requestBody:
       content:
         multipart/form-data:
           schema:
             properties:
    -          # The property name 'file' will be used for all files.
    +          # The property name 'file' will be used for all files.
               file:
                 type: array
                 items:
    @@ -1914,8 +2145,8 @@
                   format: binary
     
     
    -

    Support for x-www-form-urlencoded Request Bodies

    -

    To submit content using form url encoding via [[!RFC1866]], the following +

    4.7.14.4 Support for x-www-form-urlencoded Request Bodies
    +

    To submit content using form url encoding via [RFC1866], the following definition may be used:

    
     requestBody:
    @@ -1932,11 +2163,11 @@
                 type: object
                 properties: {}
     
    -

    In this example, the contents in the requestBody MUST be stringified per [[!RFC1866]] when passed to the server. In addition, the address field complex object will be stringified.

    +

    In this example, the contents in the requestBody MUST be stringified per [RFC1866] when passed to the server. In addition, the address field complex object will be stringified.

    When passing complex objects in the application/x-www-form-urlencoded content type, the default serialization strategy of such properties is described in the Encoding Object’s style property as form.

    -

    Special Considerations for multipart Content

    -

    It is common to use multipart/form-data as a Content-Type when transferring request bodies to operations. In contrast to 2.0, a schema is REQUIRED to define the input parameters to the operation when using multipart content. This supports complex structures as well as supporting mechanisms for multiple file uploads.

    -

    When passing in multipart types, boundaries MAY be used to separate sections of the content being transferred — thus, the following default Content-Types are defined for multipart:

    +
    4.7.14.5 Special Considerations for multipart Content
    +

    It is common to use multipart/form-data as a Content-Type when transferring request bodies to operations. In contrast to 2.0, a schema is REQUIRED to define the input parameters to the operation when using multipart content. This supports complex structures as well as supporting mechanisms for multiple file uploads.

    +

    When passing in multipart types, boundaries MAY be used to separate sections of the content being transferred — thus, the following default Content-Types are defined for multipart:

    • If the property is a primitive, or an array of primitive values, the default Content-Type is text/plain
    • If the property is complex, or an array of complex values, the default Content-Type is application/json
    • @@ -1970,12 +2201,12 @@ # default Content-Type for arrays is based on the `inner` type (object shown, so `application/json` in this example) type: array items: - type: '#/components/schemas/Address' + type: '#/components/schemas/Address'

      An encoding attribute is introduced to give you control over the serialization of parts of multipart request bodies. This attribute is only applicable to multipart and application/x-www-form-urlencoded request bodies.

      -

    Encoding Object

    +

    4.7.15 Encoding Object

    A single encoding definition applied to a single schema property.

    -

    Fixed Fields

    +
    4.7.15.1 Fixed Fields
    @@ -1986,34 +2217,34 @@ - + - + - + - + - + - + - + - + - +
    contentTypecontentType string The Content-Type for encoding a specific property. Default value depends on the property type: for string with format being binaryapplication/octet-stream; for other primitive types – text/plain; for object - application/json; for array – the default is defined based on the inner type. The value can be a specific media type (e.g. application/json), a wildcard media type (e.g. image/*), or a comma-separated list of the two types.
    headersheaders Map[string, Header Object | Reference Object]A map allowing additional information to be provided as headers, for example Content-Disposition. Content-Type is described separately and SHALL be ignored in this section. This property SHALL be ignored if the request body media type is not a multipart.A map allowing additional information to be provided as headers, for example Content-Disposition. Content-Type is described separately and SHALL be ignored in this section. This property SHALL be ignored if the request body media type is not a multipart.
    stylestyle stringDescribes how a specific property value will be serialized depending on its type. See Parameter Object for details on the style property. The behavior follows the same values as query parameters, including default values. This property SHALL be ignored if the request body media type is not application/x-www-form-urlencoded.Describes how a specific property value will be serialized depending on its type. See Parameter Object for details on the style property. The behavior follows the same values as query parameters, including default values. This property SHALL be ignored if the request body media type is not application/x-www-form-urlencoded.
    explodeexplode booleanWhen this is true, property values of type array or object generate separate parameters for each value of the array, or key-value-pair of the map. For other types of properties this property has no effect. When style is form, the default value is true. For all other styles, the default value is false. This property SHALL be ignored if the request body media type is not application/x-www-form-urlencoded.When this is true, property values of type array or object generate separate parameters for each value of the array, or key-value-pair of the map. For other types of properties this property has no effect. When style is form, the default value is true. For all other styles, the default value is false. This property SHALL be ignored if the request body media type is not application/x-www-form-urlencoded.
    allowReservedallowReserved booleanDetermines whether the parameter value SHOULD allow reserved characters, as defined by [[!RFC3986]] :/?#[]@!$&'()*+,;= to be included without percent-encoding. The default value is false. This property SHALL be ignored if the request body media type is not application/x-www-form-urlencoded.Determines whether the parameter value SHOULD allow reserved characters, as defined by [RFC3986] :/?#[]@!$&'()*+,;= to be included without percent-encoding. The default value is false. This property SHALL be ignored if the request body media type is not application/x-www-form-urlencoded.
    -

    This object MAY be extended with Specification Extensions.

    -

    Encoding Object Example

    +

    This object MAY be extended with Specification Extensions.

    +
    4.7.15.2 Encoding Object Example
    
     requestBody:
       content:
    @@ -2051,16 +2282,16 @@
                   schema:
                     type: integer
     
    -

    Responses Object

    +

    4.7.16 Responses Object

    A container for the expected responses of an operation. The container maps a HTTP response code to the expected response.

    The documentation is not necessarily expected to cover all possible HTTP response codes because they may not be known in advance. However, documentation is expected to cover a successful operation response and any known errors.

    -

    The default MAY be used as a default response object for all HTTP codes +

    The default MAY be used as a default response object for all HTTP codes that are not covered individually by the specification.

    -

    The Responses Object MUST contain at least one response code, and it -SHOULD be the response for a successful operation call.

    -

    Fixed Fields

    +

    The Responses Object MUST contain at least one response code, and it +SHOULD be the response for a successful operation call.

    +
    4.7.16.1 Fixed Fields
    @@ -2071,13 +2302,13 @@ - +
    defaultdefault Response Object | Reference Object The documentation of responses other than the ones declared for specific HTTP response codes. Use this field to cover undeclared responses. A Reference Object can link to a response that the OpenAPI Object’s components/responses section defines.
    -

    Patterned Fields

    +
    4.7.16.2 Patterned Fields
    @@ -2088,33 +2319,33 @@ - + - +
    HTTP Status CodeHTTP Status Code Response Object | Reference ObjectAny HTTP status code can be used as the property name, but only one property per code, to describe the expected response for that HTTP status code. A Reference Object can link to a response that is defined in the OpenAPI Object’s components/responses section. This field MUST be enclosed in quotation marks (for example, “200”) for compatibility between JSON and YAML. To define a range of response codes, this field MAY contain the uppercase wildcard character X. For example, 2XX represents all response codes between [200-299]. Only the following range definitions are allowed: 1XX, 2XX, 3XX, 4XX, and 5XX. If a response is defined using an explicit code, the explicit code definition takes precedence over the range definition for that code.Any HTTP status code can be used as the property name, but only one property per code, to describe the expected response for that HTTP status code. A Reference Object can link to a response that is defined in the OpenAPI Object’s components/responses section. This field MUST be enclosed in quotation marks (for example, “200”) for compatibility between JSON and YAML. To define a range of response codes, this field MAY contain the uppercase wildcard character X. For example, 2XX represents all response codes between [200-299]. Only the following range definitions are allowed: 1XX, 2XX, 3XX, 4XX, and 5XX. If a response is defined using an explicit code, the explicit code definition takes precedence over the range definition for that code.
    -

    This object MAY be extended with Specification Extensions.

    -

    Responses Object Example

    +

    This object MAY be extended with Specification Extensions.

    +
    4.7.16.3 Responses Object Example

    A 200 response for a successful operation and a default response for others (implying an error):

    
     {
    -  "200": {
    -    "description": "a pet to be returned",
    -    "content": {
    -      "application/json": {
    -        "schema": {
    -          "$ref": "#/components/schemas/Pet"
    +  "200": {
    +    "description": "a pet to be returned",
    +    "content": {
    +      "application/json": {
    +        "schema": {
    +          "$ref": "#/components/schemas/Pet"
             }
           }
         }
       },
    -  "default": {
    -    "description": "Unexpected error",
    -    "content": {
    -      "application/json": {
    -        "schema": {
    -          "$ref": "#/components/schemas/ErrorModel"
    +  "default": {
    +    "description": "Unexpected error",
    +    "content": {
    +      "application/json": {
    +        "schema": {
    +          "$ref": "#/components/schemas/ErrorModel"
             }
           }
         }
    @@ -2122,23 +2353,23 @@
     }
     
    
    -'200':
    +'200':
       description: a pet to be returned
       content:
         application/json:
           schema:
    -        $ref: '#/components/schemas/Pet'
    +        $ref: '#/components/schemas/Pet'
     default:
       description: Unexpected error
       content:
         application/json:
           schema:
    -        $ref: '#/components/schemas/ErrorModel'
    +        $ref: '#/components/schemas/ErrorModel'
     
    -

    Response Object

    +

    4.7.17 Response Object

    Describes a single response from an API Operation, including design-time, static links to operations based on the response.

    -

    Fixed Fields

    +
    4.7.17.1 Fixed Fields
    @@ -2149,39 +2380,39 @@ - + - + - + - + - + - +
    descriptiondescription stringREQUIRED. A short description of the response. CommonMark syntax MAY be used for rich text representation.REQUIRED. A short description of the response. CommonMark syntax MAY be used for rich text representation.
    headersheaders Map[string, Header Object | Reference Object]Maps a header name to its definition. [[!RFC7230]] states header names are case insensitive. If a response header is defined with the name "Content-Type", it SHALL be ignored.Maps a header name to its definition. [RFC7230] states header names are case insensitive. If a response header is defined with the name "Content-Type", it SHALL be ignored.
    contentcontent Map[string, Media Type Object] A map containing descriptions of potential response payloads. The key is a media type or media type range and the value describes it. For responses that match multiple keys, only the most specific key is applicable. e.g. text/plain overrides text/*
    linkslinks Map[string, Link Object | Reference Object] A map of operations links that can be followed from the response. The key of the map is a short name for the link, following the naming constraints of the names for Component Objects.
    -

    This object MAY be extended with Specification Extensions.

    -

    Response Object Examples

    +

    This object MAY be extended with Specification Extensions.

    +
    4.7.17.2 Response Object Examples

    Response of an array of a complex type:

    
     {
    -  "description": "A complex object array response",
    -  "content": {
    -    "application/json": {
    -      "schema": {
    -        "type": "array",
    -        "items": {
    -          "$ref": "#/components/schemas/VeryComplexType"
    +  "description": "A complex object array response",
    +  "content": {
    +    "application/json": {
    +      "schema": {
    +        "type": "array",
    +        "items": {
    +          "$ref": "#/components/schemas/VeryComplexType"
             }
           }
         }
    @@ -2195,16 +2426,16 @@
         schema:
           type: array
           items:
    -        $ref: '#/components/schemas/VeryComplexType'
    +        $ref: '#/components/schemas/VeryComplexType'
     

    Response with a string type:

    
     {
    -  "description": "A simple string response",
    -  "content": {
    -    "text/plain": {
    -      "schema": {
    -        "type": "string"
    +  "description": "A simple string response",
    +  "content": {
    +    "text/plain": {
    +      "schema": {
    +        "type": "string"
           }
         }
       }
    @@ -2221,32 +2452,32 @@
     

    Plain text response with headers:

    
     {
    -  "description": "A simple string response",
    -  "content": {
    -    "text/plain": {
    -      "schema": {
    -        "type": "string",
    -        "example": "whoa!"
    +  "description": "A simple string response",
    +  "content": {
    +    "text/plain": {
    +      "schema": {
    +        "type": "string",
    +        "example": "whoa!"
           }
         }
       },
    -  "headers": {
    -    "X-Rate-Limit-Limit": {
    -      "description": "The number of allowed requests in the current period",
    -      "schema": {
    -        "type": "integer"
    +  "headers": {
    +    "X-Rate-Limit-Limit": {
    +      "description": "The number of allowed requests in the current period",
    +      "schema": {
    +        "type": "integer"
           }
         },
    -    "X-Rate-Limit-Remaining": {
    -      "description": "The number of remaining requests in the current period",
    -      "schema": {
    -        "type": "integer"
    +    "X-Rate-Limit-Remaining": {
    +      "description": "The number of remaining requests in the current period",
    +      "schema": {
    +        "type": "integer"
           }
         },
    -    "X-Rate-Limit-Reset": {
    -      "description": "The number of seconds left in the current period",
    -      "schema": {
    -        "type": "integer"
    +    "X-Rate-Limit-Reset": {
    +      "description": "The number of seconds left in the current period",
    +      "schema": {
    +        "type": "integer"
           }
         }
       }
    @@ -2258,7 +2489,7 @@
       text/plain:
         schema:
           type: string
    -    example: 'whoa!'
    +    example: 'whoa!'
     headers:
       X-Rate-Limit-Limit:
         description: The number of allowed requests in the current period
    @@ -2276,17 +2507,17 @@
     

    Response with no return value:

    
     {
    -  "description": "object created"
    +  "description": "object created"
     }
     
    
     description: object created
     
    -

    Callback Object

    +

    4.7.18 Callback Object

    A map of possible out-of band callbacks related to the parent operation. Each value in the map is a Path Item Object that describes a set of requests that may be initiated by the API provider and the expected responses. The key value used to identify the path item object is an expression, evaluated at runtime, that identifies a URL to use for the callback operation.

    -

    Patterned Fields

    +
    4.7.18.1 Patterned Fields
    @@ -2297,18 +2528,18 @@ - +
    {expression}{expression} Path Item Object A Path Item Object used to define a callback request and expected responses. A complete example is available.
    -

    This object MAY be extended with Specification Extensions.

    -

    Key Expression

    +

    This object MAY be extended with Specification Extensions.

    +
    4.7.18.2 Key Expression

    The key that identifies the Path Item Object is a runtime expression that can be evaluated in the context of a runtime HTTP request/response to identify the URL to be used for the callback request. A simple example might be $request.body#/url. However, using a runtime expression the complete HTTP message can be accessed. -This includes accessing any part of a body that a JSON Pointer [[!RFC6901]] can reference.

    +This includes accessing any part of a body that a JSON Pointer [RFC6901] can reference.

    For example, given the following HTTP request:

    
     POST /subscribe/myevent?queryUrl=http://clientdomain.com/stillrunning HTTP/1.1
    @@ -2317,11 +2548,11 @@
     Content-Length: 187
     
     {
    -  "failedUrl" : "http://clientdomain.com/failed",
    -  "successUrls" : [
    -    "http://clientdomain.com/fast",
    -    "http://clientdomain.com/medium",
    -    "http://clientdomain.com/slow"
    +  "failedUrl" : "http://clientdomain.com/failed",
    +  "successUrls" : [
    +    "http://clientdomain.com/fast",
    +    "http://clientdomain.com/medium",
    +    "http://clientdomain.com/slow"
       ]
     }
     
    @@ -2371,39 +2602,39 @@
     
     
     
    -

    Callback Object Examples

    +
    4.7.18.3 Callback Object Examples

    The following example uses the user provided queryUrl query string parameter to define the callback URL. This is an example of how to use a callback object to describe a WebHook callback that goes with the subscription operation to enable registering for the WebHook.

    
     myCallback:
    -  '{$request.query.queryUrl}':
    +  '{$request.query.queryUrl}':
         post:
           requestBody:
             description: Callback payload
             content:
    -          'application/json':
    +          'application/json':
                 schema:
    -              $ref: '#/components/schemas/SomePayload'
    +              $ref: '#/components/schemas/SomePayload'
           responses:
    -        '200':
    +        '200':
               description: callback successfully processed
     

    The following example shows a callback where the server is hard-coded, but the query string parameters are populated from the id and email property in the request body.

    
     transactionCallback:
    -  'http://notificationServer.com?transactionId={$request.body#/id}&email={$request.body#/email}':
    +  'http://notificationServer.com?transactionId={$request.body#/id}&email={$request.body#/email}':
         post:
           requestBody:
             description: Callback payload
             content:
    -          'application/json':
    +          'application/json':
                 schema:
    -              $ref: '#/components/schemas/SomePayload'
    +              $ref: '#/components/schemas/SomePayload'
           responses:
    -        '200':
    +        '200':
               description: callback successfully processed
     
    -

    Example Object

    -

    Fixed Fields

    +

    4.7.19 Example Object

    +
    4.7.19.1 Fixed Fields
    @@ -2414,88 +2645,88 @@ - + - + - + - + - +
    summarysummary string Short description for the example.
    descriptiondescription stringLong description for the example. CommonMark syntax MAY be used for rich text representation.Long description for the example. CommonMark syntax MAY be used for rich text representation.
    valuevalue Any Embedded literal example. The value field and externalValue field are mutually exclusive. To represent examples of media types that cannot naturally represented in JSON or YAML, use a string value to contain the example, escaping where necessary.
    externalValueexternalValue string A URL that points to the literal example. This provides the capability to reference examples that cannot easily be included in JSON or YAML documents. The value field and externalValue field are mutually exclusive.
    -

    This object MAY be extended with Specification Extensions.

    +

    This object MAY be extended with Specification Extensions.

    In all cases, the example value is expected to be compatible with the type schema -of its associated value. Tooling implementations MAY choose to +of its associated value. Tooling implementations MAY choose to validate compatibility automatically, and reject the example value(s) if incompatible.

    -

    Example Object Examples

    +
    4.7.19.2 Example Object Examples

    In a request body:

    
     requestBody:
       content:
    -    'application/json':
    +    'application/json':
           schema:
    -        $ref: '#/components/schemas/Address'
    +        $ref: '#/components/schemas/Address'
           examples:
             foo:
               summary: A foo example
    -          value: {"foo": "bar"}
    +          value: {"foo": "bar"}
             bar:
               summary: A bar example
    -          value: {"bar": "baz"}
    -    'application/xml':
    +          value: {"bar": "baz"}
    +    'application/xml':
           examples:
             xmlExample:
               summary: This is an example in XML
    -          externalValue: 'http://example.org/examples/address-example.xml'
    -    'text/plain':
    +          externalValue: 'http://example.org/examples/address-example.xml'
    +    'text/plain':
           examples:
             textExample:
               summary: This is a text example
    -          externalValue: 'http://foo.bar/examples/address-example.txt'
    +          externalValue: 'http://foo.bar/examples/address-example.txt'
     

    In a parameter:

    
     parameters:
    -  - name: 'zipCode'
    -    in: 'query'
    +  - name: 'zipCode'
    +    in: 'query'
         schema:
    -      type: 'string'
    -      format: 'zip-code'
    +      type: 'string'
    +      format: 'zip-code'
         examples:
           zip-example:
    -        $ref: '#/components/examples/zip-example'
    +        $ref: '#/components/examples/zip-example'
     

    In a response:

    
     responses:
    -  '200':
    +  '200':
         description: your car appointment has been booked
         content:
           application/json:
             schema:
    -          $ref: '#/components/schemas/SuccessResponse'
    +          $ref: '#/components/schemas/SuccessResponse'
             examples:
               confirmation-success:
    -            $ref: '#/components/examples/confirmation-success'
    +            $ref: '#/components/examples/confirmation-success'
     
    -

    Link Object

    +

    4.7.21 Header Object

    The Header Object follows the structure of the Parameter Object with the following changes:

      -
    1. name MUST NOT be specified, it is given in the corresponding headers map.
    2. -
    3. in MUST NOT be specified, it is implicitly in header.
    4. -
    5. All traits that are affected by the location MUST be applicable to a location of header (for example, style).
    6. +
    7. name MUST NOT be specified, it is given in the corresponding headers map.
    8. +
    9. in MUST NOT be specified, it is implicitly in header.
    10. +
    11. All traits that are affected by the location MUST be applicable to a location of header (for example, style).
    -

    Header Object Example

    +
    4.7.21.1 Header Object Example

    A simple header of type integer:

    
     {
    -  "description": "The number of allowed requests in the current period",
    -  "schema": {
    -    "type": "integer"
    +  "description": "The number of allowed requests in the current period",
    +  "schema": {
    +    "type": "integer"
       }
     }
     
    @@ -2720,10 +2951,10 @@ schema: type: integer
    -

    Tag Object

    +

    4.7.22 Tag Object

    Adds metadata to a single tag that is used by the Operation Object. It is not mandatory to have a Tag Object per tag defined in the Operation Object instances.

    -

    Fixed Fields

    +
    4.7.22.1 Fixed Fields
    @@ -2734,39 +2965,39 @@ - + - + - + - + - +
    namename stringREQUIRED. The name of the tag.REQUIRED. The name of the tag.
    descriptiondescription stringA short description for the tag. CommonMark syntax MAY be used for rich text representation.A short description for the tag. CommonMark syntax MAY be used for rich text representation.
    externalDocsexternalDocs External Documentation Object Additional external documentation for this tag.
    -

    This object MAY be extended with Specification Extensions.

    -

    Tag Object Example

    +

    This object MAY be extended with Specification Extensions.

    +
    4.7.22.2 Tag Object Example
    
     {
    -	"name": "pet",
    -	"description": "Pets operations"
    +	"name": "pet",
    +	"description": "Pets operations"
     }
     
    
     name: pet
     description: Pets operations
     
    -

    Reference Object

    +

    4.7.23 Reference Object

    A simple object to allow referencing other components in the specification, internally and externally.

    The Reference Object is defined by JSON Reference and follows the same structure, behavior and rules.

    For this specification, reference resolution is accomplished as defined by the JSON Reference specification and not by the JSON Schema specification.

    -

    Fixed Fields

    +
    4.7.23.1 Fixed Fields
    @@ -2777,47 +3008,47 @@ - + - +
    $ref$ref stringREQUIRED. The reference string.REQUIRED. The reference string.
    -

    This object cannot be extended with additional properties and any properties added SHALL be ignored.

    -

    Reference Object Example

    +

    This object cannot be extended with additional properties and any properties added SHALL be ignored.

    +
    4.7.23.2 Reference Object Example
    
     {
    -	"$ref": "#/components/schemas/Pet"
    +	"$ref": "#/components/schemas/Pet"
     }
     
    
    -$ref: '#/components/schemas/Pet'
    +$ref: '#/components/schemas/Pet'
     
    -

    Relative Schema Document Example

    +
    4.7.23.3 Relative Schema Document Example
    
     {
    -  "$ref": "Pet.json"
    +  "$ref": "Pet.json"
     }
     
    
     $ref: Pet.yaml
     
    -

    Relative Documents With Embedded Schema Example

    +
    4.7.23.4 Relative Documents With Embedded Schema Example
    
     {
    -  "$ref": "definitions.json#/Pet"
    +  "$ref": "definitions.json#/Pet"
     }
     
    
     $ref: definitions.yaml#/Pet
     
    -

    Schema Object

    +

    4.7.24 Schema Object

    The Schema Object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. This object is an extended subset of the JSON Schema Specification Wright Draft 00.

    For more information about the properties, see JSON Schema Core and JSON Schema Validation. Unless stated otherwise, the property definitions follow the JSON Schema.

    -

    Properties

    +
    4.7.24.1 Properties

    The following properties are taken directly from the JSON Schema definition and follow the same specifications:

    The following properties are taken from the JSON Schema definition but their definitions were adjusted to the OpenAPI Specification.

      -
    • type - Value MUST be a string. Multiple types via an array are not supported.
    • -
    • allOf - Inline or referenced schema MUST be of a Schema Object and not a standard JSON Schema.
    • -
    • oneOf - Inline or referenced schema MUST be of a Schema Object and not a standard JSON Schema.
    • -
    • anyOf - Inline or referenced schema MUST be of a Schema Object and not a standard JSON Schema.
    • -
    • not - Inline or referenced schema MUST be of a Schema Object and not a standard JSON Schema.
    • -
    • items - Value MUST be an object and not an array. Inline or referenced schema MUST be of a Schema Object and not a standard JSON Schema. items MUST be present if the type is array.
    • -
    • properties - Property definitions MUST be a Schema Object and not a standard JSON Schema (inline or referenced).
    • -
    • additionalProperties - Value can be boolean or object. Inline or referenced schema MUST be of a Schema Object and not a standard JSON Schema. Consistent with JSON Schema, additionalProperties defaults to true.
    • -
    • description - CommonMark syntax MAY be used for rich text representation.
    • +
    • type - Value MUST be a string. Multiple types via an array are not supported.
    • +
    • allOf - Inline or referenced schema MUST be of a Schema Object and not a standard JSON Schema.
    • +
    • oneOf - Inline or referenced schema MUST be of a Schema Object and not a standard JSON Schema.
    • +
    • anyOf - Inline or referenced schema MUST be of a Schema Object and not a standard JSON Schema.
    • +
    • not - Inline or referenced schema MUST be of a Schema Object and not a standard JSON Schema.
    • +
    • items - Value MUST be an object and not an array. Inline or referenced schema MUST be of a Schema Object and not a standard JSON Schema. items MUST be present if the type is array.
    • +
    • properties - Property definitions MUST be a Schema Object and not a standard JSON Schema (inline or referenced).
    • +
    • additionalProperties - Value can be boolean or object. Inline or referenced schema MUST be of a Schema Object and not a standard JSON Schema. Consistent with JSON Schema, additionalProperties defaults to true.
    • +
    • description - CommonMark syntax MAY be used for rich text representation.
    • format - See Data Type Formats for further details. While relying on JSON Schema’s defined formats, the OAS offers a few additional predefined formats.
    • -
    • default - The default value represents what would be assumed by the consumer of the input as the value of the schema if one is not provided. Unlike JSON Schema, the value MUST conform to the defined type for the Schema Object defined at the same level. For example, if type is string, then default can be "foo" but cannot be 1.
    • +
    • default - The default value represents what would be assumed by the consumer of the input as the value of the schema if one is not provided. Unlike JSON Schema, the value MUST conform to the defined type for the Schema Object defined at the same level. For example, if type is string, then default can be "foo" but cannot be 1.

    Alternatively, any time a Schema Object can be used, a Reference Object can be used in its place. This allows referencing definitions instead of defining them inline.

    Additional properties defined by the JSON Schema specification that are not mentioned here are strictly unsupported.

    -

    Other than the JSON Schema subset fields, the following fields MAY be used for further schema documentation:

    -

    Fixed Fields

    +

    Other than the JSON Schema subset fields, the following fields MAY be used for further schema documentation:

    +
    4.7.24.2 Fixed Fields
    @@ -2865,94 +3096,94 @@ - + - + - + - + - + - + - + - + - + - + - + - + - +
    nullablenullable booleanA true value adds "null" to the allowed type specified by the type keyword, only if type is explicitly defined within the same Schema Object. Other Schema Object constraints retain their defined behavior, and therefore may disallow the use of null as a value. A false value leaves the specified or default type unmodified. The default value is false.A true value adds "null" to the allowed type specified by the type keyword, only if type is explicitly defined within the same Schema Object. Other Schema Object constraints retain their defined behavior, and therefore may disallow the use of null as a value. A false value leaves the specified or default type unmodified. The default value is false.
    discriminatordiscriminator Discriminator Object Adds support for polymorphism. The discriminator is an object name that is used to differentiate between other schemas which may satisfy the payload description. See Composition and Inheritance for more details.
    readOnlyreadOnly booleanRelevant only for Schema "properties" definitions. Declares the property as “read only”. This means that it MAY be sent as part of a response but SHOULD NOT be sent as part of the request. If the property is marked as readOnly being true and is in the required list, the required will take effect on the response only. A property MUST NOT be marked as both readOnly and writeOnly being true. Default value is false.Relevant only for Schema "properties" definitions. Declares the property as “read only”. This means that it MAY be sent as part of a response but SHOULD NOT be sent as part of the request. If the property is marked as readOnly being true and is in the required list, the required will take effect on the response only. A property MUST NOT be marked as both readOnly and writeOnly being true. Default value is false.
    writeOnlywriteOnly booleanRelevant only for Schema "properties" definitions. Declares the property as “write only”. Therefore, it MAY be sent as part of a request but SHOULD NOT be sent as part of the response. If the property is marked as writeOnly being true and is in the required list, the required will take effect on the request only. A property MUST NOT be marked as both readOnly and writeOnly being true. Default value is false.Relevant only for Schema "properties" definitions. Declares the property as “write only”. Therefore, it MAY be sent as part of a request but SHOULD NOT be sent as part of the response. If the property is marked as writeOnly being true and is in the required list, the required will take effect on the request only. A property MUST NOT be marked as both readOnly and writeOnly being true. Default value is false.
    xmlxml XML ObjectThis MAY be used only on properties schemas. It has no effect on root schemas. Adds additional metadata to describe the XML representation of this property.This MAY be used only on properties schemas. It has no effect on root schemas. Adds additional metadata to describe the XML representation of this property.
    externalDocsexternalDocs External Documentation Object Additional external documentation for this schema.
    exampleexample Any A free-form property to include an example of an instance for this schema. To represent examples that cannot be naturally represented in JSON or YAML, a string value can be used to contain the example with escaping where necessary.
    deprecated deprecated booleanSpecifies that a schema is deprecated and SHOULD be transitioned out of usage. Default value is false.Specifies that a schema is deprecated and SHOULD be transitioned out of usage. Default value is false.
    -

    This object MAY be extended with Specification Extensions.

    -
    Composition and Inheritance (Polymorphism)
    +

    This object MAY be extended with Specification Extensions.

    +
    4.7.24.2.1 Composition and Inheritance (Polymorphism)

    The OpenAPI Specification allows combining and extending model definitions using the allOf property of JSON Schema, in effect offering model composition. allOf takes an array of object definitions that are validated independently but together compose a single object.

    While composition offers model extensibility, it does not imply a hierarchy between the models. To support polymorphism, the OpenAPI Specification adds the discriminator field. When used, the discriminator will be the name of the property that decides which schema definition validates the structure of the model. -As such, the discriminator field MUST be a required field. +As such, the discriminator field MUST be a required field. There are two ways to define the value of a discriminator for an inheriting instance.

    • Use the schema name.
    • Override the schema name by overriding the property with a new value. If a new value exists, this takes precedence over the schema name. As such, inline schema definitions, which do not have a given id, cannot be used in polymorphism.
    -
    XML Modeling
    +
    4.7.24.2.2 XML Modeling

    The xml property allows extra definitions when translating the JSON definition to XML. The XML Object contains additional information about the available options.

    -

    Schema Object Examples

    -
    Primitive Sample
    +
    4.7.24.3 Schema Object Examples
    +
    4.7.24.3.1 Primitive Sample
    
     {
    -  "type": "string",
    -  "format": "email"
    +  "type": "string",
    +  "format": "email"
     }
     
    
     type: string
     format: email
     
    -
    Simple Model
    +
    4.7.24.3.2 Simple Model
    
     {
    -  "type": "object",
    -  "required": [
    -    "name"
    +  "type": "object",
    +  "required": [
    +    "name"
       ],
    -  "properties": {
    -    "name": {
    -      "type": "string"
    +  "properties": {
    +    "name": {
    +      "type": "string"
         },
    -    "address": {
    -      "$ref": "#/components/schemas/Address"
    +    "address": {
    +      "$ref": "#/components/schemas/Address"
         },
    -    "age": {
    -      "type": "integer",
    -      "format": "int32",
    -      "minimum": 0
    +    "age": {
    +      "type": "integer",
    +      "format": "int32",
    +      "minimum": 0
         }
       }
     }
    @@ -2965,19 +3196,19 @@
       name:
         type: string
       address:
    -    $ref: '#/components/schemas/Address'
    +    $ref: '#/components/schemas/Address'
       age:
         type: integer
         format: int32
         minimum: 0
     
    -
    Model with Map/Dictionary Properties
    +
    4.7.24.3.3 Model with Map/Dictionary Properties

    For a simple string to string mapping:

    
     {
    -  "type": "object",
    -  "additionalProperties": {
    -    "type": "string"
    +  "type": "object",
    +  "additionalProperties": {
    +    "type": "string"
       }
     }
     
    @@ -2989,36 +3220,36 @@

    For a string to model mapping:

    
     {
    -  "type": "object",
    -  "additionalProperties": {
    -    "$ref": "#/components/schemas/ComplexModel"
    +  "type": "object",
    +  "additionalProperties": {
    +    "$ref": "#/components/schemas/ComplexModel"
       }
     }
     
    
     type: object
     additionalProperties:
    -  $ref: '#/components/schemas/ComplexModel'
    +  $ref: '#/components/schemas/ComplexModel'
     
    -
    Model with Example
    +
    4.7.24.3.4 Model with Example
    
     {
    -  "type": "object",
    -  "properties": {
    -    "id": {
    -      "type": "integer",
    -      "format": "int64"
    +  "type": "object",
    +  "properties": {
    +    "id": {
    +      "type": "integer",
    +      "format": "int64"
         },
    -    "name": {
    -      "type": "string"
    +    "name": {
    +      "type": "string"
         }
       },
    -  "required": [
    -    "name"
    +  "required": [
    +    "name"
       ],
    -  "example": {
    -    "name": "Puma",
    -    "id": 1
    +  "example": {
    +    "name": "Puma",
    +    "id": 1
       }
     }
     
    @@ -3036,41 +3267,41 @@ name: Puma id: 1
    -
    Models with Composition
    +
    4.7.24.3.5 Models with Composition
    
     {
    -  "components": {
    -    "schemas": {
    -      "ErrorModel": {
    -        "type": "object",
    -        "required": [
    -          "message",
    -          "code"
    +  "components": {
    +    "schemas": {
    +      "ErrorModel": {
    +        "type": "object",
    +        "required": [
    +          "message",
    +          "code"
             ],
    -        "properties": {
    -          "message": {
    -            "type": "string"
    +        "properties": {
    +          "message": {
    +            "type": "string"
               },
    -          "code": {
    -            "type": "integer",
    -            "minimum": 100,
    -            "maximum": 600
    +          "code": {
    +            "type": "integer",
    +            "minimum": 100,
    +            "maximum": 600
               }
             }
           },
    -      "ExtendedErrorModel": {
    -        "allOf": [
    +      "ExtendedErrorModel": {
    +        "allOf": [
               {
    -            "$ref": "#/components/schemas/ErrorModel"
    +            "$ref": "#/components/schemas/ErrorModel"
               },
               {
    -            "type": "object",
    -            "required": [
    -              "rootCause"
    +            "type": "object",
    +            "required": [
    +              "rootCause"
                 ],
    -            "properties": {
    -              "rootCause": {
    -                "type": "string"
    +            "properties": {
    +              "rootCause": {
    +                "type": "string"
                   }
                 }
               }
    @@ -3097,7 +3328,7 @@
               maximum: 600
         ExtendedErrorModel:
           allOf:
    -      - $ref: '#/components/schemas/ErrorModel'
    +      - $ref: '#/components/schemas/ErrorModel'
           - type: object
             required:
             - rootCause
    @@ -3105,75 +3336,75 @@
               rootCause:
                 type: string
     
    -
    Models with Polymorphism Support
    +
    4.7.24.3.6 Models with Polymorphism Support
    
     {
    -  "components": {
    -    "schemas": {
    -      "Pet": {
    -        "type": "object",
    -        "discriminator": {
    -          "propertyName": "petType"
    +  "components": {
    +    "schemas": {
    +      "Pet": {
    +        "type": "object",
    +        "discriminator": {
    +          "propertyName": "petType"
             },
    -        "properties": {
    -          "name": {
    -            "type": "string"
    +        "properties": {
    +          "name": {
    +            "type": "string"
               },
    -          "petType": {
    -            "type": "string"
    +          "petType": {
    +            "type": "string"
               }
             },
    -        "required": [
    -          "name",
    -          "petType"
    +        "required": [
    +          "name",
    +          "petType"
             ]
           },
    -      "Cat": {
    -        "description": "A representation of a cat. Note that `Cat` will be used as the discriminator value.",
    -        "allOf": [
    +      "Cat": {
    +        "description": "A representation of a cat. Note that `Cat` will be used as the discriminator value.",
    +        "allOf": [
               {
    -            "$ref": "#/components/schemas/Pet"
    +            "$ref": "#/components/schemas/Pet"
               },
               {
    -            "type": "object",
    -            "properties": {
    -              "huntingSkill": {
    -                "type": "string",
    -                "description": "The measured skill for hunting",
    -                "default": "lazy",
    -                "enum": [
    -                  "clueless",
    -                  "lazy",
    -                  "adventurous",
    -                  "aggressive"
    +            "type": "object",
    +            "properties": {
    +              "huntingSkill": {
    +                "type": "string",
    +                "description": "The measured skill for hunting",
    +                "default": "lazy",
    +                "enum": [
    +                  "clueless",
    +                  "lazy",
    +                  "adventurous",
    +                  "aggressive"
                     ]
                   }
                 },
    -            "required": [
    -              "huntingSkill"
    +            "required": [
    +              "huntingSkill"
                 ]
               }
             ]
           },
    -      "Dog": {
    -        "description": "A representation of a dog. Note that `Dog` will be used as the discriminator value.",
    -        "allOf": [
    +      "Dog": {
    +        "description": "A representation of a dog. Note that `Dog` will be used as the discriminator value.",
    +        "allOf": [
               {
    -            "$ref": "#/components/schemas/Pet"
    +            "$ref": "#/components/schemas/Pet"
               },
               {
    -            "type": "object",
    -            "properties": {
    -              "packSize": {
    -                "type": "integer",
    -                "format": "int32",
    -                "description": "the size of the pack the dog is from",
    -                "default": 0,
    -                "minimum": 0
    +            "type": "object",
    +            "properties": {
    +              "packSize": {
    +                "type": "integer",
    +                "format": "int32",
    +                "description": "the size of the pack the dog is from",
    +                "default": 0,
    +                "minimum": 0
                   }
                 },
    -            "required": [
    -              "packSize"
    +            "required": [
    +              "packSize"
                 ]
               }
             ]
    @@ -3197,10 +3428,10 @@
           required:
           - name
           - petType
    -    Cat:  ## "Cat" will be used as the discriminator value
    +    Cat:  ## "Cat" will be used as the discriminator value
           description: A representation of a cat
           allOf:
    -      - $ref: '#/components/schemas/Pet'
    +      - $ref: '#/components/schemas/Pet'
           - type: object
             properties:
               huntingSkill:
    @@ -3213,10 +3444,10 @@
                 - aggressive
             required:
             - huntingSkill
    -    Dog:  ## "Dog" will be used as the discriminator value
    +    Dog:  ## "Dog" will be used as the discriminator value
           description: A representation of a dog
           allOf:
    -      - $ref: '#/components/schemas/Pet'
    +      - $ref: '#/components/schemas/Pet'
           - type: object
             properties:
               packSize:
    @@ -3228,10 +3459,10 @@
             required:
             - packSize
     
    -

    Discriminator Object

    +

    4.7.25 Discriminator Object

    When request bodies or response payloads may be one of a number of different schemas, a discriminator object can be used to aid in serialization, deserialization, and validation. The discriminator is a specific object in a schema which is used to inform the consumer of the specification of an alternative schema based on the value associated with it.

    When using the discriminator, inline schemas will not be considered.

    -

    Fixed Fields

    +
    4.7.25.1 Fixed Fields
    @@ -3242,61 +3473,61 @@ - + - + - +
    propertyNamepropertyName stringREQUIRED. The name of the property in the payload that will hold the discriminator value.REQUIRED. The name of the property in the payload that will hold the discriminator value.
    mapping mapping Map[string, string] An object to hold mappings between payload values and schema names or references.

    The discriminator object is legal only when using one of the composite keywords oneOf, anyOf, allOf.

    -

    In OAS 3.0, a response payload MAY be described to be exactly one of any number of types:

    +

    In OAS 3.0, a response payload MAY be described to be exactly one of any number of types:

    
     MyResponseType:
       oneOf:
    -  - $ref: '#/components/schemas/Cat'
    -  - $ref: '#/components/schemas/Dog'
    -  - $ref: '#/components/schemas/Lizard'
    +  - $ref: '#/components/schemas/Cat'
    +  - $ref: '#/components/schemas/Dog'
    +  - $ref: '#/components/schemas/Lizard'
     
    -

    which means the payload MUST, by validation, match exactly one of the schemas described by Cat, Dog, or Lizard. In this case, a discriminator MAY act as a “hint” to shortcut validation and selection of the matching schema which may be a costly operation, depending on the complexity of the schema. We can then describe exactly which field tells us which schema to use:

    +

    which means the payload MUST, by validation, match exactly one of the schemas described by Cat, Dog, or Lizard. In this case, a discriminator MAY act as a “hint” to shortcut validation and selection of the matching schema which may be a costly operation, depending on the complexity of the schema. We can then describe exactly which field tells us which schema to use:

    
     MyResponseType:
       oneOf:
    -  - $ref: '#/components/schemas/Cat'
    -  - $ref: '#/components/schemas/Dog'
    -  - $ref: '#/components/schemas/Lizard'
    +  - $ref: '#/components/schemas/Cat'
    +  - $ref: '#/components/schemas/Dog'
    +  - $ref: '#/components/schemas/Lizard'
       discriminator:
         propertyName: petType
     
    -

    The expectation now is that a property with name petType MUST be present in the response payload, and the value will correspond to the name of a schema defined in the OAS document. Thus the response payload:

    +

    The expectation now is that a property with name petType MUST be present in the response payload, and the value will correspond to the name of a schema defined in the OAS document. Thus the response payload:

    
     {
    -  "id": 12345,
    -  "petType": "Cat"
    +  "id": 12345,
    +  "petType": "Cat"
     }
     

    Will indicate that the Cat schema be used in conjunction with this payload.

    -

    In scenarios where the value of the discriminator field does not match the schema name or implicit mapping is not possible, an optional mapping definition MAY be used:

    +

    In scenarios where the value of the discriminator field does not match the schema name or implicit mapping is not possible, an optional mapping definition MAY be used:

    
     MyResponseType:
       oneOf:
    -  - $ref: '#/components/schemas/Cat'
    -  - $ref: '#/components/schemas/Dog'
    -  - $ref: '#/components/schemas/Lizard'
    -  - $ref: 'https://gigantic-server.com/schemas/Monster/schema.json'
    +  - $ref: '#/components/schemas/Cat'
    +  - $ref: '#/components/schemas/Dog'
    +  - $ref: '#/components/schemas/Lizard'
    +  - $ref: 'https://gigantic-server.com/schemas/Monster/schema.json'
       discriminator:
         propertyName: petType
         mapping:
    -      dog: '#/components/schemas/Dog'
    -      monster: 'https://gigantic-server.com/schemas/Monster/schema.json'
    +      dog: '#/components/schemas/Dog'
    +      monster: 'https://gigantic-server.com/schemas/Monster/schema.json'
     
    -

    Here the discriminator value of dog will map to the schema #/components/schemas/Dog, rather than the default (implicit) value of Dog. If the discriminator value does not match an implicit or explicit mapping, no schema can be determined and validation SHOULD fail. Mapping keys MUST be string values, but tooling MAY convert response values to strings for comparison.

    +

    Here the discriminator value of dog will map to the schema #/components/schemas/Dog, rather than the default (implicit) value of Dog. If the discriminator value does not match an implicit or explicit mapping, no schema can be determined and validation SHOULD fail. Mapping keys MUST be string values, but tooling MAY convert response values to strings for comparison.

    When used in conjunction with the anyOf construct, the use of the discriminator can avoid ambiguity where multiple schemas may satisfy a single payload.

    -

    In both the oneOf and anyOf use cases, all possible schemas MUST be listed explicitly. To avoid redundancy, the discriminator MAY be added to a parent schema definition, and all schemas comprising the parent schema in an allOf construct may be used as an alternate schema.

    +

    In both the oneOf and anyOf use cases, all possible schemas MUST be listed explicitly. To avoid redundancy, the discriminator MAY be added to a parent schema definition, and all schemas comprising the parent schema in an allOf construct may be used as an alternate schema.

    For example:

    
     components:
    @@ -3314,7 +3545,7 @@
               dog: Dog
         Cat:
           allOf:
    -      - $ref: '#/components/schemas/Pet'
    +      - $ref: '#/components/schemas/Pet'
           - type: object
             # all other properties specific to a `Cat`
             properties:
    @@ -3322,7 +3553,7 @@
                 type: string
         Dog:
           allOf:
    -      - $ref: '#/components/schemas/Pet'
    +      - $ref: '#/components/schemas/Pet'
           - type: object
             # all other properties specific to a `Dog`
             properties:
    @@ -3330,7 +3561,7 @@
                 type: string
         Lizard:
           allOf:
    -      - $ref: '#/components/schemas/Pet'
    +      - $ref: '#/components/schemas/Pet'
           - type: object
             # all other properties specific to a `Lizard`
             properties:
    @@ -3340,23 +3571,23 @@
     

    a payload like this:

    
     {
    -  "petType": "Cat",
    -  "name": "misty"
    +  "petType": "Cat",
    +  "name": "misty"
     }
     

    will indicate that the Cat schema be used. Likewise this schema:

    
     {
    -  "petType": "dog",
    -  "bark": "soft"
    +  "petType": "dog",
    +  "bark": "soft"
     }
     

    will map to Dog because of the definition in the mappings element.

    -

    XML Object

    +

    4.7.26 XML Object

    A metadata object that allows for more fine-tuned XML model definitions.

    -

    When using arrays, XML element names are not inferred (for singular/plural forms) and the name property SHOULD be used to add that information. +

    When using arrays, XML element names are not inferred (for singular/plural forms) and the name property SHOULD be used to add that information. See examples for expected behavior.

    -

    Fixed Fields

    +
    4.7.26.1 Fixed Fields
    @@ -3367,41 +3598,41 @@ - + - + - + - + - + - + - +
    namename string Replaces the name of the element/attribute used for the described schema property. When defined within items, it will affect the name of the individual XML elements within the list. When defined alongside type being array (outside the items), it will affect the wrapping element and only if wrapped is true. If wrapped is false, it will be ignored.
    namespacenamespace stringThe URI of the namespace definition. Value MUST be in the form of an absolute URI.The URI of the namespace definition. Value MUST be in the form of an absolute URI.
    prefixprefix string The prefix to be used for the name.
    attributeattribute boolean Declares whether the property definition translates to an attribute instead of an element. Default value is false.
    wrappedwrapped booleanMAY be used only for an array definition. Signifies whether the array is wrapped (for example, <books><book/><book/></books>) or unwrapped (<book/><book/>). Default value is false. The definition takes effect only when defined alongside type being array (outside the items).MAY be used only for an array definition. Signifies whether the array is wrapped (for example, <books><book/><book/></books>) or unwrapped (<book/><book/>). Default value is false. The definition takes effect only when defined alongside type being array (outside the items).
    -

    This object MAY be extended with Specification Extensions.

    -

    XML Object Examples

    +

    This object MAY be extended with Specification Extensions.

    +
    4.7.26.2 XML Object Examples

    The examples of the XML object definitions are included inside a property definition of a Schema Object with a sample of the XML representation of it.

    -
    No XML Element
    +
    4.7.26.2.1 No XML Element

    Basic string property:

    
     {
    -    "animals": {
    -        "type": "string"
    +    "animals": {
    +        "type": "string"
         }
     }
     
    @@ -3415,10 +3646,10 @@

    Basic string array property (wrapped is false by default):

    
     {
    -    "animals": {
    -        "type": "array",
    -        "items": {
    -            "type": "string"
    +    "animals": {
    +        "type": "array",
    +        "items": {
    +            "type": "string"
             }
         }
     }
    @@ -3434,13 +3665,13 @@
     <animals>...</animals>
     <animals>...</animals>
     
    -
    XML Name Replacement
    +
    4.7.26.2.2 XML Name Replacement
    
     {
    -  "animals": {
    -    "type": "string",
    -    "xml": {
    -      "name": "animal"
    +  "animals": {
    +    "type": "string",
    +    "xml": {
    +      "name": "animal"
         }
       }
     }
    @@ -3454,25 +3685,25 @@
     
    
     <animal>...</animal>
     
    -
    XML Attribute, Prefix and Namespace
    +
    4.7.26.2.3 XML Attribute, Prefix and Namespace

    In this example, a full model definition is shown.

    
     {
    -  "Person": {
    -    "type": "object",
    -    "properties": {
    -      "id": {
    -        "type": "integer",
    -        "format": "int32",
    -        "xml": {
    -          "attribute": true
    +  "Person": {
    +    "type": "object",
    +    "properties": {
    +      "id": {
    +        "type": "integer",
    +        "format": "int32",
    +        "xml": {
    +          "attribute": true
             }
           },
    -      "name": {
    -        "type": "string",
    -        "xml": {
    -          "namespace": "http://example.com/schema/sample",
    -          "prefix": "sample"
    +      "name": {
    +        "type": "string",
    +        "xml": {
    +          "namespace": "http://example.com/schema/sample",
    +          "prefix": "sample"
             }
           }
         }
    @@ -3495,20 +3726,20 @@
             prefix: sample
     
    
    -<Person id="123">
    -    <sample:name xmlns:sample="http://example.com/schema/sample">example</sample:name>
    +<Person id="123">
    +    <sample:name xmlns:sample="http://example.com/schema/sample">example</sample:name>
     </Person>
     
    -
    XML Arrays
    +
    4.7.26.2.4 XML Arrays

    Changing the element names:

    
     {
    -  "animals": {
    -    "type": "array",
    -    "items": {
    -      "type": "string",
    -      "xml": {
    -        "name": "animal"
    +  "animals": {
    +    "type": "array",
    +    "items": {
    +      "type": "string",
    +      "xml": {
    +        "name": "animal"
           }
         }
       }
    @@ -3529,16 +3760,16 @@
     

    The external name property has no effect on the XML:

    
     {
    -  "animals": {
    -    "type": "array",
    -    "items": {
    -      "type": "string",
    -      "xml": {
    -        "name": "animal"
    +  "animals": {
    +    "type": "array",
    +    "items": {
    +      "type": "string",
    +      "xml": {
    +        "name": "animal"
           }
         },
    -    "xml": {
    -      "name": "aliens"
    +    "xml": {
    +      "name": "aliens"
         }
       }
     }
    @@ -3560,13 +3791,13 @@
     

    Even when the array is wrapped, if a name is not explicitly defined, the same name will be used both internally and externally:

    
     {
    -  "animals": {
    -    "type": "array",
    -    "items": {
    -      "type": "string"
    +  "animals": {
    +    "type": "array",
    +    "items": {
    +      "type": "string"
         },
    -    "xml": {
    -      "wrapped": true
    +    "xml": {
    +      "wrapped": true
         }
       }
     }
    @@ -3588,16 +3819,16 @@
     

    To overcome the naming problem in the example above, the following definition can be used:

    
     {
    -  "animals": {
    -    "type": "array",
    -    "items": {
    -      "type": "string",
    -      "xml": {
    -        "name": "animal"
    +  "animals": {
    +    "type": "array",
    +    "items": {
    +      "type": "string",
    +      "xml": {
    +        "name": "animal"
           }
         },
    -    "xml": {
    -      "wrapped": true
    +    "xml": {
    +      "wrapped": true
         }
       }
     }
    @@ -3621,17 +3852,17 @@
     

    Affecting both internal and external names:

    
     {
    -  "animals": {
    -    "type": "array",
    -    "items": {
    -      "type": "string",
    -      "xml": {
    -        "name": "animal"
    +  "animals": {
    +    "type": "array",
    +    "items": {
    +      "type": "string",
    +      "xml": {
    +        "name": "animal"
           }
         },
    -    "xml": {
    -      "name": "aliens",
    -      "wrapped": true
    +    "xml": {
    +      "name": "aliens",
    +      "wrapped": true
         }
       }
     }
    @@ -3656,14 +3887,14 @@
     

    If we change the external element but not the internal ones:

    
     {
    -  "animals": {
    -    "type": "array",
    -    "items": {
    -      "type": "string"
    +  "animals": {
    +    "type": "array",
    +    "items": {
    +      "type": "string"
         },
    -    "xml": {
    -      "name": "aliens",
    -      "wrapped": true
    +    "xml": {
    +      "name": "aliens",
    +      "wrapped": true
         }
       }
     }
    @@ -3683,10 +3914,10 @@
       <aliens>value</aliens>
     </aliens>
     
    -

    Security Scheme Object

    +

    4.7.27 Security Scheme Object

    Defines a security scheme that can be used by the operations. -Supported schemes are HTTP authentication, an API key (either as a header, a cookie parameter or as a query parameter), OAuth2’s common flows (implicit, password, client credentials and authorization code) as defined in [[!RFC6749]], and OpenID Connect Discovery.

    -

    Fixed Fields

    +Supported schemes are HTTP authentication, an API key (either as a header, a cookie parameter or as a query parameter), OAuth2’s common flows (implicit, password, client credentials and authorization code) as defined in [RFC6749], and OpenID Connect Discovery.

    +
    4.7.27.1 Fixed Fields
    @@ -3698,74 +3929,74 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
    typetype string AnyREQUIRED. The type of the security scheme. Valid values are "apiKey", "http", "oauth2", "openIdConnect".REQUIRED. The type of the security scheme. Valid values are "apiKey", "http", "oauth2", "openIdConnect".
    descriptiondescription string AnyA short description for security scheme. CommonMark syntax MAY be used for rich text representation.A short description for security scheme. CommonMark syntax MAY be used for rich text representation.
    namename string apiKeyREQUIRED. The name of the header, query or cookie parameter to be used.REQUIRED. The name of the header, query or cookie parameter to be used.
    inin string apiKeyREQUIRED. The location of the API key. Valid values are "query", "header" or "cookie".REQUIRED. The location of the API key. Valid values are "query", "header" or "cookie".
    schemescheme string httpREQUIRED. The name of the HTTP Authorization scheme to be used in the Authorization header as defined in [[!RFC7235]]. The values used SHOULD be registered in the IANA Authentication Scheme registry.REQUIRED. The name of the HTTP Authorization scheme to be used in the Authorization header as defined in [RFC7235]. The values used SHOULD be registered in the IANA Authentication Scheme registry.
    bearerFormatbearerFormat stringhttp ("bearer")http ("bearer") A hint to the client to identify how the bearer token is formatted. Bearer tokens are usually generated by an authorization server, so this information is primarily for documentation purposes.
    flowsflows OAuth Flows Object oauth2REQUIRED. An object containing configuration information for the flow types supported.REQUIRED. An object containing configuration information for the flow types supported.
    openIdConnectUrlopenIdConnectUrl string openIdConnectREQUIRED. OpenId Connect URL to discover OAuth2 configuration values. This MUST be in the form of a URL.REQUIRED. OpenId Connect URL to discover OAuth2 configuration values. This MUST be in the form of a URL.
    -

    This object MAY be extended with Specification Extensions.

    -

    Security Scheme Object Example

    -
    Basic Authentication Sample
    +

    This object MAY be extended with Specification Extensions.

    +
    4.7.27.2 Security Scheme Object Example
    +
    4.7.27.2.1 Basic Authentication Sample
    
     {
    -  "type": "http",
    -  "scheme": "basic"
    +  "type": "http",
    +  "scheme": "basic"
     }
     
    
     type: http
     scheme: basic
     
    -
    API Key Sample
    +
    4.7.27.2.2 API Key Sample
    
     {
    -  "type": "apiKey",
    -  "name": "api_key",
    -  "in": "header"
    +  "type": "apiKey",
    +  "name": "api_key",
    +  "in": "header"
     }
     
    
    @@ -3773,12 +4004,12 @@
     name: api_key
     in: header
     
    -
    JWT Bearer Sample
    +
    4.7.27.2.3 JWT Bearer Sample
    
     {
    -  "type": "http",
    -  "scheme": "bearer",
    -  "bearerFormat": "JWT",
    +  "type": "http",
    +  "scheme": "bearer",
    +  "bearerFormat": "JWT",
     }
     
    
    @@ -3786,16 +4017,16 @@
     scheme: bearer
     bearerFormat: JWT
     
    -
    Implicit OAuth2 Sample
    +
    4.7.27.2.4 Implicit OAuth2 Sample
    
     {
    -  "type": "oauth2",
    -  "flows": {
    -    "implicit": {
    -      "authorizationUrl": "https://example.com/api/oauth/dialog",
    -      "scopes": {
    -        "write:pets": "modify pets in your account",
    -        "read:pets": "read your pets"
    +  "type": "oauth2",
    +  "flows": {
    +    "implicit": {
    +      "authorizationUrl": "https://example.com/api/oauth/dialog",
    +      "scopes": {
    +        "write:pets": "modify pets in your account",
    +        "read:pets": "read your pets"
           }
         }
       }
    @@ -3810,9 +4041,9 @@
           write:pets: modify pets in your account
           read:pets: read your pets
     
    -

    OAuth Flows Object

    +

    4.7.28 OAuth Flows Object

    Allows configuration of the supported OAuth Flows.

    -

    Fixed Fields

    +
    4.7.28.1 Fixed Fields
    @@ -3823,31 +4054,31 @@ - + - + - + - +
    implicitimplicit OAuth Flow Object Configuration for the OAuth Implicit flow
    passwordpassword OAuth Flow Object Configuration for the OAuth Resource Owner Password flow
    clientCredentialsclientCredentials OAuth Flow Object Configuration for the OAuth Client Credentials flow. Previously called application in OpenAPI 2.0.
    authorizationCodeauthorizationCode OAuth Flow Object Configuration for the OAuth Authorization Code flow. Previously called accessCode in OpenAPI 2.0.
    -

    This object MAY be extended with Specification Extensions.

    -

    OAuth Flow Object

    +

    This object MAY be extended with Specification Extensions.

    +

    4.7.29 OAuth Flow Object

    Configuration details for a supported OAuth Flow

    -

    Fixed Fields

    +
    4.7.29.1 Fixed Fields
    @@ -3859,50 +4090,50 @@ - + - - + + - + - - + + - + - + - + - +
    authorizationUrlauthorizationUrl stringoauth2 ("implicit", "authorizationCode")REQUIRED. The authorization URL to be used for this flow. This MUST be in the form of a URL.oauth2 ("implicit", "authorizationCode")REQUIRED. The authorization URL to be used for this flow. This MUST be in the form of a URL.
    tokenUrltokenUrl stringoauth2 ("password", "clientCredentials", "authorizationCode")REQUIRED. The token URL to be used for this flow. This MUST be in the form of a URL.oauth2 ("password", "clientCredentials", "authorizationCode")REQUIRED. The token URL to be used for this flow. This MUST be in the form of a URL.
    refreshUrlrefreshUrl string oauth2The URL to be used for obtaining refresh tokens. This MUST be in the form of a URL.The URL to be used for obtaining refresh tokens. This MUST be in the form of a URL.
    scopesscopes Map[string, string] oauth2REQUIRED. The available scopes for the OAuth2 security scheme. A map between the scope name and a short description for it. The map MAY be empty.REQUIRED. The available scopes for the OAuth2 security scheme. A map between the scope name and a short description for it. The map MAY be empty.
    -

    This object MAY be extended with Specification Extensions.

    -

    OAuth Flow Object Examples

    +

    This object MAY be extended with Specification Extensions.

    +
    4.7.29.2 OAuth Flow Object Examples
    
     {
    -  "type": "oauth2",
    -  "flows": {
    -    "implicit": {
    -      "authorizationUrl": "https://example.com/api/oauth/dialog",
    -      "scopes": {
    -        "write:pets": "modify pets in your account",
    -        "read:pets": "read your pets"
    +  "type": "oauth2",
    +  "flows": {
    +    "implicit": {
    +      "authorizationUrl": "https://example.com/api/oauth/dialog",
    +      "scopes": {
    +        "write:pets": "modify pets in your account",
    +        "read:pets": "read your pets"
           }
         },
    -    "authorizationCode": {
    -      "authorizationUrl": "https://example.com/api/oauth/dialog",
    -      "tokenUrl": "https://example.com/api/oauth/token",
    -      "scopes": {
    -        "write:pets": "modify pets in your account",
    -        "read:pets": "read your pets"
    +    "authorizationCode": {
    +      "authorizationUrl": "https://example.com/api/oauth/dialog",
    +      "tokenUrl": "https://example.com/api/oauth/token",
    +      "scopes": {
    +        "write:pets": "modify pets in your account",
    +        "read:pets": "read your pets"
           }
         }
       }
    @@ -3923,13 +4154,13 @@
           write:pets: modify pets in your account
           read:pets: read your pets
     
    -

    Security Requirement Object

    +

    4.7.30 Security Requirement Object

    Lists the required security schemes to execute this operation. -The name used for each property MUST correspond to a security scheme declared in the Security Schemes under the Components Object.

    -

    Security Requirement Objects that contain multiple schemes require that all schemes MUST be satisfied for a request to be authorized. +The name used for each property MUST correspond to a security scheme declared in the Security Schemes under the Components Object.

    +

    Security Requirement Objects that contain multiple schemes require that all schemes MUST be satisfied for a request to be authorized. This enables support for scenarios where multiple query parameters or HTTP headers are required to convey security information.

    When a list of Security Requirement Objects is defined on the OpenAPI Object or Operation Object, only one of the Security Requirement Objects in the list needs to be satisfied to authorize the request.

    -

    Patterned Fields

    +
    4.7.30.1 Patterned Fields
    @@ -3940,28 +4171,28 @@ - + - +
    {name}{name} [string]Each name MUST correspond to a security scheme which is declared in the Security Schemes under the Components Object. If the security scheme is of type "oauth2" or "openIdConnect", then the value is a list of scope names required for the execution, and the list MAY be empty if authorization does not require a specified scope. For other security scheme types, the array MUST be empty.Each name MUST correspond to a security scheme which is declared in the Security Schemes under the Components Object. If the security scheme is of type "oauth2" or "openIdConnect", then the value is a list of scope names required for the execution, and the list MAY be empty if authorization does not require a specified scope. For other security scheme types, the array MUST be empty.
    -

    Security Requirement Object Examples

    -
    Non-OAuth2 Security Requirement
    +
    4.7.30.2 Security Requirement Object Examples
    +
    4.7.30.2.1 Non-OAuth2 Security Requirement
    
     {
    -  "api_key": []
    +  "api_key": []
     }
     
    
     api_key: []
     
    -
    OAuth2 Security Requirement
    +
    4.7.30.2.2 OAuth2 Security Requirement
    
     {
    -  "petstore_auth": [
    -    "write:pets",
    -    "read:pets"
    +  "petstore_auth": [
    +    "write:pets",
    +    "read:pets"
       ]
     }
     
    @@ -3970,16 +4201,16 @@ - write:pets - read:pets
    -
    Optional OAuth2 Security
    +
    4.7.30.2.3 Optional OAuth2 Security

    Optional OAuth2 security as would be defined in an OpenAPI Object or an Operation Object:

    
     {
    -  "security": [
    +  "security": [
         {},
         {
    -      "petstore_auth": [
    -        "write:pets",
    -        "read:pets"
    +      "petstore_auth": [
    +        "write:pets",
    +        "read:pets"
           ]
         }
       ]
    @@ -3992,9 +4223,9 @@
         - write:pets
         - read:pets
     
    -

    Specification Extensions

    +

    4.8 Specification Extensions

    While the OpenAPI Specification tries to accommodate most use cases, additional data can be added to extend the specification at certain points.

    -

    The extensions properties are implemented as patterned fields that are always prefixed by "x-".

    +

    The extensions properties are implemented as patterned fields that are always prefixed by "x-".

    @@ -4005,23 +4236,23 @@ - + - +
    ^x-^x- AnyAllows extensions to the OpenAPI Schema. The field name MUST begin with x-, for example, x-internal-id. The value can be null, a primitive, an array or an object. Can have any valid JSON format value.Allows extensions to the OpenAPI Schema. The field name MUST begin with x-, for example, x-internal-id. The value can be null, a primitive, an array or an object. Can have any valid JSON format value.

    The extensions may or may not be supported by the available tooling, but those may be extended as well to add requested support (if tools are internal or open-sourced).

    -

    Security Filtering

    -

    Some objects in the OpenAPI Specification MAY be declared and remain empty, or be completely removed, even though they are inherently the core of the API documentation.

    +

    4.9 Security Filtering

    +

    Some objects in the OpenAPI Specification MAY be declared and remain empty, or be completely removed, even though they are inherently the core of the API documentation.

    The reasoning is to allow an additional layer of access control over the documentation. -While not part of the specification itself, certain libraries MAY choose to allow access to parts of the documentation based on some form of authentication/authorization.

    +While not part of the specification itself, certain libraries MAY choose to allow access to parts of the documentation based on some form of authentication/authorization.

    Two examples of this:

      -
    1. The Paths Object MAY be empty. It may be counterintuitive, but this may tell the viewer that they got to the right place, but can’t access any documentation. They’d still have access to the Info Object which may contain additional information regarding authentication.
    2. -
    3. The Path Item Object MAY be empty. In this case, the viewer will be aware that the path exists, but will not be able to see any of its operations or parameters. This is different from hiding the path itself from the Paths Object, because the user will be aware of its existence. This allows the documentation provider to finely control what the viewer can see.
    4. +
    5. The Paths Object MAY be empty. It may be counterintuitive, but this may tell the viewer that they got to the right place, but can’t access any documentation. They’d still have access to the Info Object which may contain additional information regarding authentication.
    6. +
    7. The Path Item Object MAY be empty. In this case, the viewer will be aware that the path exists, but will not be able to see any of its operations or parameters. This is different from hiding the path itself from the Paths Object, because the user will be aware of its existence. This allows the documentation provider to finely control what the viewer can see.
    -

    Appendix A: Revision History

    +

    A. Appendix A: Revision History

    @@ -4094,3 +4325,305 @@
    +

    B. References

    B.1 Normative references

    + +
    [RFC1866]
    + Hypertext Markup Language - 2.0. T. Berners-Lee; D. Connolly. IETF. November 1995. Historic. URL: https://www.rfc-editor.org/rfc/rfc1866 +
    [RFC2119]
    + Key words for use in RFCs to Indicate Requirement Levels. S. Bradner. IETF. March 1997. Best Current Practice. URL: https://www.rfc-editor.org/rfc/rfc2119 +
    [RFC3986]
    + Uniform Resource Identifier (URI): Generic Syntax. T. Berners-Lee; R. Fielding; L. Masinter. IETF. January 2005. Internet Standard. URL: https://www.rfc-editor.org/rfc/rfc3986 +
    [RFC6570]
    + URI Template. J. Gregorio; R. Fielding; M. Hadley; M. Nottingham; D. Orchard. IETF. March 2012. Proposed Standard. URL: https://www.rfc-editor.org/rfc/rfc6570 +
    [RFC6749]
    + The OAuth 2.0 Authorization Framework. D. Hardt, Ed.. IETF. October 2012. Proposed Standard. URL: https://www.rfc-editor.org/rfc/rfc6749 +
    [RFC6838]
    + Media Type Specifications and Registration Procedures. N. Freed; J. Klensin; T. Hansen. IETF. January 2013. Best Current Practice. URL: https://www.rfc-editor.org/rfc/rfc6838 +
    [RFC6901]
    + JavaScript Object Notation (JSON) Pointer. P. Bryan, Ed.; K. Zyp; M. Nottingham, Ed.. IETF. April 2013. Proposed Standard. URL: https://www.rfc-editor.org/rfc/rfc6901 +
    [RFC7159]
    + The JavaScript Object Notation (JSON) Data Interchange Format. T. Bray, Ed.. IETF. March 2014. Proposed Standard. URL: https://www.rfc-editor.org/rfc/rfc7159 +
    [RFC7230]
    + Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing. R. Fielding, Ed.; J. Reschke, Ed.. IETF. June 2014. Proposed Standard. URL: https://httpwg.org/specs/rfc7230.html +
    [RFC7231]
    + Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content. R. Fielding, Ed.; J. Reschke, Ed.. IETF. June 2014. Proposed Standard. URL: https://httpwg.org/specs/rfc7231.html +
    [RFC7235]
    + Hypertext Transfer Protocol (HTTP/1.1): Authentication. R. Fielding, Ed.; J. Reschke, Ed.. IETF. June 2014. Proposed Standard. URL: https://httpwg.org/specs/rfc7235.html +
    [RFC8174]
    + Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words. B. Leiba. IETF. May 2017. Best Current Practice. URL: https://www.rfc-editor.org/rfc/rfc8174 +
    +
    \ No newline at end of file diff --git a/oas/v3.1.0.html b/oas/v3.1.0.html index 897f677f77..4f53076434 100644 --- a/oas/v3.1.0.html +++ b/oas/v3.1.0.html @@ -1,32 +1,263 @@ -OpenAPI Specification v3.1.0 | Introduction, Definitions, & More - + + + + + +OpenAPI Specification v3.1.0 + + + + + + + + -

    OpenAPI Specification v3.1.0

    What is the OpenAPI Specification?

    The OpenAPI Specification (OAS) defines a standard, programming language-agnostic interface description for HTTP APIs, which allows both humans and computers to discover and understand the capabilities of a service without requiring access to source code, additional documentation, or inspection of network traffic. When properly defined via OpenAPI, a consumer can understand and interact with the remote service with a minimal amount of implementation logic. Similar to what interface descriptions have done for lower-level programming, the OpenAPI Specification removes guesswork in calling a service.

    Status of This Document

    The source-of-truth for the specification is the GitHub markdown file referenced above.
    -

    OpenAPI Specification

    -

    Version 3.1.0

    -

    The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “NOT RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in BCP 14 [[!RFC2119]] [[!RFC8174]] when, and only when, they appear in all capitals, as shown here.

    + + + + + +
    +

    +

    OpenAPI Specification v3.1.0

    Version 3.1.0

    +

    +
    + More details about this document +
    + +
    Latest published version:
    + https://spec.openapis.org/oas/latest.html +
    +
    Latest editor's draft:
    https://github.com/OAI/OpenAPI-Specification/
    + + + + + + +
    Editors:
    + Darrel Miller +
    + Jeremy Whitlock +
    + Marsh Gardiner +
    + Mike Ralphson +
    + Ron Ratovsky +
    + Uri Sarid +
    +
    + Former editors: +
    + Jason Harmon +
    + Tony Tam +
    + + + +
    Participate
    + GitHub OAI/OpenAPI-Specification +
    + File a bug +
    + Commit history +
    + Pull requests +
    +
    +
    + + + +
    +

    What is the OpenAPI Specification?

    The OpenAPI Specification (OAS) defines a standard, programming language-agnostic interface description for HTTP APIs, which allows both humans and computers to discover and understand the capabilities of a service without requiring access to source code, additional documentation, or inspection of network traffic. When properly defined via OpenAPI, a consumer can understand and interact with the remote service with a minimal amount of implementation logic. Similar to what interface descriptions have done for lower-level programming, the OpenAPI Specification removes guesswork in calling a service.

    Status of This Document

    The source-of-truth for the specification is the GitHub markdown file referenced above.
    +

    1. OpenAPI Specification

    +

    1.1 Version 3.1.0

    +

    The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “NOT RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.

    This document is licensed under The Apache License, Version 2.0.

    -

    Introduction

    +

    2. Introduction

    The OpenAPI Specification (OAS) defines a standard, language-agnostic interface to HTTP APIs which allows both humans and computers to discover and understand the capabilities of the service without access to source code, documentation, or through network traffic inspection. When properly defined, a consumer can understand and interact with the remote service with a minimal amount of implementation logic.

    An OpenAPI definition can then be used by documentation generation tools to display the API, code generation tools to generate servers and clients in various programming languages, testing tools, and many other use cases.

    - -

    Definitions

    -

    OpenAPI Document

    -

    A self-contained or composite resource which defines or describes an API or elements of an API. The OpenAPI document MUST contain at least one paths field, a components field or a webhooks field. An OpenAPI document uses and conforms to the OpenAPI Specification.

    -

    Path Templating

    + +

    3. Definitions

    +

    3.1 OpenAPI Document

    +

    A self-contained or composite resource which defines or describes an API or elements of an API. The OpenAPI document MUST contain at least one paths field, a components field or a webhooks field. An OpenAPI document uses and conforms to the OpenAPI Specification.

    +

    3.2 Path Templating

    Path templating refers to the usage of template expressions, delimited by curly braces ({}), to mark a section of a URL path as replaceable using path parameters.

    -

    Each template expression in the path MUST correspond to a path parameter that is included in the Path Item itself and/or in each of the Path Item’s Operations. An exception is if the path item is empty, for example due to ACL constraints, matching path parameters are not required.

    -

    The value for these path parameters MUST NOT contain any unescaped “generic syntax” characters described by [[!RFC3986]]: forward slashes (/), question marks (?), or hashes (#).

    -

    Media Types

    +

    Each template expression in the path MUST correspond to a path parameter that is included in the Path Item itself and/or in each of the Path Item’s Operations. An exception is if the path item is empty, for example due to ACL constraints, matching path parameters are not required.

    +

    The value for these path parameters MUST NOT contain any unescaped “generic syntax” characters described by [RFC3986]: forward slashes (/), question marks (?), or hashes (#).

    +

    3.3 Media Types

    Media type definitions are spread across several resources. -The media type definitions SHOULD be in compliance with [[!RFC6838]].

    +The media type definitions SHOULD be in compliance with [RFC6838].

    Some examples of possible media type definitions:

    -
    
    +
    
       text/plain; charset=utf-8
       application/json
       application/vnd.github+json
    @@ -38,40 +269,40 @@
       application/vnd.github.v3.diff
       application/vnd.github.v3.patch
     
    -

    HTTP Status Codes

    +

    3.4 HTTP Status Codes

    The HTTP Status Codes are used to indicate the status of the executed operation. -The available status codes are defined by [[!RFC7231]] and registered status codes are listed in the IANA Status Code Registry.

    -

    Specification

    -

    Versions

    -

    The OpenAPI Specification is versioned using a major.minor.patch versioning scheme. The major.minor portion of the version string (for example 3.1) SHALL designate the OAS feature set. .patch versions address errors in, or provide clarifications to, this document, not the feature set. Tooling which supports OAS 3.1 SHOULD be compatible with all OAS 3.1.* versions. The patch version SHOULD NOT be considered by tooling, making no distinction between 3.1.0 and 3.1.1 for example.

    +The available status codes are defined by [RFC7231] and registered status codes are listed in the IANA Status Code Registry.

    +

    4. Specification

    +

    4.1 Versions

    +

    The OpenAPI Specification is versioned using a major.minor.patch versioning scheme. The major.minor portion of the version string (for example 3.1) SHALL designate the OAS feature set. .patch versions address errors in, or provide clarifications to, this document, not the feature set. Tooling which supports OAS 3.1 SHOULD be compatible with all OAS 3.1.* versions. The patch version SHOULD NOT be considered by tooling, making no distinction between 3.1.0 and 3.1.1 for example.

    Occasionally, non-backwards compatible changes may be made in minor versions of the OAS where impact is believed to be low relative to the benefit provided.

    An OpenAPI document compatible with OAS 3.*.* contains a required openapi field which designates the version of the OAS that it uses.

    -

    Format

    +

    4.2 Format

    An OpenAPI document that conforms to the OpenAPI Specification is itself a JSON object, which may be represented either in JSON or YAML format.

    For example, if a field has an array value, the JSON array representation will be used:

    
     {
    -   "field": [ 1, 2, 3 ]
    +   "field": [ 1, 2, 3 ]
     }
     

    All field names in the specification are case sensitive. This includes all fields that are used as keys in a map, except where explicitly noted that keys are case insensitive.

    The schema exposes two types of fields: Fixed fields, which have a declared name, and Patterned fields, which declare a regex pattern for the field name.

    -

    Patterned fields MUST have unique names within the containing object.

    -

    In order to preserve the ability to round-trip between YAML and JSON formats, YAML version 1.2 is RECOMMENDED along with some additional constraints:

    +

    Patterned fields MUST have unique names within the containing object.

    +

    In order to preserve the ability to round-trip between YAML and JSON formats, YAML version 1.2 is RECOMMENDED along with some additional constraints:

    Note: While APIs may be defined by OpenAPI documents in either YAML or JSON format, the API request and response bodies and other content are not required to be JSON or YAML.

    -

    Document Structure

    -

    An OpenAPI document MAY be made up of a single document or be divided into multiple, connected parts at the discretion of the author. In the latter case, Reference Objects and Schema Object $ref keywords are used.

    -

    It is RECOMMENDED that the root OpenAPI document be named: openapi.json or openapi.yaml.

    -

    Data Types

    +

    4.3 Document Structure

    +

    An OpenAPI document MAY be made up of a single document or be divided into multiple, connected parts at the discretion of the author. In the latter case, Reference Objects and Schema Object $ref keywords are used.

    +

    It is RECOMMENDED that the root OpenAPI document be named: openapi.json or openapi.yaml.

    +

    4.4 Data Types

    Data types in the OAS are based on the types supported by the JSON Schema Specification Draft 2020-12. Note that integer as a type is also supported and is defined as a JSON number without a fraction or exponent part. Models are defined using the Schema Object, which is a superset of JSON Schema Specification Draft 2020-12.

    -

    As defined by the JSON Schema Validation vocabulary, data types can have an optional modifier property: format. +

    As defined by the JSON Schema Validation vocabulary, data types can have an optional modifier property: format. OAS defines additional formats to provide fine detail for primitive data types.

    The formats defined by the OAS are:

    @@ -110,22 +341,22 @@
    -

    Rich Text Formatting

    +

    4.5 Rich Text Formatting

    Throughout the specification description fields are noted as supporting CommonMark markdown formatting. -Where OpenAPI tooling renders rich text it MUST support, at a minimum, markdown syntax as described by CommonMark 0.27. Tooling MAY choose to ignore some CommonMark features to address security concerns.

    -

    Relative References in URIs

    -

    Unless specified otherwise, all properties that are URIs MAY be relative references as defined by [[!RFC3986]].

    -

    Relative references, including those in Reference Objects, PathItem Object $ref fields, Link Object operationRef fields and Example Object externalValue fields, are resolved using the referring document as the Base URI according to [[!RFC3986]].

    -

    If a URI contains a fragment identifier, then the fragment should be resolved per the fragment resolution mechanism of the referenced document. If the representation of the referenced document is JSON or YAML, then the fragment identifier SHOULD be interpreted as a JSON-Pointer as per [[!RFC6901]].

    -

    Relative references in Schema Objects, including any that appear as $id values, use the nearest parent $id as a Base URI, as described by JSON Schema Specification Draft 2020-12. If no parent schema contains an $id, then the Base URI MUST be determined according to [[!RFC3986]].

    -

    Relative References in URLs

    -

    Unless specified otherwise, all properties that are URLs MAY be relative references as defined by [[!RFC3986]]. -Unless specified otherwise, relative references are resolved using the URLs defined in the Server Object as a Base URL. Note that these themselves MAY be relative to the referring document.

    -

    Schema

    -

    In the following description, if a field is not explicitly REQUIRED or described with a MUST or SHALL, it can be considered OPTIONAL.

    -

    OpenAPI Object

    +Where OpenAPI tooling renders rich text it MUST support, at a minimum, markdown syntax as described by CommonMark 0.27. Tooling MAY choose to ignore some CommonMark features to address security concerns.

    +

    4.6 Relative References in URIs

    +

    Unless specified otherwise, all properties that are URIs MAY be relative references as defined by [RFC3986].

    +

    Relative references, including those in Reference Objects, PathItem Object $ref fields, Link Object operationRef fields and Example Object externalValue fields, are resolved using the referring document as the Base URI according to [RFC3986].

    +

    If a URI contains a fragment identifier, then the fragment should be resolved per the fragment resolution mechanism of the referenced document. If the representation of the referenced document is JSON or YAML, then the fragment identifier SHOULD be interpreted as a JSON-Pointer as per [RFC6901].

    +

    Relative references in Schema Objects, including any that appear as $id values, use the nearest parent $id as a Base URI, as described by JSON Schema Specification Draft 2020-12. If no parent schema contains an $id, then the Base URI MUST be determined according to [RFC3986].

    +

    4.7 Relative References in URLs

    +

    Unless specified otherwise, all properties that are URLs MAY be relative references as defined by [RFC3986]. +Unless specified otherwise, relative references are resolved using the URLs defined in the Server Object as a Base URL. Note that these themselves MAY be relative to the referring document.

    +

    4.8 Schema

    +

    In the following description, if a field is not explicitly REQUIRED or described with a MUST or SHALL, it can be considered OPTIONAL.

    +

    4.8.1 OpenAPI Object

    This is the root object of the OpenAPI document.

    -

    Fixed Fields

    +
    4.8.1.1 Fixed Fields
    @@ -136,62 +367,62 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
    openapiopenapi stringREQUIRED. This string MUST be the version number of the OpenAPI Specification that the OpenAPI document uses. The openapi field SHOULD be used by tooling to interpret the OpenAPI document. This is not related to the API info.version string.REQUIRED. This string MUST be the version number of the OpenAPI Specification that the OpenAPI document uses. The openapi field SHOULD be used by tooling to interpret the OpenAPI document. This is not related to the API info.version string.
    infoinfo Info ObjectREQUIRED. Provides metadata about the API. The metadata MAY be used by tooling as required.REQUIRED. Provides metadata about the API. The metadata MAY be used by tooling as required.
    jsonSchemaDialect jsonSchemaDialect stringThe default value for the $schema keyword within Schema Objects contained within this OAS document. This MUST be in the form of a URI.The default value for the $schema keyword within Schema Objects contained within this OAS document. This MUST be in the form of a URI.
    serversservers [Server Object] An array of Server Objects, which provide connectivity information to a target server. If the servers property is not provided, or is an empty array, the default value would be a Server Object with a url value of /.
    pathspaths Paths Object The available paths and operations for the API.
    webhookswebhooks Map[string, Path Item Object | Reference Object] ]The incoming webhooks that MAY be received as part of this API and that the API consumer MAY choose to implement. Closely related to the callbacks feature, this section describes requests initiated other than by an API call, for example by an out of band registration. The key name is a unique string to refer to each webhook, while the (optionally referenced) Path Item Object describes a request that may be initiated by the API provider and the expected responses. An example is available.The incoming webhooks that MAY be received as part of this API and that the API consumer MAY choose to implement. Closely related to the callbacks feature, this section describes requests initiated other than by an API call, for example by an out of band registration. The key name is a unique string to refer to each webhook, while the (optionally referenced) Path Item Object describes a request that may be initiated by the API provider and the expected responses. An example is available.
    componentscomponents Components Object An element to hold various schemas for the document.
    securitysecurity [Security Requirement Object] A declaration of which security mechanisms can be used across the API. The list of values includes alternative security requirement objects that can be used. Only one of the security requirement objects need to be satisfied to authorize a request. Individual operations can override this definition. To make security optional, an empty security requirement ({}) can be included in the array.
    tagstags [Tag Object]A list of tags used by the document with additional metadata. The order of the tags can be used to reflect on their order by the parsing tools. Not all tags that are used by the Operation Object must be declared. The tags that are not declared MAY be organized randomly or based on the tools’ logic. Each tag name in the list MUST be unique.A list of tags used by the document with additional metadata. The order of the tags can be used to reflect on their order by the parsing tools. Not all tags that are used by the Operation Object must be declared. The tags that are not declared MAY be organized randomly or based on the tools’ logic. Each tag name in the list MUST be unique.
    externalDocsexternalDocs External Documentation Object Additional external documentation.
    -

    This object MAY be extended with Specification Extensions.

    -

    Info Object

    +

    This object MAY be extended with Specification Extensions.

    +

    4.8.2 Info Object

    The object provides metadata about the API. -The metadata MAY be used by the clients if needed, and MAY be presented in editing or documentation generation tools for convenience.

    -

    Fixed Fields

    +The metadata MAY be used by the clients if needed, and MAY be presented in editing or documentation generation tools for convenience.

    +
    4.8.2.1 Fixed Fields
    @@ -202,60 +433,60 @@ - + - + - + - + - + - + - + - + - + - + - +
    titletitle stringREQUIRED. The title of the API.REQUIRED. The title of the API.
    summarysummary string A short summary of the API.
    descriptiondescription stringA description of the API. CommonMark syntax MAY be used for rich text representation.A description of the API. CommonMark syntax MAY be used for rich text representation.
    termsOfServicetermsOfService stringA URL to the Terms of Service for the API. This MUST be in the form of a URL.A URL to the Terms of Service for the API. This MUST be in the form of a URL.
    contactcontact Contact Object The contact information for the exposed API.
    licenselicense License Object The license information for the exposed API.
    versionversion stringREQUIRED. The version of the OpenAPI document (which is distinct from the OpenAPI Specification version or the API implementation version).REQUIRED. The version of the OpenAPI document (which is distinct from the OpenAPI Specification version or the API implementation version).
    -

    This object MAY be extended with Specification Extensions.

    -

    Info Object Example

    +

    This object MAY be extended with Specification Extensions.

    +
    4.8.2.2 Info Object Example
    
     {
    -  "title": "Sample Pet Store App",
    -  "summary": "A pet store manager.",
    -  "description": "This is a sample server for a pet store.",
    -  "termsOfService": "https://example.com/terms/",
    -  "contact": {
    -    "name": "API Support",
    -    "url": "https://www.example.com/support",
    -    "email": "support@example.com"
    +  "title": "Sample Pet Store App",
    +  "summary": "A pet store manager.",
    +  "description": "This is a sample server for a pet store.",
    +  "termsOfService": "https://example.com/terms/",
    +  "contact": {
    +    "name": "API Support",
    +    "url": "https://www.example.com/support",
    +    "email": "support@example.com"
       },
    -  "license": {
    -    "name": "Apache 2.0",
    -    "url": "https://www.apache.org/licenses/LICENSE-2.0.html"
    +  "license": {
    +    "name": "Apache 2.0",
    +    "url": "https://www.apache.org/licenses/LICENSE-2.0.html"
       },
    -  "version": "1.0.1"
    +  "version": "1.0.1"
     }
     
    
    @@ -272,9 +503,9 @@
       url: https://www.apache.org/licenses/LICENSE-2.0.html
     version: 1.0.1
     
    -

    Contact Object

    +

    4.8.3 Contact Object

    Contact information for the exposed API.

    -

    Fixed Fields

    +
    4.8.3.1 Fixed Fields
    @@ -285,29 +516,29 @@ - + - + - + - + - +
    namename string The identifying name of the contact person/organization.
    urlurl stringThe URL pointing to the contact information. This MUST be in the form of a URL.The URL pointing to the contact information. This MUST be in the form of a URL.
    emailemail stringThe email address of the contact person/organization. This MUST be in the form of an email address.The email address of the contact person/organization. This MUST be in the form of an email address.
    -

    This object MAY be extended with Specification Extensions.

    -

    Contact Object Example

    +

    This object MAY be extended with Specification Extensions.

    +
    4.8.3.2 Contact Object Example
    
     {
    -  "name": "API Support",
    -  "url": "https://www.example.com/support",
    -  "email": "support@example.com"
    +  "name": "API Support",
    +  "url": "https://www.example.com/support",
    +  "email": "support@example.com"
     }
     
    
    @@ -315,9 +546,9 @@
     url: https://www.example.com/support
     email: support@example.com
     
    -

    License Object

    +

    4.8.4 License Object

    License information for the exposed API.

    -

    Fixed Fields

    +
    4.8.4.1 Fixed Fields
    @@ -328,37 +559,37 @@ - + - + - + - + - +
    namename stringREQUIRED. The license name used for the API.REQUIRED. The license name used for the API.
    identifieridentifier string An SPDX license expression for the API. The identifier field is mutually exclusive of the url field.
    urlurl stringA URL to the license used for the API. This MUST be in the form of a URL. The url field is mutually exclusive of the identifier field.A URL to the license used for the API. This MUST be in the form of a URL. The url field is mutually exclusive of the identifier field.
    -

    This object MAY be extended with Specification Extensions.

    -

    License Object Example

    +

    This object MAY be extended with Specification Extensions.

    +
    4.8.4.2 License Object Example
    
     {
    -  "name": "Apache 2.0",
    -  "identifier": "Apache-2.0"
    +  "name": "Apache 2.0",
    +  "identifier": "Apache-2.0"
     }
     
    
     name: Apache 2.0
     identifier: Apache-2.0
     
    -

    Server Object

    +

    4.8.5 Server Object

    An object representing a Server.

    -

    Fixed Fields

    +
    4.8.5.1 Fixed Fields
    @@ -369,29 +600,29 @@ - + - + - + - + - +
    urlurl stringREQUIRED. A URL to the target host. This URL supports Server Variables and MAY be relative, to indicate that the host location is relative to the location where the OpenAPI document is being served. Variable substitutions will be made when a variable is named in {brackets}.REQUIRED. A URL to the target host. This URL supports Server Variables and MAY be relative, to indicate that the host location is relative to the location where the OpenAPI document is being served. Variable substitutions will be made when a variable is named in {brackets}.
    descriptiondescription stringAn optional string describing the host designated by the URL. CommonMark syntax MAY be used for rich text representation.An optional string describing the host designated by the URL. CommonMark syntax MAY be used for rich text representation.
    variablesvariables Map[string, Server Variable Object] A map between a variable name and its value. The value is used for substitution in the server’s URL template.
    -

    This object MAY be extended with Specification Extensions.

    -

    Server Object Example

    +

    This object MAY be extended with Specification Extensions.

    +
    4.8.5.2 Server Object Example

    A single server would be described as:

    
     {
    -  "url": "https://development.gigantic-server.com/v1",
    -  "description": "Development server"
    +  "url": "https://development.gigantic-server.com/v1",
    +  "description": "Development server"
     }
     
    
    @@ -401,18 +632,18 @@
     

    The following shows how multiple servers can be described, for example, at the OpenAPI Object’s servers:

    
     {
    -  "servers": [
    +  "servers": [
         {
    -      "url": "https://development.gigantic-server.com/v1",
    -      "description": "Development server"
    +      "url": "https://development.gigantic-server.com/v1",
    +      "description": "Development server"
         },
         {
    -      "url": "https://staging.gigantic-server.com/v1",
    -      "description": "Staging server"
    +      "url": "https://staging.gigantic-server.com/v1",
    +      "description": "Staging server"
         },
         {
    -      "url": "https://api.gigantic-server.com/v1",
    -      "description": "Production server"
    +      "url": "https://api.gigantic-server.com/v1",
    +      "description": "Production server"
         }
       ]
     }
    @@ -429,24 +660,24 @@
     

    The following shows how variables can be used for a server configuration:

    
     {
    -  "servers": [
    +  "servers": [
         {
    -      "url": "https://{username}.gigantic-server.com:{port}/{basePath}",
    -      "description": "The production API server",
    -      "variables": {
    -        "username": {
    -          "default": "demo",
    -          "description": "this value is assigned by the service provider, in this example `gigantic-server.com`"
    +      "url": "https://{username}.gigantic-server.com:{port}/{basePath}",
    +      "description": "The production API server",
    +      "variables": {
    +        "username": {
    +          "default": "demo",
    +          "description": "this value is assigned by the service provider, in this example `gigantic-server.com`"
             },
    -        "port": {
    -          "enum": [
    -            "8443",
    -            "443"
    +        "port": {
    +          "enum": [
    +            "8443",
    +            "443"
               ],
    -          "default": "8443"
    +          "default": "8443"
             },
    -        "basePath": {
    -          "default": "v2"
    +        "basePath": {
    +          "default": "v2"
             }
           }
         }
    @@ -464,16 +695,16 @@
           description: this value is assigned by the service provider, in this example `gigantic-server.com`
         port:
           enum:
    -        - '8443'
    -        - '443'
    -      default: '8443'
    +        - '8443'
    +        - '443'
    +      default: '8443'
         basePath:
           # open meaning there is the opportunity to use special base paths as assigned by the provider, default is `v2`
           default: v2
     
    -

    Server Variable Object

    +

    4.8.6 Server Variable Object

    An object representing a Server Variable for server URL template substitution.

    -

    Fixed Fields

    +
    4.8.6.1 Fixed Fields
    @@ -484,27 +715,27 @@ - + - + - + - + - + - +
    enumenum [string]An enumeration of string values to be used if the substitution options are from a limited set. The array MUST NOT be empty.An enumeration of string values to be used if the substitution options are from a limited set. The array MUST NOT be empty.
    defaultdefault stringREQUIRED. The default value to use for substitution, which SHALL be sent if an alternate value is not supplied. Note this behavior is different than the Schema Object’s treatment of default values, because in those cases parameter values are optional. If the enum is defined, the value MUST exist in the enum’s values.REQUIRED. The default value to use for substitution, which SHALL be sent if an alternate value is not supplied. Note this behavior is different than the Schema Object’s treatment of default values, because in those cases parameter values are optional. If the enum is defined, the value MUST exist in the enum’s values.
    descriptiondescription stringAn optional description for the server variable. CommonMark syntax MAY be used for rich text representation.An optional description for the server variable. CommonMark syntax MAY be used for rich text representation.
    -

    This object MAY be extended with Specification Extensions.

    -

    Components Object

    +

    This object MAY be extended with Specification Extensions.

    +

    4.8.7 Components Object

    Holds a set of reusable objects for different aspects of the OAS. All objects defined within the components object will have no effect on the API unless they are explicitly referenced from properties outside the components object.

    -

    Fixed Fields

    +
    4.8.7.1 Fixed Fields
    @@ -515,162 +746,162 @@ - + - + - + - + - + - + - + - + - + - +
    schemas schemas Map[string, Schema Object] An object to hold reusable Schema Objects.
    responses responses Map[string, Response Object | Reference Object] An object to hold reusable Response Objects.
    parameters parameters Map[string, Parameter Object | Reference Object] An object to hold reusable Parameter Objects.
    examples examples Map[string, Example Object | Reference Object] An object to hold reusable Example Objects.
    requestBodies requestBodies Map[string, Request Body Object | Reference Object] An object to hold reusable Request Body Objects.
    headers headers Map[string, Header Object | Reference Object] An object to hold reusable Header Objects.
    securitySchemes securitySchemes Map[string, Security Scheme Object | Reference Object] An object to hold reusable Security Scheme Objects.
    links links Map[string, Link Object | Reference Object] An object to hold reusable Link Objects.
    callbacks callbacks Map[string, Callback Object | Reference Object] An object to hold reusable Callback Objects.
    pathItems pathItems Map[string, Path Item Object | Reference Object] An object to hold reusable Path Item Object.
    -

    This object MAY be extended with Specification Extensions.

    -

    All the fixed fields declared above are objects that MUST use keys that match the regular expression: ^[a-zA-Z0-9\.\-_]+$.

    +

    This object MAY be extended with Specification Extensions.

    +

    All the fixed fields declared above are objects that MUST use keys that match the regular expression: ^[a-zA-Z0-9\.\-_]+$.

    Field Name Examples:

    -
    
    +
    
     User
     User_1
     User_Name
     user-name
     my.org.User
     
    -

    Components Object Example

    +
    4.8.7.2 Components Object Example
    
    -"components": {
    -  "schemas": {
    -    "GeneralError": {
    -      "type": "object",
    -      "properties": {
    -        "code": {
    -          "type": "integer",
    -          "format": "int32"
    +"components": {
    +  "schemas": {
    +    "GeneralError": {
    +      "type": "object",
    +      "properties": {
    +        "code": {
    +          "type": "integer",
    +          "format": "int32"
             },
    -        "message": {
    -          "type": "string"
    +        "message": {
    +          "type": "string"
             }
           }
         },
    -    "Category": {
    -      "type": "object",
    -      "properties": {
    -        "id": {
    -          "type": "integer",
    -          "format": "int64"
    +    "Category": {
    +      "type": "object",
    +      "properties": {
    +        "id": {
    +          "type": "integer",
    +          "format": "int64"
             },
    -        "name": {
    -          "type": "string"
    +        "name": {
    +          "type": "string"
             }
           }
         },
    -    "Tag": {
    -      "type": "object",
    -      "properties": {
    -        "id": {
    -          "type": "integer",
    -          "format": "int64"
    +    "Tag": {
    +      "type": "object",
    +      "properties": {
    +        "id": {
    +          "type": "integer",
    +          "format": "int64"
             },
    -        "name": {
    -          "type": "string"
    +        "name": {
    +          "type": "string"
             }
           }
         }
       },
    -  "parameters": {
    -    "skipParam": {
    -      "name": "skip",
    -      "in": "query",
    -      "description": "number of items to skip",
    -      "required": true,
    -      "schema": {
    -        "type": "integer",
    -        "format": "int32"
    +  "parameters": {
    +    "skipParam": {
    +      "name": "skip",
    +      "in": "query",
    +      "description": "number of items to skip",
    +      "required": true,
    +      "schema": {
    +        "type": "integer",
    +        "format": "int32"
           }
         },
    -    "limitParam": {
    -      "name": "limit",
    -      "in": "query",
    -      "description": "max records to return",
    -      "required": true,
    -      "schema" : {
    -        "type": "integer",
    -        "format": "int32"
    +    "limitParam": {
    +      "name": "limit",
    +      "in": "query",
    +      "description": "max records to return",
    +      "required": true,
    +      "schema" : {
    +        "type": "integer",
    +        "format": "int32"
           }
         }
       },
    -  "responses": {
    -    "NotFound": {
    -      "description": "Entity not found."
    +  "responses": {
    +    "NotFound": {
    +      "description": "Entity not found."
         },
    -    "IllegalInput": {
    -      "description": "Illegal input for operation."
    +    "IllegalInput": {
    +      "description": "Illegal input for operation."
         },
    -    "GeneralError": {
    -      "description": "General Error",
    -      "content": {
    -        "application/json": {
    -          "schema": {
    -            "$ref": "#/components/schemas/GeneralError"
    +    "GeneralError": {
    +      "description": "General Error",
    +      "content": {
    +        "application/json": {
    +          "schema": {
    +            "$ref": "#/components/schemas/GeneralError"
               }
             }
           }
         }
       },
    -  "securitySchemes": {
    -    "api_key": {
    -      "type": "apiKey",
    -      "name": "api_key",
    -      "in": "header"
    +  "securitySchemes": {
    +    "api_key": {
    +      "type": "apiKey",
    +      "name": "api_key",
    +      "in": "header"
         },
    -    "petstore_auth": {
    -      "type": "oauth2",
    -      "flows": {
    -        "implicit": {
    -          "authorizationUrl": "https://example.org/api/oauth/dialog",
    -          "scopes": {
    -            "write:pets": "modify pets in your account",
    -            "read:pets": "read your pets"
    +    "petstore_auth": {
    +      "type": "oauth2",
    +      "flows": {
    +        "implicit": {
    +          "authorizationUrl": "https://example.org/api/oauth/dialog",
    +          "scopes": {
    +            "write:pets": "modify pets in your account",
    +            "read:pets": "read your pets"
               }
             }
           }
    @@ -732,7 +963,7 @@
           content:
             application/json:
               schema:
    -            $ref: '#/components/schemas/GeneralError'
    +            $ref: '#/components/schemas/GeneralError'
       securitySchemes:
         api_key:
           type: apiKey
    @@ -747,10 +978,10 @@
                 write:pets: modify pets in your account
                 read:pets: read your pets
     
    -

    Paths Object

    +

    4.8.8 Paths Object

    Holds the relative paths to the individual endpoints and their operations. -The path is appended to the URL from the Server Object in order to construct the full URL. The Paths MAY be empty, due to Access Control List (ACL) constraints.

    -

    Patterned Fields

    +The path is appended to the URL from the Server Object in order to construct the full URL. The Paths MAY be empty, due to Access Control List (ACL) constraints.

    +
    4.8.8.1 Patterned Fields
    @@ -761,44 +992,44 @@ - + - +
    /{path}/{path} Path Item ObjectA relative path to an individual endpoint. The field name MUST begin with a forward slash (/). The path is appended (no relative URL resolution) to the expanded URL from the Server Object’s url field in order to construct the full URL. Path templating is allowed. When matching URLs, concrete (non-templated) paths would be matched before their templated counterparts. Templated paths with the same hierarchy but different templated names MUST NOT exist as they are identical. In case of ambiguous matching, it’s up to the tooling to decide which one to use.A relative path to an individual endpoint. The field name MUST begin with a forward slash (/). The path is appended (no relative URL resolution) to the expanded URL from the Server Object’s url field in order to construct the full URL. Path templating is allowed. When matching URLs, concrete (non-templated) paths would be matched before their templated counterparts. Templated paths with the same hierarchy but different templated names MUST NOT exist as they are identical. In case of ambiguous matching, it’s up to the tooling to decide which one to use.
    -

    This object MAY be extended with Specification Extensions.

    -

    Path Templating Matching

    +

    This object MAY be extended with Specification Extensions.

    +
    4.8.8.2 Path Templating Matching

    Assuming the following paths, the concrete definition, /pets/mine, will be matched first if used:

    -
    
    +
    
       /pets/{petId}
       /pets/mine
     

    The following paths are considered identical and invalid:

    -
    
    +
    
       /pets/{petId}
       /pets/{name}
     

    The following may lead to ambiguous resolution:

    -
    
    +
    
       /{entity}/me
       /books/{id}
     
    -

    Paths Object Example

    +
    4.8.8.3 Paths Object Example
    
     {
    -  "/pets": {
    -    "get": {
    -      "description": "Returns all pets from the system that the user has access to",
    -      "responses": {
    -        "200": {         
    -          "description": "A list of pets.",
    -          "content": {
    -            "application/json": {
    -              "schema": {
    -                "type": "array",
    -                "items": {
    -                  "$ref": "#/components/schemas/pet"
    +  "/pets": {
    +    "get": {
    +      "description": "Returns all pets from the system that the user has access to",
    +      "responses": {
    +        "200": {         
    +          "description": "A list of pets.",
    +          "content": {
    +            "application/json": {
    +              "schema": {
    +                "type": "array",
    +                "items": {
    +                  "$ref": "#/components/schemas/pet"
                     }
                   }
                 }
    @@ -814,20 +1045,20 @@
       get:
         description: Returns all pets from the system that the user has access to
         responses:
    -      '200':
    +      '200':
             description: A list of pets.
             content:
               application/json:
                 schema:
                   type: array
                   items:
    -                $ref: '#/components/schemas/pet'
    +                $ref: '#/components/schemas/pet'
     
    -

    Path Item Object

    +

    4.8.9 Path Item Object

    Describes the operations available on a single path. -A Path Item MAY be empty, due to ACL constraints. +A Path Item MAY be empty, due to ACL constraints. The path itself is still exposed to the documentation viewer but they will not know which operations and parameters are available.

    -

    Fixed Fields

    +
    4.8.9.1 Fixed Fields
    @@ -838,119 +1069,119 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
    $ref$ref stringAllows for a referenced definition of this path item. The referenced structure MUST be in the form of a Path Item Object. In case a Path Item Object field appears both in the defined object and the referenced object, the behavior is undefined. See the rules for resolving Relative References.Allows for a referenced definition of this path item. The referenced structure MUST be in the form of a Path Item Object. In case a Path Item Object field appears both in the defined object and the referenced object, the behavior is undefined. See the rules for resolving Relative References.
    summarysummary string An optional, string summary, intended to apply to all operations in this path.
    descriptiondescription stringAn optional, string description, intended to apply to all operations in this path. CommonMark syntax MAY be used for rich text representation.An optional, string description, intended to apply to all operations in this path. CommonMark syntax MAY be used for rich text representation.
    getget Operation Object A definition of a GET operation on this path.
    putput Operation Object A definition of a PUT operation on this path.
    postpost Operation Object A definition of a POST operation on this path.
    deletedelete Operation Object A definition of a DELETE operation on this path.
    optionsoptions Operation Object A definition of a OPTIONS operation on this path.
    headhead Operation Object A definition of a HEAD operation on this path.
    patchpatch Operation Object A definition of a PATCH operation on this path.
    tracetrace Operation Object A definition of a TRACE operation on this path.
    serversservers [Server Object] An alternative server array to service all operations in this path.
    parametersparameters [Parameter Object | Reference Object]A list of parameters that are applicable for all the operations described under this path. These parameters can be overridden at the operation level, but cannot be removed there. The list MUST NOT include duplicated parameters. A unique parameter is defined by a combination of a name and location. The list can use the Reference Object to link to parameters that are defined at the OpenAPI Object’s components/parameters.A list of parameters that are applicable for all the operations described under this path. These parameters can be overridden at the operation level, but cannot be removed there. The list MUST NOT include duplicated parameters. A unique parameter is defined by a combination of a name and location. The list can use the Reference Object to link to parameters that are defined at the OpenAPI Object’s components/parameters.
    -

    This object MAY be extended with Specification Extensions.

    -

    Path Item Object Example

    +

    This object MAY be extended with Specification Extensions.

    +
    4.8.9.2 Path Item Object Example
    
     {
    -  "get": {
    -    "description": "Returns pets based on ID",
    -    "summary": "Find pets by ID",
    -    "operationId": "getPetsById",
    -    "responses": {
    -      "200": {
    -        "description": "pet response",
    -        "content": {
    -          "*/*": {
    -            "schema": {
    -              "type": "array",
    -              "items": {
    -                "$ref": "#/components/schemas/Pet"
    +  "get": {
    +    "description": "Returns pets based on ID",
    +    "summary": "Find pets by ID",
    +    "operationId": "getPetsById",
    +    "responses": {
    +      "200": {
    +        "description": "pet response",
    +        "content": {
    +          "*/*": {
    +            "schema": {
    +              "type": "array",
    +              "items": {
    +                "$ref": "#/components/schemas/Pet"
                   }
                 }
               }
             }
           },
    -      "default": {
    -        "description": "error payload",
    -        "content": {
    -          "text/html": {
    -            "schema": {
    -              "$ref": "#/components/schemas/ErrorModel"
    +      "default": {
    +        "description": "error payload",
    +        "content": {
    +          "text/html": {
    +            "schema": {
    +              "$ref": "#/components/schemas/ErrorModel"
                 }
               }
             }
           }
         }
       },
    -  "parameters": [
    +  "parameters": [
         {
    -      "name": "id",
    -      "in": "path",
    -      "description": "ID of pet to use",
    -      "required": true,
    -      "schema": {
    -        "type": "array",
    -        "items": {
    -          "type": "string"
    +      "name": "id",
    +      "in": "path",
    +      "description": "ID of pet to use",
    +      "required": true,
    +      "schema": {
    +        "type": "array",
    +        "items": {
    +          "type": "string"
             }
           },
    -      "style": "simple"
    +      "style": "simple"
         }
       ]
     }
    @@ -961,20 +1192,20 @@
       summary: Find pets by ID
       operationId: getPetsById
       responses:
    -    '200':
    +    '200':
           description: pet response
           content:
    -        '*/*' :
    +        '*/*' :
               schema:
                 type: array
                 items:
    -              $ref: '#/components/schemas/Pet'
    +              $ref: '#/components/schemas/Pet'
         default:
           description: error payload
           content:
    -        'text/html':
    +        'text/html':
               schema:
    -            $ref: '#/components/schemas/ErrorModel'
    +            $ref: '#/components/schemas/ErrorModel'
     parameters:
     - name: id
       in: path
    @@ -986,9 +1217,9 @@
           type: string 
       style: simple
     
    -

    Operation Object

    +

    4.8.10 Operation Object

    Describes a single API operation on a path.

    -

    Fixed Fields

    +
    4.8.10.1 Fixed Fields
    @@ -999,128 +1230,128 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
    tagstags [string] A list of tags for API documentation control. Tags can be used for logical grouping of operations by resources or any other qualifier.
    summarysummary string A short summary of what the operation does.
    descriptiondescription stringA verbose explanation of the operation behavior. CommonMark syntax MAY be used for rich text representation.A verbose explanation of the operation behavior. CommonMark syntax MAY be used for rich text representation.
    externalDocsexternalDocs External Documentation Object Additional external documentation for this operation.
    operationIdoperationId stringUnique string used to identify the operation. The id MUST be unique among all operations described in the API. The operationId value is case-sensitive. Tools and libraries MAY use the operationId to uniquely identify an operation, therefore, it is RECOMMENDED to follow common programming naming conventions.Unique string used to identify the operation. The id MUST be unique among all operations described in the API. The operationId value is case-sensitive. Tools and libraries MAY use the operationId to uniquely identify an operation, therefore, it is RECOMMENDED to follow common programming naming conventions.
    parametersparameters [Parameter Object | Reference Object]A list of parameters that are applicable for this operation. If a parameter is already defined at the Path Item, the new definition will override it but can never remove it. The list MUST NOT include duplicated parameters. A unique parameter is defined by a combination of a name and location. The list can use the Reference Object to link to parameters that are defined at the OpenAPI Object’s components/parameters.A list of parameters that are applicable for this operation. If a parameter is already defined at the Path Item, the new definition will override it but can never remove it. The list MUST NOT include duplicated parameters. A unique parameter is defined by a combination of a name and location. The list can use the Reference Object to link to parameters that are defined at the OpenAPI Object’s components/parameters.
    requestBodyrequestBody Request Body Object | Reference ObjectThe request body applicable for this operation. The requestBody is fully supported in HTTP methods where the HTTP 1.1 specification [[!RFC7231]] has explicitly defined semantics for request bodies. In other cases where the HTTP spec is vague (such as GET, HEAD and DELETE), requestBody is permitted but does not have well-defined semantics and SHOULD be avoided if possible.The request body applicable for this operation. The requestBody is fully supported in HTTP methods where the HTTP 1.1 specification [RFC7231] has explicitly defined semantics for request bodies. In other cases where the HTTP spec is vague (such as GET, HEAD and DELETE), requestBody is permitted but does not have well-defined semantics and SHOULD be avoided if possible.
    responsesresponses Responses Object The list of possible responses as they are returned from executing this operation.
    callbackscallbacks Map[string, Callback Object | Reference Object] A map of possible out-of band callbacks related to the parent operation. The key is a unique identifier for the Callback Object. Each value in the map is a Callback Object that describes a request that may be initiated by the API provider and the expected responses.
    deprecateddeprecated booleanDeclares this operation to be deprecated. Consumers SHOULD refrain from usage of the declared operation. Default value is false.Declares this operation to be deprecated. Consumers SHOULD refrain from usage of the declared operation. Default value is false.
    securitysecurity [Security Requirement Object] A declaration of which security mechanisms can be used for this operation. The list of values includes alternative security requirement objects that can be used. Only one of the security requirement objects need to be satisfied to authorize a request. To make security optional, an empty security requirement ({}) can be included in the array. This definition overrides any declared top-level security. To remove a top-level security declaration, an empty array can be used.
    serversservers [Server Object] An alternative server array to service this operation. If an alternative server object is specified at the Path Item Object or Root level, it will be overridden by this value.
    -

    This object MAY be extended with Specification Extensions.

    -

    Operation Object Example

    +

    This object MAY be extended with Specification Extensions.

    +
    4.8.10.2 Operation Object Example
    
     {
    -  "tags": [
    -    "pet"
    +  "tags": [
    +    "pet"
       ],
    -  "summary": "Updates a pet in the store with form data",
    -  "operationId": "updatePetWithForm",
    -  "parameters": [
    +  "summary": "Updates a pet in the store with form data",
    +  "operationId": "updatePetWithForm",
    +  "parameters": [
         {
    -      "name": "petId",
    -      "in": "path",
    -      "description": "ID of pet that needs to be updated",
    -      "required": true,
    -      "schema": {
    -        "type": "string"
    +      "name": "petId",
    +      "in": "path",
    +      "description": "ID of pet that needs to be updated",
    +      "required": true,
    +      "schema": {
    +        "type": "string"
           }
         }
       ],
    -  "requestBody": {
    -    "content": {
    -      "application/x-www-form-urlencoded": {
    -        "schema": {
    -          "type": "object",
    -          "properties": {
    -            "name": {
    -              "description": "Updated name of the pet",
    -              "type": "string"
    +  "requestBody": {
    +    "content": {
    +      "application/x-www-form-urlencoded": {
    +        "schema": {
    +          "type": "object",
    +          "properties": {
    +            "name": {
    +              "description": "Updated name of the pet",
    +              "type": "string"
                 },
    -            "status": {
    -              "description": "Updated status of the pet",
    -              "type": "string"
    +            "status": {
    +              "description": "Updated status of the pet",
    +              "type": "string"
                 }
               },
    -          "required": ["status"]
    +          "required": ["status"]
             }
           }
         }
       },
    -  "responses": {
    -    "200": {
    -      "description": "Pet updated.",
    -      "content": {
    -        "application/json": {},
    -        "application/xml": {}
    +  "responses": {
    +    "200": {
    +      "description": "Pet updated.",
    +      "content": {
    +        "application/json": {},
    +        "application/xml": {}
           }
         },
    -    "405": {
    -      "description": "Method Not Allowed",
    -      "content": {
    -        "application/json": {},
    -        "application/xml": {}
    +    "405": {
    +      "description": "Method Not Allowed",
    +      "content": {
    +        "application/json": {},
    +        "application/xml": {}
           }
         }
       },
    -  "security": [
    +  "security": [
         {
    -      "petstore_auth": [
    -        "write:pets",
    -        "read:pets"
    +      "petstore_auth": [
    +        "write:pets",
    +        "read:pets"
           ]
         }
       ]
    @@ -1140,7 +1371,7 @@
         type: string
     requestBody:
       content:
    -    'application/x-www-form-urlencoded':
    +    'application/x-www-form-urlencoded':
           schema:
            type: object
            properties:
    @@ -1153,24 +1384,24 @@
            required:
              - status
     responses:
    -  '200':
    +  '200':
         description: Pet updated.
         content:
    -      'application/json': {}
    -      'application/xml': {}
    -  '405':
    +      'application/json': {}
    +      'application/xml': {}
    +  '405':
         description: Method Not Allowed
         content:
    -      'application/json': {}
    -      'application/xml': {}
    +      'application/json': {}
    +      'application/xml': {}
     security:
     - petstore_auth:
       - write:pets
       - read:pets
     
    -

    External Documentation Object

    +

    4.8.11 External Documentation Object

    Allows referencing an external resource for extended documentation.

    -

    Fixed Fields

    +
    4.8.11.1 Fixed Fields
    @@ -1181,41 +1412,41 @@ - + - + - + - +
    descriptiondescription stringA description of the target documentation. CommonMark syntax MAY be used for rich text representation.A description of the target documentation. CommonMark syntax MAY be used for rich text representation.
    urlurl stringREQUIRED. The URL for the target documentation. This MUST be in the form of a URL.REQUIRED. The URL for the target documentation. This MUST be in the form of a URL.
    -

    This object MAY be extended with Specification Extensions.

    -

    External Documentation Object Example

    +

    This object MAY be extended with Specification Extensions.

    +
    4.8.11.2 External Documentation Object Example
    
     {
    -  "description": "Find more info here",
    -  "url": "https://example.com"
    +  "description": "Find more info here",
    +  "url": "https://example.com"
     }
     
    
     description: Find more info here
     url: https://example.com
     
    -

    Parameter Object

    +

    4.8.12 Parameter Object

    Describes a single operation parameter.

    A unique parameter is defined by a combination of a name and location.

    -

    Parameter Locations

    +
    4.8.12.1 Parameter Locations

    There are four possible parameter locations specified by the in field:

    • path - Used together with Path Templating, where the parameter value is actually part of the operation’s URL. This does not include the host or base path of the API. For example, in /items/{itemId}, the path parameter is itemId.
    • query - Parameters that are appended to the URL. For example, in /items?id=###, the query parameter is id.
    • -
    • header - Custom headers that are expected as part of the request. Note that [[!RFC7230]] states header names are case insensitive.
    • +
    • header - Custom headers that are expected as part of the request. Note that [RFC7230] states header names are case insensitive.
    • cookie - Used to pass a specific cookie value to the API.
    -

    Fixed Fields

    +
    4.8.12.2 Fixed Fields
    @@ -1226,34 +1457,34 @@ - + - + - + - + - + - + - + - + - + - + - + - +
    namename stringREQUIRED. The name of the parameter. Parameter names are case sensitive.
    • If in is "path", the name field MUST correspond to a template expression occurring within the path field in the Paths Object. See Path Templating for further information.
    • If in is "header" and the name field is "Accept", "Content-Type" or "Authorization", the parameter definition SHALL be ignored.
    • For all other cases, the name corresponds to the parameter name used by the in property.
    REQUIRED. The name of the parameter. Parameter names are case sensitive.
    • If in is "path", the name field MUST correspond to a template expression occurring within the path field in the Paths Object. See Path Templating for further information.
    • If in is "header" and the name field is "Accept", "Content-Type" or "Authorization", the parameter definition SHALL be ignored.
    • For all other cases, the name corresponds to the parameter name used by the in property.
    inin stringREQUIRED. The location of the parameter. Possible values are "query", "header", "path" or "cookie".REQUIRED. The location of the parameter. Possible values are "query", "header", "path" or "cookie".
    descriptiondescription stringA brief description of the parameter. This could contain examples of use. CommonMark syntax MAY be used for rich text representation.A brief description of the parameter. This could contain examples of use. CommonMark syntax MAY be used for rich text representation.
    requiredrequired booleanDetermines whether this parameter is mandatory. If the parameter location is "path", this property is REQUIRED and its value MUST be true. Otherwise, the property MAY be included and its default value is false.Determines whether this parameter is mandatory. If the parameter location is "path", this property is REQUIRED and its value MUST be true. Otherwise, the property MAY be included and its default value is false.
    deprecated deprecated booleanSpecifies that a parameter is deprecated and SHOULD be transitioned out of usage. Default value is false.Specifies that a parameter is deprecated and SHOULD be transitioned out of usage. Default value is false.
    allowEmptyValue allowEmptyValue booleanSets the ability to pass empty-valued parameters. This is valid only for query parameters and allows sending a parameter with an empty value. Default value is false. If style is used, and if behavior is n/a (cannot be serialized), the value of allowEmptyValue SHALL be ignored. Use of this property is NOT RECOMMENDED, as it is likely to be removed in a later revision.Sets the ability to pass empty-valued parameters. This is valid only for query parameters and allows sending a parameter with an empty value. Default value is false. If style is used, and if behavior is n/a (cannot be serialized), the value of allowEmptyValue SHALL be ignored. Use of this property is NOT RECOMMENDED, as it is likely to be removed in a later revision.
    @@ -1269,40 +1500,40 @@ - style +style string Describes how the parameter value will be serialized depending on the type of the parameter value. Default values (based on value of in): for query - form; for path - simple; for header - simple; for cookie - form. - explode +explode boolean When this is true, parameter values of type array or object generate separate parameters for each value of the array or key-value pair of the map. For other types of parameters this property has no effect. When style is form, the default value is true. For all other styles, the default value is false. - allowReserved +allowReserved boolean -Determines whether the parameter value SHOULD allow reserved characters, as defined by [[!RFC3986]] :/?#[]@!$&'()*+,;= to be included without percent-encoding. This property only applies to parameters with an in value of query. The default value is false. +Determines whether the parameter value SHOULD allow reserved characters, as defined by [RFC3986] :/?#[]@!$&'()*+,;= to be included without percent-encoding. This property only applies to parameters with an in value of query. The default value is false. - schema +schema Schema Object The schema defining the type used for the parameter. - example +example Any -Example of the parameter’s potential value. The example SHOULD match the specified schema and encoding properties if present. The example field is mutually exclusive of the examples field. Furthermore, if referencing a schema that contains an example, the example value SHALL override the example provided by the schema. To represent examples of media types that cannot naturally be represented in JSON or YAML, a string value can contain the example with escaping where necessary. +Example of the parameter’s potential value. The example SHOULD match the specified schema and encoding properties if present. The example field is mutually exclusive of the examples field. Furthermore, if referencing a schema that contains an example, the example value SHALL override the example provided by the schema. To represent examples of media types that cannot naturally be represented in JSON or YAML, a string value can contain the example with escaping where necessary. - examples +examples Map[ string, Example Object | Reference Object] -Examples of the parameter’s potential value. Each example SHOULD contain a value in the correct format as specified in the parameter encoding. The examples field is mutually exclusive of the example field. Furthermore, if referencing a schema that contains an example, the examples value SHALL override the example provided by the schema. +Examples of the parameter’s potential value. Each example SHOULD contain a value in the correct format as specified in the parameter encoding. The examples field is mutually exclusive of the example field. Furthermore, if referencing a schema that contains an example, the examples value SHALL override the example provided by the schema.

    For more complex scenarios, the content property can define the media type and schema of the parameter. -A parameter MUST contain either a schema property, or a content property, but not both. -When example or examples are provided in conjunction with the schema object, the example MUST follow the prescribed serialization strategy for the parameter.

    +A parameter MUST contain either a schema property, or a content property, but not both. +When example or examples are provided in conjunction with the schema object, the example MUST follow the prescribed serialization strategy for the parameter.

    @@ -1313,13 +1544,13 @@ - + - +
    contentcontent Map[string, Media Type Object]A map containing the representations for the parameter. The key is the media type and the value describes it. The map MUST only contain one entry.A map containing the representations for the parameter. The key is the media type and the value describes it. The map MUST only contain one entry.
    -

    Style Values

    +
    4.8.12.3 Style Values

    In order to support common ways of serializing simple parameters, a set of style values are defined.

    @@ -1335,25 +1566,25 @@ - + - + - + - + @@ -1375,12 +1606,12 @@
    matrix primitive, array, object pathPath-style parameters defined by [[!RFC6570]]Path-style parameters defined by [RFC6570]
    label primitive, array, object pathLabel style parameters defined by [[!RFC6570]]Label style parameters defined by [RFC6570]
    form primitive, array, object query, cookieForm style parameters defined by [[!RFC6570]]. This option replaces collectionFormat with a csv (when explode is false) or multi (when explode is true) value from OpenAPI 2.0.Form style parameters defined by [RFC6570]. This option replaces collectionFormat with a csv (when explode is false) or multi (when explode is true) value from OpenAPI 2.0.
    simple array path, headerSimple style parameters defined by [[!RFC6570]]. This option replaces collectionFormat with a csv value from OpenAPI 2.0.Simple style parameters defined by [RFC6570]. This option replaces collectionFormat with a csv value from OpenAPI 2.0.
    spaceDelimited
    -

    Style Examples

    +
    4.8.12.4 Style Examples

    Assume a parameter named color has one of the following values:

    -
    
    -   string -> "blue"
    -   array -> ["blue","black","brown"]
    -   object -> { "R": 100, "G": 200, "B": 150 }
    +
    
    +   string -> "blue"
    +   array -> ["blue","black","brown"]
    +   object -> { "R": 100, "G": 200, "B": 150 }
     

    The following table shows examples of rendering differences for each value.

    @@ -1481,27 +1712,27 @@ - +
    n/a n/a n/acolor[R]=100&color[G]=200&color[B]=150color[R]=100&color[G]=200&color[B]=150
    -

    This object MAY be extended with Specification Extensions.

    -

    Parameter Object Examples

    +

    This object MAY be extended with Specification Extensions.

    +
    4.8.12.5 Parameter Object Examples

    A header parameter with an array of 64 bit integer numbers:

    
     {
    -  "name": "token",
    -  "in": "header",
    -  "description": "token to be passed as a header",
    -  "required": true,
    -  "schema": {
    -    "type": "array",
    -    "items": {
    -      "type": "integer",
    -      "format": "int64"
    +  "name": "token",
    +  "in": "header",
    +  "description": "token to be passed as a header",
    +  "required": true,
    +  "schema": {
    +    "type": "array",
    +    "items": {
    +      "type": "integer",
    +      "format": "int64"
         }
       },
    -  "style": "simple"
    +  "style": "simple"
     }
     
    
    @@ -1519,12 +1750,12 @@
     

    A path parameter of a string value:

    
     {
    -  "name": "username",
    -  "in": "path",
    -  "description": "username to fetch",
    -  "required": true,
    -  "schema": {
    -    "type": "string"
    +  "name": "username",
    +  "in": "path",
    +  "description": "username to fetch",
    +  "required": true,
    +  "schema": {
    +    "type": "string"
       }
     }
     
    @@ -1539,18 +1770,18 @@

    An optional query parameter of a string value, allowing multiple values by repeating the query parameter:

    
     {
    -  "name": "id",
    -  "in": "query",
    -  "description": "ID of the object to fetch",
    -  "required": false,
    -  "schema": {
    -    "type": "array",
    -    "items": {
    -      "type": "string"
    +  "name": "id",
    +  "in": "query",
    +  "description": "ID of the object to fetch",
    +  "required": false,
    +  "schema": {
    +    "type": "array",
    +    "items": {
    +      "type": "string"
         }
       },
    -  "style": "form",
    -  "explode": true
    +  "style": "form",
    +  "explode": true
     }
     
    
    @@ -1568,15 +1799,15 @@
     

    A free-form query parameter, allowing undefined parameters of a specific type:

    
     {
    -  "in": "query",
    -  "name": "freeForm",
    -  "schema": {
    -    "type": "object",
    -    "additionalProperties": {
    -      "type": "integer"
    +  "in": "query",
    +  "name": "freeForm",
    +  "schema": {
    +    "type": "object",
    +    "additionalProperties": {
    +      "type": "integer"
         },
       },
    -  "style": "form"
    +  "style": "form"
     }
     
    
    @@ -1591,22 +1822,22 @@
     

    A complex parameter using content to define serialization:

    
     {
    -  "in": "query",
    -  "name": "coordinates",
    -  "content": {
    -    "application/json": {
    -      "schema": {
    -        "type": "object",
    -        "required": [
    -          "lat",
    -          "long"
    +  "in": "query",
    +  "name": "coordinates",
    +  "content": {
    +    "application/json": {
    +      "schema": {
    +        "type": "object",
    +        "required": [
    +          "lat",
    +          "long"
             ],
    -        "properties": {
    -          "lat": {
    -            "type": "number"
    +        "properties": {
    +          "lat": {
    +            "type": "number"
               },
    -          "long": {
    -            "type": "number"
    +          "long": {
    +            "type": "number"
               }
             }
           }
    @@ -1630,9 +1861,9 @@
             long:
               type: number
     
    -

    Request Body Object

    +

    4.8.13 Request Body Object

    Describes a single request body.

    -

    Fixed Fields

    +
    4.8.13.1 Fixed Fields
    @@ -1643,64 +1874,64 @@ - + - + - + - + - +
    descriptiondescription stringA brief description of the request body. This could contain examples of use. CommonMark syntax MAY be used for rich text representation.A brief description of the request body. This could contain examples of use. CommonMark syntax MAY be used for rich text representation.
    contentcontent Map[string, Media Type Object]REQUIRED. The content of the request body. The key is a media type or media type range and the value describes it. For requests that match multiple keys, only the most specific key is applicable. e.g. text/plain overrides text/*REQUIRED. The content of the request body. The key is a media type or media type range and the value describes it. For requests that match multiple keys, only the most specific key is applicable. e.g. text/plain overrides text/*
    requiredrequired boolean Determines if the request body is required in the request. Defaults to false.
    -

    This object MAY be extended with Specification Extensions.

    -

    Request Body Examples

    +

    This object MAY be extended with Specification Extensions.

    +
    4.8.13.2 Request Body Examples

    A request body with a referenced model definition.

    
     {
    -  "description": "user to add to the system",
    -  "content": {
    -    "application/json": {
    -      "schema": {
    -        "$ref": "#/components/schemas/User"
    +  "description": "user to add to the system",
    +  "content": {
    +    "application/json": {
    +      "schema": {
    +        "$ref": "#/components/schemas/User"
           },
    -      "examples": {
    -          "user" : {
    -            "summary": "User Example",
    -            "externalValue": "https://foo.bar/examples/user-example.json"
    +      "examples": {
    +          "user" : {
    +            "summary": "User Example",
    +            "externalValue": "https://foo.bar/examples/user-example.json"
               }
             }
         },
    -    "application/xml": {
    -      "schema": {
    -        "$ref": "#/components/schemas/User"
    +    "application/xml": {
    +      "schema": {
    +        "$ref": "#/components/schemas/User"
           },
    -      "examples": {
    -          "user" : {
    -            "summary": "User example in XML",
    -            "externalValue": "https://foo.bar/examples/user-example.xml"
    +      "examples": {
    +          "user" : {
    +            "summary": "User example in XML",
    +            "externalValue": "https://foo.bar/examples/user-example.xml"
               }
             }
         },
    -    "text/plain": {
    -      "examples": {
    -        "user" : {
    -            "summary": "User example in Plain text",
    -            "externalValue": "https://foo.bar/examples/user-example.txt"
    +    "text/plain": {
    +      "examples": {
    +        "user" : {
    +            "summary": "User example in Plain text",
    +            "externalValue": "https://foo.bar/examples/user-example.txt"
             }
           }
         },
    -    "*/*": {
    -      "examples": {
    -        "user" : {
    -            "summary": "User example in other format",
    -            "externalValue": "https://foo.bar/examples/user-example.whatever"
    +    "*/*": {
    +      "examples": {
    +        "user" : {
    +            "summary": "User example in other format",
    +            "externalValue": "https://foo.bar/examples/user-example.whatever"
             }
           }
         }
    @@ -1710,42 +1941,42 @@
     
    
     description: user to add to the system
     content:
    -  'application/json':
    +  'application/json':
         schema:
    -      $ref: '#/components/schemas/User'
    +      $ref: '#/components/schemas/User'
         examples:
           user:
             summary: User Example
    -        externalValue: 'https://foo.bar/examples/user-example.json'
    -  'application/xml':
    +        externalValue: 'https://foo.bar/examples/user-example.json'
    +  'application/xml':
         schema:
    -      $ref: '#/components/schemas/User'
    +      $ref: '#/components/schemas/User'
         examples:
           user:
             summary: User example in XML
    -        externalValue: 'https://foo.bar/examples/user-example.xml'
    -  'text/plain':
    +        externalValue: 'https://foo.bar/examples/user-example.xml'
    +  'text/plain':
         examples:
           user:
             summary: User example in Plain text
    -        externalValue: 'https://foo.bar/examples/user-example.txt'
    -  '*/*':
    +        externalValue: 'https://foo.bar/examples/user-example.txt'
    +  '*/*':
         examples:
           user:
             summary: User example in other format
    -        externalValue: 'https://foo.bar/examples/user-example.whatever'
    +        externalValue: 'https://foo.bar/examples/user-example.whatever'
     

    A body parameter that is an array of string values:

    
     {
    -  "description": "user to add to the system",
    -  "required": true,
    -  "content": {
    -    "text/plain": {
    -      "schema": {
    -        "type": "array",
    -        "items": {
    -          "type": "string"
    +  "description": "user to add to the system",
    +  "required": true,
    +  "content": {
    +    "text/plain": {
    +      "schema": {
    +        "type": "array",
    +        "items": {
    +          "type": "string"
             }
           }
         }
    @@ -1762,9 +1993,9 @@
           items:
             type: string
     
    -

    Media Type Object

    +

    4.8.14 Media Type Object

    Each Media Type Object provides schema and examples for the media type identified by its key.

    -

    Fixed Fields

    +
    4.8.14.1 Fixed Fields
    @@ -1775,58 +2006,58 @@ - + - + - + - + - + - + - +
    schemaschema Schema Object The schema defining the content of the request, response, or parameter.
    exampleexample AnyExample of the media type. The example object SHOULD be in the correct format as specified by the media type. The example field is mutually exclusive of the examples field. Furthermore, if referencing a schema which contains an example, the example value SHALL override the example provided by the schema.Example of the media type. The example object SHOULD be in the correct format as specified by the media type. The example field is mutually exclusive of the examples field. Furthermore, if referencing a schema which contains an example, the example value SHALL override the example provided by the schema.
    examplesexamples Map[ string, Example Object | Reference Object]Examples of the media type. Each example object SHOULD match the media type and specified schema if present. The examples field is mutually exclusive of the example field. Furthermore, if referencing a schema which contains an example, the examples value SHALL override the example provided by the schema.Examples of the media type. Each example object SHOULD match the media type and specified schema if present. The examples field is mutually exclusive of the example field. Furthermore, if referencing a schema which contains an example, the examples value SHALL override the example provided by the schema.
    encodingencoding Map[string, Encoding Object]A map between a property name and its encoding information. The key, being the property name, MUST exist in the schema as a property. The encoding object SHALL only apply to requestBody objects when the media type is multipart or application/x-www-form-urlencoded.A map between a property name and its encoding information. The key, being the property name, MUST exist in the schema as a property. The encoding object SHALL only apply to requestBody objects when the media type is multipart or application/x-www-form-urlencoded.
    -

    This object MAY be extended with Specification Extensions.

    -

    Media Type Examples

    +

    This object MAY be extended with Specification Extensions.

    +
    4.8.14.2 Media Type Examples
    
     {
    -  "application/json": {
    -    "schema": {
    -         "$ref": "#/components/schemas/Pet"
    +  "application/json": {
    +    "schema": {
    +         "$ref": "#/components/schemas/Pet"
         },
    -    "examples": {
    -      "cat" : {
    -        "summary": "An example of a cat",
    -        "value":
    +    "examples": {
    +      "cat" : {
    +        "summary": "An example of a cat",
    +        "value":
               {
    -            "name": "Fluffy",
    -            "petType": "Cat",
    -            "color": "White",
    -            "gender": "male",
    -            "breed": "Persian"
    +            "name": "Fluffy",
    +            "petType": "Cat",
    +            "color": "White",
    +            "gender": "male",
    +            "breed": "Persian"
               }
           },
    -      "dog": {
    -        "summary": "An example of a dog with a cat's name",
    -        "value" :  {
    -          "name": "Puma",
    -          "petType": "Dog",
    -          "color": "Black",
    -          "gender": "Female",
    -          "breed": "Mixed"
    +      "dog": {
    +        "summary": "An example of a dog with a cat's name",
    +        "value" :  {
    +          "name": "Puma",
    +          "petType": "Dog",
    +          "color": "Black",
    +          "gender": "Female",
    +          "breed": "Mixed"
             },
    -      "frog": {
    -          "$ref": "#/components/examples/frog-example"
    +      "frog": {
    +          "$ref": "#/components/examples/frog-example"
             }
           }
         }
    @@ -1836,7 +2067,7 @@
     
    
     application/json:
       schema:
    -    $ref: "#/components/schemas/Pet"
    +    $ref: "#/components/schemas/Pet"
       examples:
         cat:
           summary: An example of a cat
    @@ -1847,7 +2078,7 @@
             gender: male
             breed: Persian
         dog:
    -      summary: An example of a dog with a cat's name
    +      summary: An example of a dog with a cat's name
           value:
             name: Puma
             petType: Dog
    @@ -1855,14 +2086,14 @@
             gender: Female
             breed: Mixed
         frog:
    -      $ref: "#/components/examples/frog-example"
    +      $ref: "#/components/examples/frog-example"
     
    -

    Considerations for File Uploads

    +
    4.8.14.3 Considerations for File Uploads

    In contrast with the 2.0 specification, file input/output content in OpenAPI is described with the same semantics as any other schema type.

    -

    In contrast with the 3.0 specification, the format keyword has no effect on the content-encoding of the schema. JSON Schema offers a contentEncoding keyword, which may be used to specify the Content-Encoding for the schema. The contentEncoding keyword supports all encodings defined in [[!RFC4648]], including “base64” and “base64url”, as well as “quoted-printable” from [[!RFC2045]]. The encoding specified by the contentEncoding keyword is independent of an encoding specified by the Content-Type header in the request or response or metadata of a multipart body – when both are present, the encoding specified in the contentEncoding is applied first and then the encoding specified in the Content-Type header.

    -

    JSON Schema also offers a contentMediaType keyword. However, when the media type is already specified by the Media Type Object’s key, or by the contentType field of an Encoding Object, the contentMediaType keyword SHALL be ignored if present.

    +

    In contrast with the 3.0 specification, the format keyword has no effect on the content-encoding of the schema. JSON Schema offers a contentEncoding keyword, which may be used to specify the Content-Encoding for the schema. The contentEncoding keyword supports all encodings defined in [RFC4648], including “base64” and “base64url”, as well as “quoted-printable” from [RFC2045]. The encoding specified by the contentEncoding keyword is independent of an encoding specified by the Content-Type header in the request or response or metadata of a multipart body – when both are present, the encoding specified in the contentEncoding is applied first and then the encoding specified in the Content-Type header.

    +

    JSON Schema also offers a contentMediaType keyword. However, when the media type is already specified by the Media Type Object’s key, or by the contentType field of an Encoding Object, the contentMediaType keyword SHALL be ignored if present.

    Examples:

    -

    Content transferred in binary (octet-stream) MAY omit schema:

    +

    Content transferred in binary (octet-stream) MAY omit schema:

    
     # a PNG image as a binary file:
     content:
    @@ -1890,7 +2121,7 @@
       content:
         application/octet-stream: {}
     
    -

    In addition, specific media types MAY be specified:

    +

    In addition, specific media types MAY be specified:

    
     # multiple, specific media types may be specified:
     requestBody:
    @@ -1899,21 +2130,21 @@
         image/jpeg: {}
         image/png: {}
     
    -

    To upload multiple files, a multipart media type MUST be used:

    +

    To upload multiple files, a multipart media type MUST be used:

    
     requestBody:
       content:
         multipart/form-data:
           schema:
             properties:
    -          # The property name 'file' will be used for all files.
    +          # The property name 'file' will be used for all files.
               file:
                 type: array
                 items: {}
     

    As seen in the section on multipart/form-data below, the empty schema for items indicates a media type of application/octet-stream.

    -

    Support for x-www-form-urlencoded Request Bodies

    -

    To submit content using form url encoding via [[!RFC1866]], the following +

    4.8.14.4 Support for x-www-form-urlencoded Request Bodies
    +

    To submit content using form url encoding via [RFC1866], the following definition may be used:

    
     requestBody:
    @@ -1930,12 +2161,12 @@
                 type: object
                 properties: {}
     
    -

    In this example, the contents in the requestBody MUST be stringified per [[!RFC1866]] when passed to the server. In addition, the address field complex object will be stringified.

    +

    In this example, the contents in the requestBody MUST be stringified per [RFC1866] when passed to the server. In addition, the address field complex object will be stringified.

    When passing complex objects in the application/x-www-form-urlencoded content type, the default serialization strategy of such properties is described in the Encoding Object’s style property as form.

    -

    Special Considerations for multipart Content

    -

    It is common to use multipart/form-data as a Content-Type when transferring request bodies to operations. In contrast to 2.0, a schema is REQUIRED to define the input parameters to the operation when using multipart content. This supports complex structures as well as supporting mechanisms for multiple file uploads.

    -

    In a multipart/form-data request body, each schema property, or each element of a schema array property, takes a section in the payload with an internal header as defined by [[!RFC7578]]. The serialization strategy for each property of a multipart/form-data request body can be specified in an associated Encoding Object.

    -

    When passing in multipart types, boundaries MAY be used to separate sections of the content being transferred – thus, the following default Content-Types are defined for multipart:

    +
    4.8.14.5 Special Considerations for multipart Content
    +

    It is common to use multipart/form-data as a Content-Type when transferring request bodies to operations. In contrast to 2.0, a schema is REQUIRED to define the input parameters to the operation when using multipart content. This supports complex structures as well as supporting mechanisms for multiple file uploads.

    +

    In a multipart/form-data request body, each schema property, or each element of a schema array property, takes a section in the payload with an internal header as defined by [RFC7578]. The serialization strategy for each property of a multipart/form-data request body can be specified in an associated Encoding Object.

    +

    When passing in multipart types, boundaries MAY be used to separate sections of the content being transferred – thus, the following default Content-Types are defined for multipart:

    • If the property is a primitive, or an array of primitive values, the default Content-Type is text/plain
    • If the property is complex, or an array of complex values, the default Content-Type is application/json
    • @@ -1972,12 +2203,12 @@ type: array items: type: object - $ref: '#/components/schemas/Address' + $ref: '#/components/schemas/Address'

      An encoding attribute is introduced to give you control over the serialization of parts of multipart request bodies. This attribute is only applicable to multipart and application/x-www-form-urlencoded request bodies.

      -

    Encoding Object

    +

    4.8.15 Encoding Object

    A single encoding definition applied to a single schema property.

    -

    Fixed Fields

    +
    4.8.15.1 Fixed Fields
    @@ -1988,34 +2219,34 @@ - + - + - + - + - + - + - + - + - +
    contentTypecontentType string The Content-Type for encoding a specific property. Default value depends on the property type: for object - application/json; for array – the default is defined based on the inner type; for all other cases the default is application/octet-stream. The value can be a specific media type (e.g. application/json), a wildcard media type (e.g. image/*), or a comma-separated list of the two types.
    headersheaders Map[string, Header Object | Reference Object]A map allowing additional information to be provided as headers, for example Content-Disposition. Content-Type is described separately and SHALL be ignored in this section. This property SHALL be ignored if the request body media type is not a multipart.A map allowing additional information to be provided as headers, for example Content-Disposition. Content-Type is described separately and SHALL be ignored in this section. This property SHALL be ignored if the request body media type is not a multipart.
    stylestyle stringDescribes how a specific property value will be serialized depending on its type. See Parameter Object for details on the style property. The behavior follows the same values as query parameters, including default values. This property SHALL be ignored if the request body media type is not application/x-www-form-urlencoded or multipart/form-data. If a value is explicitly defined, then the value of contentType (implicit or explicit) SHALL be ignored.Describes how a specific property value will be serialized depending on its type. See Parameter Object for details on the style property. The behavior follows the same values as query parameters, including default values. This property SHALL be ignored if the request body media type is not application/x-www-form-urlencoded or multipart/form-data. If a value is explicitly defined, then the value of contentType (implicit or explicit) SHALL be ignored.
    explodeexplode booleanWhen this is true, property values of type array or object generate separate parameters for each value of the array, or key-value-pair of the map. For other types of properties this property has no effect. When style is form, the default value is true. For all other styles, the default value is false. This property SHALL be ignored if the request body media type is not application/x-www-form-urlencoded or multipart/form-data. If a value is explicitly defined, then the value of contentType (implicit or explicit) SHALL be ignored.When this is true, property values of type array or object generate separate parameters for each value of the array, or key-value-pair of the map. For other types of properties this property has no effect. When style is form, the default value is true. For all other styles, the default value is false. This property SHALL be ignored if the request body media type is not application/x-www-form-urlencoded or multipart/form-data. If a value is explicitly defined, then the value of contentType (implicit or explicit) SHALL be ignored.
    allowReservedallowReserved booleanDetermines whether the parameter value SHOULD allow reserved characters, as defined by [[!RFC3986]] :/?#[]@!$&'()*+,;= to be included without percent-encoding. The default value is false. This property SHALL be ignored if the request body media type is not application/x-www-form-urlencoded or multipart/form-data. If a value is explicitly defined, then the value of contentType (implicit or explicit) SHALL be ignored.Determines whether the parameter value SHOULD allow reserved characters, as defined by [RFC3986] :/?#[]@!$&'()*+,;= to be included without percent-encoding. The default value is false. This property SHALL be ignored if the request body media type is not application/x-www-form-urlencoded or multipart/form-data. If a value is explicitly defined, then the value of contentType (implicit or explicit) SHALL be ignored.
    -

    This object MAY be extended with Specification Extensions.

    -

    Encoding Object Example

    +

    This object MAY be extended with Specification Extensions.

    +
    4.8.15.2 Encoding Object Example
    
     requestBody:
       content:
    @@ -2050,17 +2281,17 @@
                   schema:
                     type: integer
     
    -

    Responses Object

    +

    4.8.16 Responses Object

    A container for the expected responses of an operation. The container maps a HTTP response code to the expected response.

    The documentation is not necessarily expected to cover all possible HTTP response codes because they may not be known in advance. However, documentation is expected to cover a successful operation response and any known errors.

    -

    The default MAY be used as a default response object for all HTTP codes +

    The default MAY be used as a default response object for all HTTP codes that are not covered individually by the Responses Object.

    -

    The Responses Object MUST contain at least one response code, and if only one -response code is provided it SHOULD be the response for a successful operation +

    The Responses Object MUST contain at least one response code, and if only one +response code is provided it SHOULD be the response for a successful operation call.

    -

    Fixed Fields

    +
    4.8.16.1 Fixed Fields
    @@ -2071,13 +2302,13 @@ - +
    defaultdefault Response Object | Reference Object The documentation of responses other than the ones declared for specific HTTP response codes. Use this field to cover undeclared responses.
    -

    Patterned Fields

    +
    4.8.16.2 Patterned Fields
    @@ -2088,33 +2319,33 @@ - + - +
    HTTP Status CodeHTTP Status Code Response Object | Reference ObjectAny HTTP status code can be used as the property name, but only one property per code, to describe the expected response for that HTTP status code. This field MUST be enclosed in quotation marks (for example, “200”) for compatibility between JSON and YAML. To define a range of response codes, this field MAY contain the uppercase wildcard character X. For example, 2XX represents all response codes between [200-299]. Only the following range definitions are allowed: 1XX, 2XX, 3XX, 4XX, and 5XX. If a response is defined using an explicit code, the explicit code definition takes precedence over the range definition for that code.Any HTTP status code can be used as the property name, but only one property per code, to describe the expected response for that HTTP status code. This field MUST be enclosed in quotation marks (for example, “200”) for compatibility between JSON and YAML. To define a range of response codes, this field MAY contain the uppercase wildcard character X. For example, 2XX represents all response codes between [200-299]. Only the following range definitions are allowed: 1XX, 2XX, 3XX, 4XX, and 5XX. If a response is defined using an explicit code, the explicit code definition takes precedence over the range definition for that code.
    -

    This object MAY be extended with Specification Extensions.

    -

    Responses Object Example

    +

    This object MAY be extended with Specification Extensions.

    +
    4.8.16.3 Responses Object Example

    A 200 response for a successful operation and a default response for others (implying an error):

    
     {
    -  "200": {
    -    "description": "a pet to be returned",
    -    "content": {
    -      "application/json": {
    -        "schema": {
    -          "$ref": "#/components/schemas/Pet"
    +  "200": {
    +    "description": "a pet to be returned",
    +    "content": {
    +      "application/json": {
    +        "schema": {
    +          "$ref": "#/components/schemas/Pet"
             }
           }
         }
       },
    -  "default": {
    -    "description": "Unexpected error",
    -    "content": {
    -      "application/json": {
    -        "schema": {
    -          "$ref": "#/components/schemas/ErrorModel"
    +  "default": {
    +    "description": "Unexpected error",
    +    "content": {
    +      "application/json": {
    +        "schema": {
    +          "$ref": "#/components/schemas/ErrorModel"
             }
           }
         }
    @@ -2122,23 +2353,23 @@
     }
     
    
    -'200':
    +'200':
       description: a pet to be returned
       content:
         application/json:
           schema:
    -        $ref: '#/components/schemas/Pet'
    +        $ref: '#/components/schemas/Pet'
     default:
       description: Unexpected error
       content:
         application/json:
           schema:
    -        $ref: '#/components/schemas/ErrorModel'
    +        $ref: '#/components/schemas/ErrorModel'
     
    -

    Response Object

    +

    4.8.17 Response Object

    Describes a single response from an API Operation, including design-time, static links to operations based on the response.

    -

    Fixed Fields

    +
    4.8.17.1 Fixed Fields
    @@ -2149,39 +2380,39 @@ - + - + - + - + - + - +
    descriptiondescription stringREQUIRED. A description of the response. CommonMark syntax MAY be used for rich text representation.REQUIRED. A description of the response. CommonMark syntax MAY be used for rich text representation.
    headersheaders Map[string, Header Object | Reference Object]Maps a header name to its definition. [[!RFC7230]] states header names are case insensitive. If a response header is defined with the name "Content-Type", it SHALL be ignored.Maps a header name to its definition. [RFC7230] states header names are case insensitive. If a response header is defined with the name "Content-Type", it SHALL be ignored.
    contentcontent Map[string, Media Type Object] A map containing descriptions of potential response payloads. The key is a media type or media type range and the value describes it. For responses that match multiple keys, only the most specific key is applicable. e.g. text/plain overrides text/*
    linkslinks Map[string, Link Object | Reference Object] A map of operations links that can be followed from the response. The key of the map is a short name for the link, following the naming constraints of the names for Component Objects.
    -

    This object MAY be extended with Specification Extensions.

    -

    Response Object Examples

    +

    This object MAY be extended with Specification Extensions.

    +
    4.8.17.2 Response Object Examples

    Response of an array of a complex type:

    
     {
    -  "description": "A complex object array response",
    -  "content": {
    -    "application/json": {
    -      "schema": {
    -        "type": "array",
    -        "items": {
    -          "$ref": "#/components/schemas/VeryComplexType"
    +  "description": "A complex object array response",
    +  "content": {
    +    "application/json": {
    +      "schema": {
    +        "type": "array",
    +        "items": {
    +          "$ref": "#/components/schemas/VeryComplexType"
             }
           }
         }
    @@ -2195,16 +2426,16 @@
         schema:
           type: array
           items:
    -        $ref: '#/components/schemas/VeryComplexType'
    +        $ref: '#/components/schemas/VeryComplexType'
     

    Response with a string type:

    
     {
    -  "description": "A simple string response",
    -  "content": {
    -    "text/plain": {
    -      "schema": {
    -        "type": "string"
    +  "description": "A simple string response",
    +  "content": {
    +    "text/plain": {
    +      "schema": {
    +        "type": "string"
           }
         }
       }
    @@ -2221,32 +2452,32 @@
     

    Plain text response with headers:

    
     {
    -  "description": "A simple string response",
    -  "content": {
    -    "text/plain": {
    -      "schema": {
    -        "type": "string",
    -        "example": "whoa!"
    +  "description": "A simple string response",
    +  "content": {
    +    "text/plain": {
    +      "schema": {
    +        "type": "string",
    +        "example": "whoa!"
           }
         }
       },
    -  "headers": {
    -    "X-Rate-Limit-Limit": {
    -      "description": "The number of allowed requests in the current period",
    -      "schema": {
    -        "type": "integer"
    +  "headers": {
    +    "X-Rate-Limit-Limit": {
    +      "description": "The number of allowed requests in the current period",
    +      "schema": {
    +        "type": "integer"
           }
         },
    -    "X-Rate-Limit-Remaining": {
    -      "description": "The number of remaining requests in the current period",
    -      "schema": {
    -        "type": "integer"
    +    "X-Rate-Limit-Remaining": {
    +      "description": "The number of remaining requests in the current period",
    +      "schema": {
    +        "type": "integer"
           }
         },
    -    "X-Rate-Limit-Reset": {
    -      "description": "The number of seconds left in the current period",
    -      "schema": {
    -        "type": "integer"
    +    "X-Rate-Limit-Reset": {
    +      "description": "The number of seconds left in the current period",
    +      "schema": {
    +        "type": "integer"
           }
         }
       }
    @@ -2258,7 +2489,7 @@
       text/plain:
         schema:
           type: string
    -    example: 'whoa!'
    +    example: 'whoa!'
     headers:
       X-Rate-Limit-Limit:
         description: The number of allowed requests in the current period
    @@ -2276,18 +2507,18 @@
     

    Response with no return value:

    
     {
    -  "description": "object created"
    +  "description": "object created"
     }
     
    
     description: object created
     
    -

    Callback Object

    +

    4.8.18 Callback Object

    A map of possible out-of band callbacks related to the parent operation. Each value in the map is a Path Item Object that describes a set of requests that may be initiated by the API provider and the expected responses. The key value used to identify the path item object is an expression, evaluated at runtime, that identifies a URL to use for the callback operation.

    To describe incoming requests from the API provider independent from another API call, use the webhooks field.

    -

    Patterned Fields

    +
    4.8.18.1 Patterned Fields
    @@ -2298,18 +2529,18 @@ - +
    {expression}{expression} Path Item Object | Reference Object A Path Item Object, or a reference to one, used to define a callback request and expected responses. A complete example is available.
    -

    This object MAY be extended with Specification Extensions.

    -

    Key Expression

    +

    This object MAY be extended with Specification Extensions.

    +
    4.8.18.2 Key Expression

    The key that identifies the Path Item Object is a runtime expression that can be evaluated in the context of a runtime HTTP request/response to identify the URL to be used for the callback request. A simple example might be $request.body#/url. However, using a runtime expression the complete HTTP message can be accessed. -This includes accessing any part of a body that a JSON Pointer [[!RFC6901]] can reference.

    +This includes accessing any part of a body that a JSON Pointer [RFC6901] can reference.

    For example, given the following HTTP request:

    
     POST /subscribe/myevent?queryUrl=https://clientdomain.com/stillrunning HTTP/1.1
    @@ -2318,11 +2549,11 @@
     Content-Length: 187
     
     {
    -  "failedUrl" : "https://clientdomain.com/failed",
    -  "successUrls" : [
    -    "https://clientdomain.com/fast",
    -    "https://clientdomain.com/medium",
    -    "https://clientdomain.com/slow"
    +  "failedUrl" : "https://clientdomain.com/failed",
    +  "successUrls" : [
    +    "https://clientdomain.com/fast",
    +    "https://clientdomain.com/medium",
    +    "https://clientdomain.com/slow"
       ]
     }
     
    @@ -2372,39 +2603,39 @@
     
     
     
    -

    Callback Object Examples

    +
    4.8.18.3 Callback Object Examples

    The following example uses the user provided queryUrl query string parameter to define the callback URL. This is an example of how to use a callback object to describe a WebHook callback that goes with the subscription operation to enable registering for the WebHook.

    
     myCallback:
    -  '{$request.query.queryUrl}':
    +  '{$request.query.queryUrl}':
         post:
           requestBody:
             description: Callback payload
             content:
    -          'application/json':
    +          'application/json':
                 schema:
    -              $ref: '#/components/schemas/SomePayload'
    +              $ref: '#/components/schemas/SomePayload'
           responses:
    -        '200':
    +        '200':
               description: callback successfully processed
     

    The following example shows a callback where the server is hard-coded, but the query string parameters are populated from the id and email property in the request body.

    
     transactionCallback:
    -  'http://notificationServer.com?transactionId={$request.body#/id}&email={$request.body#/email}':
    +  'http://notificationServer.com?transactionId={$request.body#/id}&email={$request.body#/email}':
         post:
           requestBody:
             description: Callback payload
             content:
    -          'application/json':
    +          'application/json':
                 schema:
    -              $ref: '#/components/schemas/SomePayload'
    +              $ref: '#/components/schemas/SomePayload'
           responses:
    -        '200':
    +        '200':
               description: callback successfully processed
     
    -

    Example Object

    -

    Fixed Fields

    +

    4.8.19 Example Object

    +
    4.8.19.1 Fixed Fields
    @@ -2415,88 +2646,88 @@ - + - + - + - + - +
    summarysummary string Short description for the example.
    descriptiondescription stringLong description for the example. CommonMark syntax MAY be used for rich text representation.Long description for the example. CommonMark syntax MAY be used for rich text representation.
    valuevalue Any Embedded literal example. The value field and externalValue field are mutually exclusive. To represent examples of media types that cannot naturally represented in JSON or YAML, use a string value to contain the example, escaping where necessary.
    externalValueexternalValue string A URI that points to the literal example. This provides the capability to reference examples that cannot easily be included in JSON or YAML documents. The value field and externalValue field are mutually exclusive. See the rules for resolving Relative References.
    -

    This object MAY be extended with Specification Extensions.

    +

    This object MAY be extended with Specification Extensions.

    In all cases, the example value is expected to be compatible with the type schema -of its associated value. Tooling implementations MAY choose to +of its associated value. Tooling implementations MAY choose to validate compatibility automatically, and reject the example value(s) if incompatible.

    -

    Example Object Examples

    +
    4.8.19.2 Example Object Examples

    In a request body:

    
     requestBody:
       content:
    -    'application/json':
    +    'application/json':
           schema:
    -        $ref: '#/components/schemas/Address'
    +        $ref: '#/components/schemas/Address'
           examples:
             foo:
               summary: A foo example
    -          value: {"foo": "bar"}
    +          value: {"foo": "bar"}
             bar:
               summary: A bar example
    -          value: {"bar": "baz"}
    -    'application/xml':
    +          value: {"bar": "baz"}
    +    'application/xml':
           examples:
             xmlExample:
               summary: This is an example in XML
    -          externalValue: 'https://example.org/examples/address-example.xml'
    -    'text/plain':
    +          externalValue: 'https://example.org/examples/address-example.xml'
    +    'text/plain':
           examples:
             textExample:
               summary: This is a text example
    -          externalValue: 'https://foo.bar/examples/address-example.txt'
    +          externalValue: 'https://foo.bar/examples/address-example.txt'
     

    In a parameter:

    
     parameters:
    -  - name: 'zipCode'
    -    in: 'query'
    +  - name: 'zipCode'
    +    in: 'query'
         schema:
    -      type: 'string'
    -      format: 'zip-code'
    +      type: 'string'
    +      format: 'zip-code'
         examples:
           zip-example:
    -        $ref: '#/components/examples/zip-example'
    +        $ref: '#/components/examples/zip-example'
     

    In a response:

    
     responses:
    -  '200':
    +  '200':
         description: your car appointment has been booked
         content:
           application/json:
             schema:
    -          $ref: '#/components/schemas/SuccessResponse'
    +          $ref: '#/components/schemas/SuccessResponse'
             examples:
               confirmation-success:
    -            $ref: '#/components/examples/confirmation-success'
    +            $ref: '#/components/examples/confirmation-success'
     
    -

    Link Object

    +

    4.8.21 Header Object

    The Header Object follows the structure of the Parameter Object with the following changes:

      -
    1. name MUST NOT be specified, it is given in the corresponding headers map.
    2. -
    3. in MUST NOT be specified, it is implicitly in header.
    4. -
    5. All traits that are affected by the location MUST be applicable to a location of header (for example, style).
    6. +
    7. name MUST NOT be specified, it is given in the corresponding headers map.
    8. +
    9. in MUST NOT be specified, it is implicitly in header.
    10. +
    11. All traits that are affected by the location MUST be applicable to a location of header (for example, style).
    -

    Header Object Example

    +
    4.8.21.1 Header Object Example

    A simple header of type integer:

    
     {
    -  "description": "The number of allowed requests in the current period",
    -  "schema": {
    -    "type": "integer"
    +  "description": "The number of allowed requests in the current period",
    +  "schema": {
    +    "type": "integer"
       }
     }
     
    @@ -2721,10 +2952,10 @@ schema: type: integer
    -

    Tag Object

    +

    4.8.22 Tag Object

    Adds metadata to a single tag that is used by the Operation Object. It is not mandatory to have a Tag Object per tag defined in the Operation Object instances.

    -

    Fixed Fields

    +
    4.8.22.1 Fixed Fields
    @@ -2735,39 +2966,39 @@ - + - + - + - + - +
    namename stringREQUIRED. The name of the tag.REQUIRED. The name of the tag.
    descriptiondescription stringA description for the tag. CommonMark syntax MAY be used for rich text representation.A description for the tag. CommonMark syntax MAY be used for rich text representation.
    externalDocsexternalDocs External Documentation Object Additional external documentation for this tag.
    -

    This object MAY be extended with Specification Extensions.

    -

    Tag Object Example

    +

    This object MAY be extended with Specification Extensions.

    +
    4.8.22.2 Tag Object Example
    
     {
    -	"name": "pet",
    -	"description": "Pets operations"
    +	"name": "pet",
    +	"description": "Pets operations"
     }
     
    
     name: pet
     description: Pets operations
     
    -

    Reference Object

    +

    4.8.23 Reference Object

    A simple object to allow referencing other components in the OpenAPI document, internally and externally.

    -

    The $ref string value contains a URI [[!RFC3986]], which identifies the location of the value being referenced.

    +

    The $ref string value contains a URI [RFC3986], which identifies the location of the value being referenced.

    See the rules for resolving Relative References.

    -

    Fixed Fields

    +
    4.8.23.1 Fixed Fields
    @@ -2778,68 +3009,68 @@ - + - + - + - + - + - +
    $ref$ref stringREQUIRED. The reference identifier. This MUST be in the form of a URI.REQUIRED. The reference identifier. This MUST be in the form of a URI.
    summarysummary stringA short summary which by default SHOULD override that of the referenced component. If the referenced object-type does not allow a summary field, then this field has no effect.A short summary which by default SHOULD override that of the referenced component. If the referenced object-type does not allow a summary field, then this field has no effect.
    descriptiondescription stringA description which by default SHOULD override that of the referenced component. CommonMark syntax MAY be used for rich text representation. If the referenced object-type does not allow a description field, then this field has no effect.A description which by default SHOULD override that of the referenced component. CommonMark syntax MAY be used for rich text representation. If the referenced object-type does not allow a description field, then this field has no effect.
    -

    This object cannot be extended with additional properties and any properties added SHALL be ignored.

    +

    This object cannot be extended with additional properties and any properties added SHALL be ignored.

    Note that this restriction on additional properties is a difference between Reference Objects and Schema Objects that contain a $ref keyword.

    -

    Reference Object Example

    +
    4.8.23.2 Reference Object Example
    
     {
    -	"$ref": "#/components/schemas/Pet"
    +	"$ref": "#/components/schemas/Pet"
     }
     
    
    -$ref: '#/components/schemas/Pet'
    +$ref: '#/components/schemas/Pet'
     
    -

    Relative Schema Document Example

    +
    4.8.23.3 Relative Schema Document Example
    
     {
    -  "$ref": "Pet.json"
    +  "$ref": "Pet.json"
     }
     
    
     $ref: Pet.yaml
     
    -

    Relative Documents With Embedded Schema Example

    +
    4.8.23.4 Relative Documents With Embedded Schema Example
    
     {
    -  "$ref": "definitions.json#/Pet"
    +  "$ref": "definitions.json#/Pet"
     }
     
    
     $ref: definitions.yaml#/Pet
     
    -

    Schema Object

    +

    4.8.24 Schema Object

    The Schema Object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. This object is a superset of the JSON Schema Specification Draft 2020-12.

    For more information about the properties, see JSON Schema Core and JSON Schema Validation.

    Unless stated otherwise, the property definitions follow those of JSON Schema and do not add any additional semantics. Where JSON Schema indicates that behavior is defined by the application (e.g. for annotations), OAS also defers the definition of semantics to the application consuming the OpenAPI document.

    -

    Properties

    +
    4.8.24.1 Properties

    The OpenAPI Schema Object dialect is defined as requiring the OAS base vocabulary, in addition to the vocabularies as specified in the JSON Schema draft 2020-12 general purpose meta-schema.

    -

    The OpenAPI Schema Object dialect for this version of the specification is identified by the URI https://spec.openapis.org/oas/3.1/dialect/base (the “OAS dialect schema id”).

    +

    The OpenAPI Schema Object dialect for this version of the specification is identified by the URI https://spec.openapis.org/oas/3.1/dialect/base (the “OAS dialect schema id”).

    The following properties are taken from the JSON Schema specification but their definitions have been extended by the OAS:

      -
    • description - CommonMark syntax MAY be used for rich text representation.
    • +
    • description - CommonMark syntax MAY be used for rich text representation.
    • format - See Data Type Formats for further details. While relying on JSON Schema’s defined formats, the OAS offers a few additional predefined formats.

    In addition to the JSON Schema properties comprising the OAS dialect, the Schema Object supports keywords from any other vocabularies, or entirely arbitrary properties.

    The OpenAPI Specification’s base vocabulary is comprised of the following keywords:

    -

    Fixed Fields

    +
    4.8.24.2 Fixed Fields
    @@ -2850,79 +3081,79 @@ - + - + - + - + - +
    discriminatordiscriminator Discriminator Object Adds support for polymorphism. The discriminator is an object name that is used to differentiate between other schemas which may satisfy the payload description. See Composition and Inheritance for more details.
    xmlxml XML ObjectThis MAY be used only on properties schemas. It has no effect on root schemas. Adds additional metadata to describe the XML representation of this property.This MAY be used only on properties schemas. It has no effect on root schemas. Adds additional metadata to describe the XML representation of this property.
    externalDocsexternalDocs External Documentation Object Additional external documentation for this schema.
    exampleexample Any A free-form property to include an example of an instance for this schema. To represent examples that cannot be naturally represented in JSON or YAML, a string value can be used to contain the example with escaping where necessary.

    Deprecated: The example property has been deprecated in favor of the JSON Schema examples keyword. Use of example is discouraged, and later versions of this specification may remove it.
    -

    This object MAY be extended with Specification Extensions, though as noted, additional properties MAY omit the x- prefix within this object.

    -
    Composition and Inheritance (Polymorphism)
    +

    This object MAY be extended with Specification Extensions, though as noted, additional properties MAY omit the x- prefix within this object.

    +
    4.8.24.2.1 Composition and Inheritance (Polymorphism)

    The OpenAPI Specification allows combining and extending model definitions using the allOf property of JSON Schema, in effect offering model composition. allOf takes an array of object definitions that are validated independently but together compose a single object.

    While composition offers model extensibility, it does not imply a hierarchy between the models. To support polymorphism, the OpenAPI Specification adds the discriminator field. When used, the discriminator will be the name of the property that decides which schema definition validates the structure of the model. -As such, the discriminator field MUST be a required field. +As such, the discriminator field MUST be a required field. There are two ways to define the value of a discriminator for an inheriting instance.

    • Use the schema name.
    • Override the schema name by overriding the property with a new value. If a new value exists, this takes precedence over the schema name. As such, inline schema definitions, which do not have a given id, cannot be used in polymorphism.
    -
    XML Modeling
    +
    4.8.24.2.2 XML Modeling

    The xml property allows extra definitions when translating the JSON definition to XML. The XML Object contains additional information about the available options.

    -
    Specifying Schema Dialects
    +
    4.8.24.2.3 Specifying Schema Dialects

    It is important for tooling to be able to determine which dialect or meta-schema any given resource wishes to be processed with: JSON Schema Core, JSON Schema Validation, OpenAPI Schema dialect, or some custom meta-schema.

    -

    The $schema keyword MAY be present in any root Schema Object, and if present MUST be used to determine which dialect should be used when processing the schema. This allows use of Schema Objects which comply with other drafts of JSON Schema than the default Draft 2020-12 support. Tooling MUST support the OAS dialect schema id, and MAY support additional values of $schema.

    -

    To allow use of a different default $schema value for all Schema Objects contained within an OAS document, a jsonSchemaDialect value may be set within the OpenAPI Object. If this default is not set, then the OAS dialect schema id MUST be used for these Schema Objects. The value of $schema within a Schema Object always overrides any default.

    -

    When a Schema Object is referenced from an external resource which is not an OAS document (e.g. a bare JSON Schema resource), then the value of the $schema keyword for schemas within that resource MUST follow JSON Schema rules.

    -

    Schema Object Examples

    -
    Primitive Sample
    +

    The $schema keyword MAY be present in any root Schema Object, and if present MUST be used to determine which dialect should be used when processing the schema. This allows use of Schema Objects which comply with other drafts of JSON Schema than the default Draft 2020-12 support. Tooling MUST support the OAS dialect schema id, and MAY support additional values of $schema.

    +

    To allow use of a different default $schema value for all Schema Objects contained within an OAS document, a jsonSchemaDialect value may be set within the OpenAPI Object. If this default is not set, then the OAS dialect schema id MUST be used for these Schema Objects. The value of $schema within a Schema Object always overrides any default.

    +

    When a Schema Object is referenced from an external resource which is not an OAS document (e.g. a bare JSON Schema resource), then the value of the $schema keyword for schemas within that resource MUST follow JSON Schema rules.

    +
    4.8.24.3 Schema Object Examples
    +
    4.8.24.3.1 Primitive Sample
    
     {
    -  "type": "string",
    -  "format": "email"
    +  "type": "string",
    +  "format": "email"
     }
     
    
     type: string
     format: email
     
    -
    Simple Model
    +
    4.8.24.3.2 Simple Model
    
     {
    -  "type": "object",
    -  "required": [
    -    "name"
    +  "type": "object",
    +  "required": [
    +    "name"
       ],
    -  "properties": {
    -    "name": {
    -      "type": "string"
    +  "properties": {
    +    "name": {
    +      "type": "string"
         },
    -    "address": {
    -      "$ref": "#/components/schemas/Address"
    +    "address": {
    +      "$ref": "#/components/schemas/Address"
         },
    -    "age": {
    -      "type": "integer",
    -      "format": "int32",
    -      "minimum": 0
    +    "age": {
    +      "type": "integer",
    +      "format": "int32",
    +      "minimum": 0
         }
       }
     }
    @@ -2935,19 +3166,19 @@
       name:
         type: string
       address:
    -    $ref: '#/components/schemas/Address'
    +    $ref: '#/components/schemas/Address'
       age:
         type: integer
         format: int32
         minimum: 0
     
    -
    Model with Map/Dictionary Properties
    +
    4.8.24.3.3 Model with Map/Dictionary Properties

    For a simple string to string mapping:

    
     {
    -  "type": "object",
    -  "additionalProperties": {
    -    "type": "string"
    +  "type": "object",
    +  "additionalProperties": {
    +    "type": "string"
       }
     }
     
    @@ -2959,36 +3190,36 @@

    For a string to model mapping:

    
     {
    -  "type": "object",
    -  "additionalProperties": {
    -    "$ref": "#/components/schemas/ComplexModel"
    +  "type": "object",
    +  "additionalProperties": {
    +    "$ref": "#/components/schemas/ComplexModel"
       }
     }
     
    
     type: object
     additionalProperties:
    -  $ref: '#/components/schemas/ComplexModel'
    +  $ref: '#/components/schemas/ComplexModel'
     
    -
    Model with Example
    +
    4.8.24.3.4 Model with Example
    
     {
    -  "type": "object",
    -  "properties": {
    -    "id": {
    -      "type": "integer",
    -      "format": "int64"
    +  "type": "object",
    +  "properties": {
    +    "id": {
    +      "type": "integer",
    +      "format": "int64"
         },
    -    "name": {
    -      "type": "string"
    +    "name": {
    +      "type": "string"
         }
       },
    -  "required": [
    -    "name"
    +  "required": [
    +    "name"
       ],
    -  "example": {
    -    "name": "Puma",
    -    "id": 1
    +  "example": {
    +    "name": "Puma",
    +    "id": 1
       }
     }
     
    @@ -3006,41 +3237,41 @@ name: Puma id: 1
    -
    Models with Composition
    +
    4.8.24.3.5 Models with Composition
    
     {
    -  "components": {
    -    "schemas": {
    -      "ErrorModel": {
    -        "type": "object",
    -        "required": [
    -          "message",
    -          "code"
    +  "components": {
    +    "schemas": {
    +      "ErrorModel": {
    +        "type": "object",
    +        "required": [
    +          "message",
    +          "code"
             ],
    -        "properties": {
    -          "message": {
    -            "type": "string"
    +        "properties": {
    +          "message": {
    +            "type": "string"
               },
    -          "code": {
    -            "type": "integer",
    -            "minimum": 100,
    -            "maximum": 600
    +          "code": {
    +            "type": "integer",
    +            "minimum": 100,
    +            "maximum": 600
               }
             }
           },
    -      "ExtendedErrorModel": {
    -        "allOf": [
    +      "ExtendedErrorModel": {
    +        "allOf": [
               {
    -            "$ref": "#/components/schemas/ErrorModel"
    +            "$ref": "#/components/schemas/ErrorModel"
               },
               {
    -            "type": "object",
    -            "required": [
    -              "rootCause"
    +            "type": "object",
    +            "required": [
    +              "rootCause"
                 ],
    -            "properties": {
    -              "rootCause": {
    -                "type": "string"
    +            "properties": {
    +              "rootCause": {
    +                "type": "string"
                   }
                 }
               }
    @@ -3067,7 +3298,7 @@
               maximum: 600
         ExtendedErrorModel:
           allOf:
    -      - $ref: '#/components/schemas/ErrorModel'
    +      - $ref: '#/components/schemas/ErrorModel'
           - type: object
             required:
             - rootCause
    @@ -3075,75 +3306,75 @@
               rootCause:
                 type: string
     
    -
    Models with Polymorphism Support
    +
    4.8.24.3.6 Models with Polymorphism Support
    
     {
    -  "components": {
    -    "schemas": {
    -      "Pet": {
    -        "type": "object",
    -        "discriminator": {
    -          "propertyName": "petType"
    +  "components": {
    +    "schemas": {
    +      "Pet": {
    +        "type": "object",
    +        "discriminator": {
    +          "propertyName": "petType"
             },
    -        "properties": {
    -          "name": {
    -            "type": "string"
    +        "properties": {
    +          "name": {
    +            "type": "string"
               },
    -          "petType": {
    -            "type": "string"
    +          "petType": {
    +            "type": "string"
               }
             },
    -        "required": [
    -          "name",
    -          "petType"
    +        "required": [
    +          "name",
    +          "petType"
             ]
           },
    -      "Cat": {
    -        "description": "A representation of a cat. Note that `Cat` will be used as the discriminator value.",
    -        "allOf": [
    +      "Cat": {
    +        "description": "A representation of a cat. Note that `Cat` will be used as the discriminator value.",
    +        "allOf": [
               {
    -            "$ref": "#/components/schemas/Pet"
    +            "$ref": "#/components/schemas/Pet"
               },
               {
    -            "type": "object",
    -            "properties": {
    -              "huntingSkill": {
    -                "type": "string",
    -                "description": "The measured skill for hunting",
    -                "default": "lazy",
    -                "enum": [
    -                  "clueless",
    -                  "lazy",
    -                  "adventurous",
    -                  "aggressive"
    +            "type": "object",
    +            "properties": {
    +              "huntingSkill": {
    +                "type": "string",
    +                "description": "The measured skill for hunting",
    +                "default": "lazy",
    +                "enum": [
    +                  "clueless",
    +                  "lazy",
    +                  "adventurous",
    +                  "aggressive"
                     ]
                   }
                 },
    -            "required": [
    -              "huntingSkill"
    +            "required": [
    +              "huntingSkill"
                 ]
               }
             ]
           },
    -      "Dog": {
    -        "description": "A representation of a dog. Note that `Dog` will be used as the discriminator value.",
    -        "allOf": [
    +      "Dog": {
    +        "description": "A representation of a dog. Note that `Dog` will be used as the discriminator value.",
    +        "allOf": [
               {
    -            "$ref": "#/components/schemas/Pet"
    +            "$ref": "#/components/schemas/Pet"
               },
               {
    -            "type": "object",
    -            "properties": {
    -              "packSize": {
    -                "type": "integer",
    -                "format": "int32",
    -                "description": "the size of the pack the dog is from",
    -                "default": 0,
    -                "minimum": 0
    +            "type": "object",
    +            "properties": {
    +              "packSize": {
    +                "type": "integer",
    +                "format": "int32",
    +                "description": "the size of the pack the dog is from",
    +                "default": 0,
    +                "minimum": 0
                   }
                 },
    -            "required": [
    -              "packSize"
    +            "required": [
    +              "packSize"
                 ]
               }
             ]
    @@ -3167,10 +3398,10 @@
           required:
           - name
           - petType
    -    Cat:  ## "Cat" will be used as the discriminator value
    +    Cat:  ## "Cat" will be used as the discriminator value
           description: A representation of a cat
           allOf:
    -      - $ref: '#/components/schemas/Pet'
    +      - $ref: '#/components/schemas/Pet'
           - type: object
             properties:
               huntingSkill:
    @@ -3183,10 +3414,10 @@
                 - aggressive
             required:
             - huntingSkill
    -    Dog:  ## "Dog" will be used as the discriminator value
    +    Dog:  ## "Dog" will be used as the discriminator value
           description: A representation of a dog
           allOf:
    -      - $ref: '#/components/schemas/Pet'
    +      - $ref: '#/components/schemas/Pet'
           - type: object
             properties:
               packSize:
    @@ -3198,10 +3429,10 @@
             required:
             - packSize
     
    -

    Discriminator Object

    +

    4.8.25 Discriminator Object

    When request bodies or response payloads may be one of a number of different schemas, a discriminator object can be used to aid in serialization, deserialization, and validation. The discriminator is a specific object in a schema which is used to inform the consumer of the document of an alternative schema based on the value associated with it.

    When using the discriminator, inline schemas will not be considered.

    -

    Fixed Fields

    +
    4.8.25.1 Fixed Fields
    @@ -3212,62 +3443,62 @@ - + - + - +
    propertyNamepropertyName stringREQUIRED. The name of the property in the payload that will hold the discriminator value.REQUIRED. The name of the property in the payload that will hold the discriminator value.
    mapping mapping Map[string, string] An object to hold mappings between payload values and schema names or references.
    -

    This object MAY be extended with Specification Extensions.

    +

    This object MAY be extended with Specification Extensions.

    The discriminator object is legal only when using one of the composite keywords oneOf, anyOf, allOf.

    -

    In OAS 3.0, a response payload MAY be described to be exactly one of any number of types:

    +

    In OAS 3.0, a response payload MAY be described to be exactly one of any number of types:

    
     MyResponseType:
       oneOf:
    -  - $ref: '#/components/schemas/Cat'
    -  - $ref: '#/components/schemas/Dog'
    -  - $ref: '#/components/schemas/Lizard'
    +  - $ref: '#/components/schemas/Cat'
    +  - $ref: '#/components/schemas/Dog'
    +  - $ref: '#/components/schemas/Lizard'
     
    -

    which means the payload MUST, by validation, match exactly one of the schemas described by Cat, Dog, or Lizard. In this case, a discriminator MAY act as a “hint” to shortcut validation and selection of the matching schema which may be a costly operation, depending on the complexity of the schema. We can then describe exactly which field tells us which schema to use:

    +

    which means the payload MUST, by validation, match exactly one of the schemas described by Cat, Dog, or Lizard. In this case, a discriminator MAY act as a “hint” to shortcut validation and selection of the matching schema which may be a costly operation, depending on the complexity of the schema. We can then describe exactly which field tells us which schema to use:

    
     MyResponseType:
       oneOf:
    -  - $ref: '#/components/schemas/Cat'
    -  - $ref: '#/components/schemas/Dog'
    -  - $ref: '#/components/schemas/Lizard'
    +  - $ref: '#/components/schemas/Cat'
    +  - $ref: '#/components/schemas/Dog'
    +  - $ref: '#/components/schemas/Lizard'
       discriminator:
         propertyName: petType
     
    -

    The expectation now is that a property with name petType MUST be present in the response payload, and the value will correspond to the name of a schema defined in the OAS document. Thus the response payload:

    +

    The expectation now is that a property with name petType MUST be present in the response payload, and the value will correspond to the name of a schema defined in the OAS document. Thus the response payload:

    
     {
    -  "id": 12345,
    -  "petType": "Cat"
    +  "id": 12345,
    +  "petType": "Cat"
     }
     

    Will indicate that the Cat schema be used in conjunction with this payload.

    -

    In scenarios where the value of the discriminator field does not match the schema name or implicit mapping is not possible, an optional mapping definition MAY be used:

    +

    In scenarios where the value of the discriminator field does not match the schema name or implicit mapping is not possible, an optional mapping definition MAY be used:

    
     MyResponseType:
       oneOf:
    -  - $ref: '#/components/schemas/Cat'
    -  - $ref: '#/components/schemas/Dog'
    -  - $ref: '#/components/schemas/Lizard'
    -  - $ref: 'https://gigantic-server.com/schemas/Monster/schema.json'
    +  - $ref: '#/components/schemas/Cat'
    +  - $ref: '#/components/schemas/Dog'
    +  - $ref: '#/components/schemas/Lizard'
    +  - $ref: 'https://gigantic-server.com/schemas/Monster/schema.json'
       discriminator:
         propertyName: petType
         mapping:
    -      dog: '#/components/schemas/Dog'
    -      monster: 'https://gigantic-server.com/schemas/Monster/schema.json'
    +      dog: '#/components/schemas/Dog'
    +      monster: 'https://gigantic-server.com/schemas/Monster/schema.json'
     
    -

    Here the discriminator value of dog will map to the schema #/components/schemas/Dog, rather than the default (implicit) value of Dog. If the discriminator value does not match an implicit or explicit mapping, no schema can be determined and validation SHOULD fail. Mapping keys MUST be string values, but tooling MAY convert response values to strings for comparison.

    +

    Here the discriminator value of dog will map to the schema #/components/schemas/Dog, rather than the default (implicit) value of Dog. If the discriminator value does not match an implicit or explicit mapping, no schema can be determined and validation SHOULD fail. Mapping keys MUST be string values, but tooling MAY convert response values to strings for comparison.

    When used in conjunction with the anyOf construct, the use of the discriminator can avoid ambiguity where multiple schemas may satisfy a single payload.

    -

    In both the oneOf and anyOf use cases, all possible schemas MUST be listed explicitly. To avoid redundancy, the discriminator MAY be added to a parent schema definition, and all schemas comprising the parent schema in an allOf construct may be used as an alternate schema.

    +

    In both the oneOf and anyOf use cases, all possible schemas MUST be listed explicitly. To avoid redundancy, the discriminator MAY be added to a parent schema definition, and all schemas comprising the parent schema in an allOf construct may be used as an alternate schema.

    For example:

    
     components:
    @@ -3285,7 +3516,7 @@
               dog: Dog
         Cat:
           allOf:
    -      - $ref: '#/components/schemas/Pet'
    +      - $ref: '#/components/schemas/Pet'
           - type: object
             # all other properties specific to a `Cat`
             properties:
    @@ -3293,7 +3524,7 @@
                 type: string
         Dog:
           allOf:
    -      - $ref: '#/components/schemas/Pet'
    +      - $ref: '#/components/schemas/Pet'
           - type: object
             # all other properties specific to a `Dog`
             properties:
    @@ -3301,7 +3532,7 @@
                 type: string
         Lizard:
           allOf:
    -      - $ref: '#/components/schemas/Pet'
    +      - $ref: '#/components/schemas/Pet'
           - type: object
             # all other properties specific to a `Lizard`
             properties:
    @@ -3311,23 +3542,23 @@
     

    a payload like this:

    
     {
    -  "petType": "Cat",
    -  "name": "misty"
    +  "petType": "Cat",
    +  "name": "misty"
     }
     

    will indicate that the Cat schema be used. Likewise this schema:

    
     {
    -  "petType": "dog",
    -  "bark": "soft"
    +  "petType": "dog",
    +  "bark": "soft"
     }
     

    will map to Dog because of the definition in the mapping element.

    -

    XML Object

    +

    4.8.26 XML Object

    A metadata object that allows for more fine-tuned XML model definitions.

    -

    When using arrays, XML element names are not inferred (for singular/plural forms) and the name property SHOULD be used to add that information. +

    When using arrays, XML element names are not inferred (for singular/plural forms) and the name property SHOULD be used to add that information. See examples for expected behavior.

    -

    Fixed Fields

    +
    4.8.26.1 Fixed Fields
    @@ -3338,41 +3569,41 @@ - + - + - + - + - + - + - +
    namename string Replaces the name of the element/attribute used for the described schema property. When defined within items, it will affect the name of the individual XML elements within the list. When defined alongside type being array (outside the items), it will affect the wrapping element and only if wrapped is true. If wrapped is false, it will be ignored.
    namespacenamespace stringThe URI of the namespace definition. This MUST be in the form of an absolute URI.The URI of the namespace definition. This MUST be in the form of an absolute URI.
    prefixprefix string The prefix to be used for the name.
    attributeattribute boolean Declares whether the property definition translates to an attribute instead of an element. Default value is false.
    wrappedwrapped booleanMAY be used only for an array definition. Signifies whether the array is wrapped (for example, <books><book/><book/></books>) or unwrapped (<book/><book/>). Default value is false. The definition takes effect only when defined alongside type being array (outside the items).MAY be used only for an array definition. Signifies whether the array is wrapped (for example, <books><book/><book/></books>) or unwrapped (<book/><book/>). Default value is false. The definition takes effect only when defined alongside type being array (outside the items).
    -

    This object MAY be extended with Specification Extensions.

    -

    XML Object Examples

    +

    This object MAY be extended with Specification Extensions.

    +
    4.8.26.2 XML Object Examples

    The examples of the XML object definitions are included inside a property definition of a Schema Object with a sample of the XML representation of it.

    -
    No XML Element
    +
    4.8.26.2.1 No XML Element

    Basic string property:

    
     {
    -    "animals": {
    -        "type": "string"
    +    "animals": {
    +        "type": "string"
         }
     }
     
    @@ -3386,10 +3617,10 @@

    Basic string array property (wrapped is false by default):

    
     {
    -    "animals": {
    -        "type": "array",
    -        "items": {
    -            "type": "string"
    +    "animals": {
    +        "type": "array",
    +        "items": {
    +            "type": "string"
             }
         }
     }
    @@ -3405,13 +3636,13 @@
     <animals>...</animals>
     <animals>...</animals>
     
    -
    XML Name Replacement
    +
    4.8.26.2.2 XML Name Replacement
    
     {
    -  "animals": {
    -    "type": "string",
    -    "xml": {
    -      "name": "animal"
    +  "animals": {
    +    "type": "string",
    +    "xml": {
    +      "name": "animal"
         }
       }
     }
    @@ -3425,25 +3656,25 @@
     
    
     <animal>...</animal>
     
    -
    XML Attribute, Prefix and Namespace
    +
    4.8.26.2.3 XML Attribute, Prefix and Namespace

    In this example, a full model definition is shown.

    
     {
    -  "Person": {
    -    "type": "object",
    -    "properties": {
    -      "id": {
    -        "type": "integer",
    -        "format": "int32",
    -        "xml": {
    -          "attribute": true
    +  "Person": {
    +    "type": "object",
    +    "properties": {
    +      "id": {
    +        "type": "integer",
    +        "format": "int32",
    +        "xml": {
    +          "attribute": true
             }
           },
    -      "name": {
    -        "type": "string",
    -        "xml": {
    -          "namespace": "https://example.com/schema/sample",
    -          "prefix": "sample"
    +      "name": {
    +        "type": "string",
    +        "xml": {
    +          "namespace": "https://example.com/schema/sample",
    +          "prefix": "sample"
             }
           }
         }
    @@ -3466,20 +3697,20 @@
             prefix: sample
     
    
    -<Person id="123">
    -    <sample:name xmlns:sample="https://example.com/schema/sample">example</sample:name>
    +<Person id="123">
    +    <sample:name xmlns:sample="https://example.com/schema/sample">example</sample:name>
     </Person>
     
    -
    XML Arrays
    +
    4.8.26.2.4 XML Arrays

    Changing the element names:

    
     {
    -  "animals": {
    -    "type": "array",
    -    "items": {
    -      "type": "string",
    -      "xml": {
    -        "name": "animal"
    +  "animals": {
    +    "type": "array",
    +    "items": {
    +      "type": "string",
    +      "xml": {
    +        "name": "animal"
           }
         }
       }
    @@ -3500,16 +3731,16 @@
     

    The external name property has no effect on the XML:

    
     {
    -  "animals": {
    -    "type": "array",
    -    "items": {
    -      "type": "string",
    -      "xml": {
    -        "name": "animal"
    +  "animals": {
    +    "type": "array",
    +    "items": {
    +      "type": "string",
    +      "xml": {
    +        "name": "animal"
           }
         },
    -    "xml": {
    -      "name": "aliens"
    +    "xml": {
    +      "name": "aliens"
         }
       }
     }
    @@ -3531,13 +3762,13 @@
     

    Even when the array is wrapped, if a name is not explicitly defined, the same name will be used both internally and externally:

    
     {
    -  "animals": {
    -    "type": "array",
    -    "items": {
    -      "type": "string"
    +  "animals": {
    +    "type": "array",
    +    "items": {
    +      "type": "string"
         },
    -    "xml": {
    -      "wrapped": true
    +    "xml": {
    +      "wrapped": true
         }
       }
     }
    @@ -3559,16 +3790,16 @@
     

    To overcome the naming problem in the example above, the following definition can be used:

    
     {
    -  "animals": {
    -    "type": "array",
    -    "items": {
    -      "type": "string",
    -      "xml": {
    -        "name": "animal"
    +  "animals": {
    +    "type": "array",
    +    "items": {
    +      "type": "string",
    +      "xml": {
    +        "name": "animal"
           }
         },
    -    "xml": {
    -      "wrapped": true
    +    "xml": {
    +      "wrapped": true
         }
       }
     }
    @@ -3592,17 +3823,17 @@
     

    Affecting both internal and external names:

    
     {
    -  "animals": {
    -    "type": "array",
    -    "items": {
    -      "type": "string",
    -      "xml": {
    -        "name": "animal"
    +  "animals": {
    +    "type": "array",
    +    "items": {
    +      "type": "string",
    +      "xml": {
    +        "name": "animal"
           }
         },
    -    "xml": {
    -      "name": "aliens",
    -      "wrapped": true
    +    "xml": {
    +      "name": "aliens",
    +      "wrapped": true
         }
       }
     }
    @@ -3627,14 +3858,14 @@
     

    If we change the external element but not the internal ones:

    
     {
    -  "animals": {
    -    "type": "array",
    -    "items": {
    -      "type": "string"
    +  "animals": {
    +    "type": "array",
    +    "items": {
    +      "type": "string"
         },
    -    "xml": {
    -      "name": "aliens",
    -      "wrapped": true
    +    "xml": {
    +      "name": "aliens",
    +      "wrapped": true
         }
       }
     }
    @@ -3654,11 +3885,11 @@
       <aliens>value</aliens>
     </aliens>
     
    -

    Security Scheme Object

    +

    4.8.27 Security Scheme Object

    Defines a security scheme that can be used by the operations.

    -

    Supported schemes are HTTP authentication, an API key (either as a header, a cookie parameter or as a query parameter), mutual TLS (use of a client certificate), OAuth2’s common flows (implicit, password, client credentials and authorization code) as defined in [[!RFC6749]], and OpenID Connect Discovery. +

    Supported schemes are HTTP authentication, an API key (either as a header, a cookie parameter or as a query parameter), mutual TLS (use of a client certificate), OAuth2’s common flows (implicit, password, client credentials and authorization code) as defined in [RFC6749], and OpenID Connect Discovery. Please note that as of 2020, the implicit flow is about to be deprecated by OAuth 2.0 Security Best Current Practice. Recommended for most use case is Authorization Code Grant flow with PKCE.

    -

    Fixed Fields

    +
    4.8.27.1 Fixed Fields
    @@ -3670,74 +3901,74 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
    typetype string AnyREQUIRED. The type of the security scheme. Valid values are "apiKey", "http", "mutualTLS", "oauth2", "openIdConnect".REQUIRED. The type of the security scheme. Valid values are "apiKey", "http", "mutualTLS", "oauth2", "openIdConnect".
    descriptiondescription string AnyA description for security scheme. CommonMark syntax MAY be used for rich text representation.A description for security scheme. CommonMark syntax MAY be used for rich text representation.
    namename string apiKeyREQUIRED. The name of the header, query or cookie parameter to be used.REQUIRED. The name of the header, query or cookie parameter to be used.
    inin string apiKeyREQUIRED. The location of the API key. Valid values are "query", "header" or "cookie".REQUIRED. The location of the API key. Valid values are "query", "header" or "cookie".
    schemescheme string httpREQUIRED. The name of the HTTP Authorization scheme to be used in the Authorization header as defined in [[!RFC7235]]. The values used SHOULD be registered in the IANA Authentication Scheme registry.REQUIRED. The name of the HTTP Authorization scheme to be used in the Authorization header as defined in [RFC7235]. The values used SHOULD be registered in the IANA Authentication Scheme registry.
    bearerFormatbearerFormat stringhttp ("bearer")http ("bearer") A hint to the client to identify how the bearer token is formatted. Bearer tokens are usually generated by an authorization server, so this information is primarily for documentation purposes.
    flowsflows OAuth Flows Object oauth2REQUIRED. An object containing configuration information for the flow types supported.REQUIRED. An object containing configuration information for the flow types supported.
    openIdConnectUrlopenIdConnectUrl string openIdConnectREQUIRED. OpenId Connect URL to discover OAuth2 configuration values. This MUST be in the form of a URL. The OpenID Connect standard requires the use of TLS.REQUIRED. OpenId Connect URL to discover OAuth2 configuration values. This MUST be in the form of a URL. The OpenID Connect standard requires the use of TLS.
    -

    This object MAY be extended with Specification Extensions.

    -

    Security Scheme Object Example

    -
    Basic Authentication Sample
    +

    This object MAY be extended with Specification Extensions.

    +
    4.8.27.2 Security Scheme Object Example
    +
    4.8.27.2.1 Basic Authentication Sample
    
     {
    -  "type": "http",
    -  "scheme": "basic"
    +  "type": "http",
    +  "scheme": "basic"
     }
     
    
     type: http
     scheme: basic
     
    -
    API Key Sample
    +
    4.8.27.2.2 API Key Sample
    
     {
    -  "type": "apiKey",
    -  "name": "api_key",
    -  "in": "header"
    +  "type": "apiKey",
    +  "name": "api_key",
    +  "in": "header"
     }
     
    
    @@ -3745,12 +3976,12 @@
     name: api_key
     in: header
     
    -
    JWT Bearer Sample
    +
    4.8.27.2.3 JWT Bearer Sample
    
     {
    -  "type": "http",
    -  "scheme": "bearer",
    -  "bearerFormat": "JWT",
    +  "type": "http",
    +  "scheme": "bearer",
    +  "bearerFormat": "JWT",
     }
     
    
    @@ -3758,16 +3989,16 @@
     scheme: bearer
     bearerFormat: JWT
     
    -
    Implicit OAuth2 Sample
    +
    4.8.27.2.4 Implicit OAuth2 Sample
    
     {
    -  "type": "oauth2",
    -  "flows": {
    -    "implicit": {
    -      "authorizationUrl": "https://example.com/api/oauth/dialog",
    -      "scopes": {
    -        "write:pets": "modify pets in your account",
    -        "read:pets": "read your pets"
    +  "type": "oauth2",
    +  "flows": {
    +    "implicit": {
    +      "authorizationUrl": "https://example.com/api/oauth/dialog",
    +      "scopes": {
    +        "write:pets": "modify pets in your account",
    +        "read:pets": "read your pets"
           }
         }
       }
    @@ -3782,9 +4013,9 @@
           write:pets: modify pets in your account
           read:pets: read your pets
     
    -

    OAuth Flows Object

    +

    4.8.28 OAuth Flows Object

    Allows configuration of the supported OAuth Flows.

    -

    Fixed Fields

    +
    4.8.28.1 Fixed Fields
    @@ -3795,31 +4026,31 @@ - + - + - + - +
    implicitimplicit OAuth Flow Object Configuration for the OAuth Implicit flow
    passwordpassword OAuth Flow Object Configuration for the OAuth Resource Owner Password flow
    clientCredentialsclientCredentials OAuth Flow Object Configuration for the OAuth Client Credentials flow. Previously called application in OpenAPI 2.0.
    authorizationCodeauthorizationCode OAuth Flow Object Configuration for the OAuth Authorization Code flow. Previously called accessCode in OpenAPI 2.0.
    -

    This object MAY be extended with Specification Extensions.

    -

    OAuth Flow Object

    +

    This object MAY be extended with Specification Extensions.

    +

    4.8.29 OAuth Flow Object

    Configuration details for a supported OAuth Flow

    -

    Fixed Fields

    +
    4.8.29.1 Fixed Fields
    @@ -3831,50 +4062,50 @@ - + - - + + - + - - + + - + - + - + - +
    authorizationUrlauthorizationUrl stringoauth2 ("implicit", "authorizationCode")REQUIRED. The authorization URL to be used for this flow. This MUST be in the form of a URL. The OAuth2 standard requires the use of TLS.oauth2 ("implicit", "authorizationCode")REQUIRED. The authorization URL to be used for this flow. This MUST be in the form of a URL. The OAuth2 standard requires the use of TLS.
    tokenUrltokenUrl stringoauth2 ("password", "clientCredentials", "authorizationCode")REQUIRED. The token URL to be used for this flow. This MUST be in the form of a URL. The OAuth2 standard requires the use of TLS.oauth2 ("password", "clientCredentials", "authorizationCode")REQUIRED. The token URL to be used for this flow. This MUST be in the form of a URL. The OAuth2 standard requires the use of TLS.
    refreshUrlrefreshUrl string oauth2The URL to be used for obtaining refresh tokens. This MUST be in the form of a URL. The OAuth2 standard requires the use of TLS.The URL to be used for obtaining refresh tokens. This MUST be in the form of a URL. The OAuth2 standard requires the use of TLS.
    scopesscopes Map[string, string] oauth2REQUIRED. The available scopes for the OAuth2 security scheme. A map between the scope name and a short description for it. The map MAY be empty.REQUIRED. The available scopes for the OAuth2 security scheme. A map between the scope name and a short description for it. The map MAY be empty.
    -

    This object MAY be extended with Specification Extensions.

    -

    OAuth Flow Object Examples

    +

    This object MAY be extended with Specification Extensions.

    +
    4.8.29.2 OAuth Flow Object Examples
    
     {
    -  "type": "oauth2",
    -  "flows": {
    -    "implicit": {
    -      "authorizationUrl": "https://example.com/api/oauth/dialog",
    -      "scopes": {
    -        "write:pets": "modify pets in your account",
    -        "read:pets": "read your pets"
    +  "type": "oauth2",
    +  "flows": {
    +    "implicit": {
    +      "authorizationUrl": "https://example.com/api/oauth/dialog",
    +      "scopes": {
    +        "write:pets": "modify pets in your account",
    +        "read:pets": "read your pets"
           }
         },
    -    "authorizationCode": {
    -      "authorizationUrl": "https://example.com/api/oauth/dialog",
    -      "tokenUrl": "https://example.com/api/oauth/token",
    -      "scopes": {
    -        "write:pets": "modify pets in your account",
    -        "read:pets": "read your pets"
    +    "authorizationCode": {
    +      "authorizationUrl": "https://example.com/api/oauth/dialog",
    +      "tokenUrl": "https://example.com/api/oauth/token",
    +      "scopes": {
    +        "write:pets": "modify pets in your account",
    +        "read:pets": "read your pets"
           }
         }
       }
    @@ -3895,13 +4126,13 @@
           write:pets: modify pets in your account
           read:pets: read your pets
     
    -

    Security Requirement Object

    +

    4.8.30 Security Requirement Object

    Lists the required security schemes to execute this operation. -The name used for each property MUST correspond to a security scheme declared in the Security Schemes under the Components Object.

    -

    Security Requirement Objects that contain multiple schemes require that all schemes MUST be satisfied for a request to be authorized. +The name used for each property MUST correspond to a security scheme declared in the Security Schemes under the Components Object.

    +

    Security Requirement Objects that contain multiple schemes require that all schemes MUST be satisfied for a request to be authorized. This enables support for scenarios where multiple query parameters or HTTP headers are required to convey security information.

    When a list of Security Requirement Objects is defined on the OpenAPI Object or Operation Object, only one of the Security Requirement Objects in the list needs to be satisfied to authorize the request.

    -

    Patterned Fields

    +
    4.8.30.1 Patterned Fields
    @@ -3912,28 +4143,28 @@ - + - +
    {name}{name} [string]Each name MUST correspond to a security scheme which is declared in the Security Schemes under the Components Object. If the security scheme is of type "oauth2" or "openIdConnect", then the value is a list of scope names required for the execution, and the list MAY be empty if authorization does not require a specified scope. For other security scheme types, the array MAY contain a list of role names which are required for the execution, but are not otherwise defined or exchanged in-band.Each name MUST correspond to a security scheme which is declared in the Security Schemes under the Components Object. If the security scheme is of type "oauth2" or "openIdConnect", then the value is a list of scope names required for the execution, and the list MAY be empty if authorization does not require a specified scope. For other security scheme types, the array MAY contain a list of role names which are required for the execution, but are not otherwise defined or exchanged in-band.
    -

    Security Requirement Object Examples

    -
    Non-OAuth2 Security Requirement
    +
    4.8.30.2 Security Requirement Object Examples
    +
    4.8.30.2.1 Non-OAuth2 Security Requirement
    
     {
    -  "api_key": []
    +  "api_key": []
     }
     
    
     api_key: []
     
    -
    OAuth2 Security Requirement
    +
    4.8.30.2.2 OAuth2 Security Requirement
    
     {
    -  "petstore_auth": [
    -    "write:pets",
    -    "read:pets"
    +  "petstore_auth": [
    +    "write:pets",
    +    "read:pets"
       ]
     }
     
    @@ -3942,16 +4173,16 @@ - write:pets - read:pets
    -
    Optional OAuth2 Security
    +
    4.8.30.2.3 Optional OAuth2 Security

    Optional OAuth2 security as would be defined in an OpenAPI Object or an Operation Object:

    
     {
    -  "security": [
    +  "security": [
         {},
         {
    -      "petstore_auth": [
    -        "write:pets",
    -        "read:pets"
    +      "petstore_auth": [
    +        "write:pets",
    +        "read:pets"
           ]
         }
       ]
    @@ -3964,9 +4195,9 @@
         - write:pets
         - read:pets
     
    -

    Specification Extensions

    +

    4.9 Specification Extensions

    While the OpenAPI Specification tries to accommodate most use cases, additional data can be added to extend the specification at certain points.

    -

    The extensions properties are implemented as patterned fields that are always prefixed by "x-".

    +

    The extensions properties are implemented as patterned fields that are always prefixed by "x-".

    @@ -3977,23 +4208,23 @@ - + - +
    ^x-^x- AnyAllows extensions to the OpenAPI Schema. The field name MUST begin with x-, for example, x-internal-id. Field names beginning x-oai- and x-oas- are reserved for uses defined by the OpenAPI Initiative. The value can be null, a primitive, an array or an object.Allows extensions to the OpenAPI Schema. The field name MUST begin with x-, for example, x-internal-id. Field names beginning x-oai- and x-oas- are reserved for uses defined by the OpenAPI Initiative. The value can be null, a primitive, an array or an object.

    The extensions may or may not be supported by the available tooling, but those may be extended as well to add requested support (if tools are internal or open-sourced).

    -

    Security Filtering

    -

    Some objects in the OpenAPI Specification MAY be declared and remain empty, or be completely removed, even though they are inherently the core of the API documentation.

    +

    4.10 Security Filtering

    +

    Some objects in the OpenAPI Specification MAY be declared and remain empty, or be completely removed, even though they are inherently the core of the API documentation.

    The reasoning is to allow an additional layer of access control over the documentation. -While not part of the specification itself, certain libraries MAY choose to allow access to parts of the documentation based on some form of authentication/authorization.

    +While not part of the specification itself, certain libraries MAY choose to allow access to parts of the documentation based on some form of authentication/authorization.

    Two examples of this:

      -
    1. The Paths Object MAY be present but empty. It may be counterintuitive, but this may tell the viewer that they got to the right place, but can’t access any documentation. They would still have access to at least the Info Object which may contain additional information regarding authentication.
    2. -
    3. The Path Item Object MAY be empty. In this case, the viewer will be aware that the path exists, but will not be able to see any of its operations or parameters. This is different from hiding the path itself from the Paths Object, because the user will be aware of its existence. This allows the documentation provider to finely control what the viewer can see.
    4. +
    5. The Paths Object MAY be present but empty. It may be counterintuitive, but this may tell the viewer that they got to the right place, but can’t access any documentation. They would still have access to at least the Info Object which may contain additional information regarding authentication.
    6. +
    7. The Path Item Object MAY be empty. In this case, the viewer will be aware that the path exists, but will not be able to see any of its operations or parameters. This is different from hiding the path itself from the Paths Object, because the user will be aware of its existence. This allows the documentation provider to finely control what the viewer can see.
    -

    Appendix A: Revision History

    +

    A. Appendix A: Revision History

    @@ -4081,3 +4312,311 @@
    +

    B. References

    B.1 Normative references

    + +
    [RFC1866]
    + Hypertext Markup Language - 2.0. T. Berners-Lee; D. Connolly. IETF. November 1995. Historic. URL: https://www.rfc-editor.org/rfc/rfc1866 +
    [RFC2045]
    + Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies. N. Freed; N. Borenstein. IETF. November 1996. Draft Standard. URL: https://www.rfc-editor.org/rfc/rfc2045 +
    [RFC2119]
    + Key words for use in RFCs to Indicate Requirement Levels. S. Bradner. IETF. March 1997. Best Current Practice. URL: https://www.rfc-editor.org/rfc/rfc2119 +
    [RFC3986]
    + Uniform Resource Identifier (URI): Generic Syntax. T. Berners-Lee; R. Fielding; L. Masinter. IETF. January 2005. Internet Standard. URL: https://www.rfc-editor.org/rfc/rfc3986 +
    [RFC4648]
    + The Base16, Base32, and Base64 Data Encodings. S. Josefsson. IETF. October 2006. Proposed Standard. URL: https://www.rfc-editor.org/rfc/rfc4648 +
    [RFC6570]
    + URI Template. J. Gregorio; R. Fielding; M. Hadley; M. Nottingham; D. Orchard. IETF. March 2012. Proposed Standard. URL: https://www.rfc-editor.org/rfc/rfc6570 +
    [RFC6749]
    + The OAuth 2.0 Authorization Framework. D. Hardt, Ed.. IETF. October 2012. Proposed Standard. URL: https://www.rfc-editor.org/rfc/rfc6749 +
    [RFC6838]
    + Media Type Specifications and Registration Procedures. N. Freed; J. Klensin; T. Hansen. IETF. January 2013. Best Current Practice. URL: https://www.rfc-editor.org/rfc/rfc6838 +
    [RFC6901]
    + JavaScript Object Notation (JSON) Pointer. P. Bryan, Ed.; K. Zyp; M. Nottingham, Ed.. IETF. April 2013. Proposed Standard. URL: https://www.rfc-editor.org/rfc/rfc6901 +
    [RFC7159]
    + The JavaScript Object Notation (JSON) Data Interchange Format. T. Bray, Ed.. IETF. March 2014. Proposed Standard. URL: https://www.rfc-editor.org/rfc/rfc7159 +
    [RFC7230]
    + Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing. R. Fielding, Ed.; J. Reschke, Ed.. IETF. June 2014. Proposed Standard. URL: https://httpwg.org/specs/rfc7230.html +
    [RFC7231]
    + Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content. R. Fielding, Ed.; J. Reschke, Ed.. IETF. June 2014. Proposed Standard. URL: https://httpwg.org/specs/rfc7231.html +
    [RFC7235]
    + Hypertext Transfer Protocol (HTTP/1.1): Authentication. R. Fielding, Ed.; J. Reschke, Ed.. IETF. June 2014. Proposed Standard. URL: https://httpwg.org/specs/rfc7235.html +
    [RFC7578]
    + Returning Values from Forms: multipart/form-data. L. Masinter. IETF. July 2015. Proposed Standard. URL: https://www.rfc-editor.org/rfc/rfc7578 +
    [RFC8174]
    + Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words. B. Leiba. IETF. May 2017. Best Current Practice. URL: https://www.rfc-editor.org/rfc/rfc8174 +
    +
    \ No newline at end of file