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
+7-9Lines changed: 7 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,11 +20,11 @@ For extension registries and other specifications published by the OpenAPI Initi
20
20
21
21
### OpenAPI Description
22
22
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.
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), which must be an OpenAPI Document, 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
25
### OpenAPI Document
26
26
27
-
An OpenAPI Document is a single JSON or YAML document that conforms to the OpenAPI Specification.
27
+
An OpenAPI Document is a single JSON or YAML document that conforms to the OpenAPI Specification. An OpenAPI Document compatible with OAS 3.\*.\* contains a required [`openapi`](#oas-version) field which designates the version of the OAS that it uses.
28
28
29
29
### Schema
30
30
@@ -95,8 +95,6 @@ The OpenAPI Specification is versioned using a `major`.`minor`.`patch` versionin
95
95
96
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.
97
97
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.
99
-
100
98
### Format
101
99
102
100
An OpenAPI Document that conforms to the OpenAPI Specification is itself a JSON object, which may be represented either in JSON or YAML format.
@@ -125,7 +123,7 @@ In order to preserve the ability to round-trip between YAML and JSON formats, YA
125
123
126
124
### OpenAPI Description Structure
127
125
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.
126
+
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, and the URI form of the [Discriminator Object](#discriminator-object) mapping keyword, are used to identify the referenced elements.
129
127
130
128
In a multi-document OAD, the document containing the OpenAPI Object where parsing begins is known as that OAD's **entry document**.
131
129
@@ -329,7 +327,7 @@ This is the root object of the [OpenAPI Description](#openapi-description).
329
327
| <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 `/`. |
330
328
| <aname="oas-paths"></a>paths |[Paths Object](#paths-object)| The available paths and operations for the API. |
331
329
| <aname="oas-webhooks"></a>webhooks | Map[`string`, [Path Item Object](#path-item-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](https://learn.openapis.org/examples/v3.1/webhook-example.html) is available. |
332
-
| <aname="oas-components"></a>components |[Components Object](#components-object)| An element to hold various schemas for the description. |
330
+
| <aname="oas-components"></a>components |[Components Object](#components-object)| An element to hold various Objects for the description. |
333
331
| <aname="oas-security"></a>security |[[Security Requirement Object](#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. The list can be incomplete, up to being empty or absent. To make security explicitly optional, an empty security requirement (`{}`) can be included in the array. |
334
332
| <aname="oas-tags"></a>tags |[[Tag Object](#tag-object)]| A list of tags used by the description 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](#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. |
@@ -2228,7 +2226,7 @@ Because examples using these fields represent the final serialized form of the d
2228
2226
The singular `example` field in the Parameter or Media Type Object is concise and convenient for simple examples, but does not offer any other advantages over using Example Objects under `examples`.
2229
2227
2230
2228
Some examples cannot be represented directly in JSON or YAML.
2231
-
For all three ways of providing examples, these can be shown as string values with any escaping necessary to make the string valid in the JSON or YAML format of the OpenAPI Description.
2229
+
For all three ways of providing examples, these can be shown as string values with any escaping necessary to make the string valid in the JSON or YAML format of documents that comprise the OpenAPI Description.
2232
2230
With the Example Object, such values can alternatively be handled through the `externalValue` field.
2233
2231
2234
2232
##### Example Object Examples
@@ -2378,7 +2376,7 @@ For computing links and providing instructions to execute them, a [runtime expre
2378
2376
2379
2377
| Field Name | Type | Description |
2380
2378
| ---- | :----: | ---- |
2381
-
| <a name="link-operation-ref"></a>operationRef | `string` | A URI identifying an OAS operation. This field is mutually exclusive of the `operationId` field, and MUST point to an [Operation Object](#operation-object). Relative `operationRef` values MAY be used to locate an existing [Operation Object](#operation-object) in the OpenAPI description. See the rules for resolving [Relative References](#relative-references-in-api-description-uris). |
2379
+
| <a name="link-operation-ref"></a>operationRef | `string` | A URI reference to an OAS operation. This field is mutually exclusive of the `operationId` field, and MUST point to an [Operation Object](#operation-object). Relative `operationRef` values MAY be used to locate an existing [Operation Object](#operation-object) in the OpenAPI Description. |
2382
2380
| <a name="link-operation-id"></a>operationId | `string` | The name of an _existing_, resolvable OAS operation, as defined with a unique `operationId`. This field is mutually exclusive of the `operationRef` field. |
2383
2381
| <a name="link-parameters"></a>parameters | Map[`string`, Any \| [{expression}](#runtime-expressions)] | A map representing parameters to pass to an operation as specified with `operationId` or identified via `operationRef`. The key is the parameter name to be used (optionally qualified with the parameter location, e.g. `path.id` for an `id` parameter in the path), whereas the value can be a constant or an expression to be evaluated and passed to the linked operation. |
2384
2382
| <a name="link-request-body"></a>requestBody | Any \| [{expression}](#runtime-expressions) | A literal value or [{expression}](#runtime-expressions) to use as a request body when calling the target operation. |
0 commit comments