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
Copy file name to clipboardExpand all lines: versions/3.1.1.md
+11-7Lines changed: 11 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,6 +22,10 @@ For extension registries and other specifications published by the OpenAPI Initi
22
22
23
23
An OpenAPI Description (OAD) formally describes the surface of an API and its semantics. It is composed of an [entry document](#openapi-description-structure) and any/all of its referenced documents. An OAD uses and conforms to the OpenAPI Specification, and MUST contain at least one [paths](#paths-object) field, [components](#oas-components) field, or [webhooks](#oas-webhooks) field.
24
24
25
+
### OpenAPI Document
26
+
27
+
An OpenAPI Document is a single JSON or YAML document that conforms to the OpenAPI Specification.
28
+
25
29
### Schema
26
30
27
31
A "schema" is a formal description of syntax and structure.
@@ -91,11 +95,11 @@ The OpenAPI Specification is versioned using a `major`.`minor`.`patch` versionin
91
95
92
96
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.
93
97
94
-
An OpenAPI Description compatible with OAS 3.\*.\* contains a required [`openapi`](#oas-version) field which designates the version of the OAS that it uses.
98
+
An OpenAPI Document compatible with OAS 3.\*.\* contains a required [`openapi`](#oas-version) field which designates the version of the OAS that it uses.
95
99
96
100
### Format
97
101
98
-
An OpenAPI Description that conforms to the OpenAPI Specification is itself a JSON object, which may be represented either in JSON or YAML format.
102
+
An OpenAPI Document that conforms to the OpenAPI Specification is itself a JSON object, which may be represented either in JSON or YAML format.
99
103
100
104
For example, if a field has an array value, the JSON array representation will be used:
101
105
@@ -121,7 +125,7 @@ In order to preserve the ability to round-trip between YAML and JSON formats, YA
121
125
122
126
### OpenAPI Description Structure
123
127
124
-
An OpenAPI Description (OAD) MAY be structured as a single JSON or YAML document or composed from elements distributed across multiple documents at the discretion of the author. In the latter case, [Reference Object](#reference-object), [Path Item Object](#path-item-object) and [Schema Object](#schema-object)`$ref` keywords, as well as the [Link Object](#link-object)`operationRef` keyword, are used.
128
+
An OpenAPI Description (OAD) MAY be made up of a single JSON or YAML document or be divided into multiple, connected parts at the discretion of the author. In the latter case, [Reference Object](#reference-object), [Path Item Object](#path-item-object) and [Schema Object](#schema-object)`$ref` keywords, as well as the [Link Object](#link-object)`operationRef` keyword, are used.
125
129
126
130
In a multi-document OAD, the document containing the OpenAPI Object where parsing begins is known as that OAD's **entry document**.
127
131
@@ -156,7 +160,7 @@ It is the responsibility of an embedding format to define how to parse embedded
156
160
157
161
JSON or YAML objects within an OAD are interpreted as specific Objects (such as [Operation Objects](#operation-object), [Response Objects](#response-object), [Reference Objects](#reference-object), etc.) based on their context. Depending on how references are arranged, a given JSON or YAML object can be interpreted in multiple different contexts:
158
162
159
-
*The root object of the entry document is interpreted as an OpenAPI Object
163
+
*As the root object of the [entry document](#openapi-description-structure), which is always interpreted as an OpenAPI Object
160
164
* As the Object type implied by its parent Object within the OpenAPI Description
161
165
* As a reference target, with the Object type matching the reference source's context
162
166
@@ -319,7 +323,7 @@ This is the root object of the [OpenAPI Description](#openapi-description).
319
323
320
324
| Field Name | Type | Description |
321
325
| ---- | :----: | ---- |
322
-
| <aname="oas-version"></a>openapi |`string`|**REQUIRED**. This string MUST be the [version number](#versions) of the OpenAPI Specification that the OpenAPI Description uses. The `openapi` field SHOULD be used by tooling to interpret the OpenAPI Description. This is _not_ related to the API [`info.version`](#info-version) string. |
326
+
| <aname="oas-version"></a>openapi |`string`|**REQUIRED**. This string MUST be the [version number](#versions) 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`](#info-version) string. |
323
327
| <aname="oas-info"></a>info |[Info Object](#info-object)|**REQUIRED**. Provides metadata about the API. The metadata MAY be used by tooling as required. |
324
328
| <aname="oas-json-schema-dialect"></a> jsonSchemaDialect |`string`| The default value for the `$schema` keyword within [Schema Objects](#schema-object) contained within this OAS document. This MUST be in the form of a URI. |
325
329
| <aname="oas-servers"></a>servers |[[Server Object](#server-object)]| An array of Server Objects, which provide connectivity information to a target server. If the `servers` field is not provided, or is an empty array, the default value would be a [Server Object](#server-object) with a [url](#server-url) value of `/`. |
@@ -347,7 +351,7 @@ The metadata MAY be used by the clients if needed, and MAY be presented in editi
347
351
| <aname="info-terms-of-service"></a>termsOfService |`string`| A URI for the Terms of Service for the API. This MUST be in the form of a URI. |
348
352
| <aname="info-contact"></a>contact |[Contact Object](#contact-object)| The contact information for the exposed API. |
349
353
| <aname="info-license"></a>license |[License Object](#license-object)| The license information for the exposed API. |
350
-
| <aname="info-version"></a>version |`string`|**REQUIRED**. The version of the OpenAPI Description (which is distinct from the [OpenAPI Specification version](#oas-version) or the version of the API being described). |
354
+
| <aname="info-version"></a>version |`string`|**REQUIRED**. The version of the OpenAPI Document (which is distinct from the [OpenAPI Specification version](#oas-version) or the version of the API being described or the version of the OpenAPI Description). |
351
355
352
356
This object MAY be extended with [Specification Extensions](#specification-extensions).
353
357
@@ -3319,7 +3323,7 @@ However, the exact nature of such conversions are implementation-defined.
3319
3323
3320
3324
##### Examples
3321
3325
3322
-
For these examples, assume all schemas are in a single-document OpenAPI Description; for handling of `discriminator` in referenced documents see [Resolving Implicit Connections](#resolving-implicit-connections).
3326
+
For these examples, assume all schemas are in the [entry document](#openapi-description-structure) of the OAD; for handling of `discriminator` in referenced documents see [Resolving Implicit Connections](#resolving-implicit-connections).
3323
3327
3324
3328
In OAS 3.x, a response payload MAY be described to be exactly one of any number of types:
0 commit comments