You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Make paths object optional
* Adding reusable Path Item Objects
Under `components`
* Adopt DM's suggested change to OpenAPI doc definition
* Cleanup use of specification and definition where we mean document
* multipartite>composite, define ACL
* Add ' | Reference Object' to callbacks/webhooks
Co-authored-by: Ron <[email protected]>
Copy file name to clipboardExpand all lines: versions/3.1.0.md
+18-15
Original file line number
Diff line number
Diff line change
@@ -68,7 +68,7 @@ An OpenAPI definition can then be used by documentation generation tools to disp
68
68
## Definitions
69
69
70
70
##### <aname="oasDocument"></a>OpenAPI Document
71
-
A document (or set of documents) that defines or describes an API. An OpenAPI definition uses and conforms to the OpenAPI Specification.
71
+
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](#pathsObject) field, a [components](#oasComponents) field or a [webhooks](#oasWebhooks) field. An OpenAPI document uses and conforms to the OpenAPI Specification.
72
72
73
73
##### <aname="pathTemplating"></a>Path Templating
74
74
Path templating refers to the usage of curly braces ({}) to mark a section of a URL path as replaceable using path parameters.
@@ -183,7 +183,7 @@ In the following description, if a field is not explicitly **REQUIRED** or descr
183
183
184
184
#### <aname="oasObject"></a>OpenAPI Object
185
185
186
-
This is the root document object of the [OpenAPI document](#oasDocument).
186
+
This is the root object of the [OpenAPI document](#oasDocument).
187
187
188
188
##### Fixed Fields
189
189
@@ -192,11 +192,11 @@ Field Name | Type | Description
192
192
<aname="oasVersion"></a>openapi | `string` | **REQUIRED**. This string MUST be the [semantic version number](https://semver.org/spec/v2.0.0.html) of the [OpenAPI Specification version](#versions) 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`](#infoVersion) string.
193
193
<aname="oasInfo"></a>info | [Info Object](#infoObject) | **REQUIRED**. Provides metadata about the API. The metadata MAY be used by tooling as required.
194
194
<aname="oasServers"></a>servers | [[Server Object](#serverObject)] | 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](#serverObject) with a [url](#serverUrl) value of `/`.
195
-
<aname="oasPaths"></a>paths | [Paths Object](#pathsObject) | **REQUIRED**. The available paths and operations for the API.
196
-
<aname="oasWebhooks"></a>webhooks | Map[`string`, [Path Item Object](#pathItemObject)]| 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 Path Item Object describes a request that may be initiated by the API provider and the expected responses. An [example](../examples/v3.1/webhook-example.yaml) is available.
197
-
<aname="oasComponents"></a>components | [Components Object](#componentsObject) | An element to hold various schemas for the specification.
195
+
<aname="oasPaths"></a>paths | [Paths Object](#pathsObject) | The available paths and operations for the API.
196
+
<aname="oasWebhooks"></a>webhooks | Map[`string`, [Path Item Object](#pathItemObject)\|[Reference Object](#referenceObject)]]| 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](../examples/v3.1/webhook-example.yaml) is available.
197
+
<aname="oasComponents"></a>components | [Components Object](#componentsObject) | An element to hold various schemas for the document.
198
198
<aname="oasSecurity"></a>security | [[Security Requirement Object](#securityRequirementObject)] | 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.
199
-
<aname="oasTags"></a>tags | [[Tag Object](#tagObject)] | 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](#operationObject) 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.
199
+
<aname="oasTags"></a>tags | [[Tag Object](#tagObject)] | 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](#operationObject) 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.
@@ -459,6 +459,8 @@ Field Name | Type | Description
459
459
<a name="componentsSecuritySchemes"></a> securitySchemes| Map[`string`, [Security Scheme Object](#securitySchemeObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Security Scheme Objects](#securitySchemeObject).
460
460
<a name="componentsLinks"></a> links | Map[`string`, [Link Object](#linkObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Link Objects](#linkObject).
461
461
<a name="componentsCallbacks"></a> callbacks | Map[`string`, [Callback Object](#callbackObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Callback Objects](#callbackObject).
462
+
<a name="componentsPathItems"></a> pathItems | Map[`string`, [Path Item Object](#pathItemObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Path Item Object](#pathItemObject).
463
+
462
464
463
465
This object MAY be extended with [Specification Extensions](#specificationExtensions).
464
466
@@ -652,7 +654,7 @@ components:
652
654
#### <a name="pathsObject"></a>Paths Object
653
655
654
656
Holds the relative paths to the individual endpoints and their operations.
655
-
The path is appended to the URL from the [`Server Object`](#serverObject) in order to construct the full URL. The Paths MAY be empty, due to [ACL constraints](#securityFiltering).
657
+
The path is appended to the URL from the [`Server Object`](#serverObject) in order to construct the full URL. The Paths MAY be empty, due to [Access Control List (ACL) constraints](#securityFiltering). Paths MAY be omitted in some classes of OAS documents, including referenced sub-documents and overlays.
656
658
657
659
##### Patterned Fields
658
660
@@ -1642,10 +1644,11 @@ The documentation is not necessarily expected to cover all possible HTTP respons
1642
1644
However, documentation is expected to cover a successful operation response and any known errors.
1643
1645
1644
1646
The `default` MAY be used as a default response object for all HTTP codes
1645
-
that are not covered individually by the specification.
1647
+
that are not covered individually by the `Responses Object`.
1646
1648
1647
-
The `Responses Object` MUST contain at least one response code, and it
1648
-
SHOULD be the response for a successful operation call.
1649
+
The `Responses Object` MUST contain at least one response code, and if only one
1650
+
response code is provided it SHOULD be the response for a successful operation
1651
+
call.
1649
1652
1650
1653
##### Fixed Fields
1651
1654
Field Name | Type | Description
@@ -1852,7 +1855,7 @@ To describe incoming requests from the API provider independent from another API
1852
1855
##### Patterned Fields
1853
1856
Field Pattern | Type | Description
1854
1857
---|:---:|---
1855
-
<a name="callbackExpression"></a>{expression} | [Path Item Object](#pathItemObject) | A Path Item Object used to define a callback request and expected responses. A [complete example](../examples/v3.0/callback-example.yaml) is available.
1858
+
<a name="callbackExpression"></a>{expression} | [Path Item Object](#pathItemObject) \| [Reference Object](#referenceObject) | A Path Item Object, or a reference to one, used to define a callback request and expected responses. A [complete example](../examples/v3.0/callback-example.yaml) is available.
1856
1859
1857
1860
This object MAY be extended with [Specification Extensions](#specificationExtensions).
1858
1861
@@ -2046,7 +2049,7 @@ This object MAY be extended with [Specification Extensions](#specificationExtens
2046
2049
A linked operation MUST be identified using either an `operationRef` or `operationId`.
2047
2050
In the case of an `operationId`, it MUST be unique and resolved in the scope of the OAS document.
2048
2051
Because of the potential for name clashes, the `operationRef` syntax is preferred
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.
2676
+
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.
2674
2677
2675
2678
When using the discriminator, _inline_ schemas will not be considered.
2676
2679
@@ -3389,7 +3392,7 @@ While not part of the specification itself, certain libraries MAY choose to allo
3389
3392
3390
3393
Two examples of this:
3391
3394
3392
-
1. The [Paths Object](#pathsObject) 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](#infoObject) which may contain additional information regarding authentication.
3395
+
1. The [Paths Object](#pathsObject) 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](#infoObject) which may contain additional information regarding authentication.
3393
3396
2. The [Path Item Object](#pathItemObject) 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](#pathsObject), so the user will not be aware of its existence. This allows the documentation provider to finely control what the viewer can see.
3394
3397
3395
3398
## <a name="revisionHistory"></a>Appendix A: Revision History
0 commit comments