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
+24-22
Original file line number
Diff line number
Diff line change
@@ -365,7 +365,6 @@ Field Name | Type | Description
365
365
<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.
This object MAY be extended with [Specification Extensions](#specificationExtensions).
370
369
371
370
#### <aname="infoObject"></a>Info Object
@@ -433,7 +432,7 @@ Contact information for the exposed API.
433
432
Field Name | Type | Description
434
433
---|:---:|---
435
434
<a name="contactName"></a>name | `string` | The identifying name of the contact person/organization.
436
-
<a name="contactUrl"></a>url | `string` | The URI for to the contact information. This MUST be in the form of a URI.
435
+
<a name="contactUrl"></a>url | `string` | The URI for the contact information. This MUST be in the form of a URI.
437
436
<a name="contactEmail"></a>email | `string` | The email address of the contact person/organization. This MUST be in the form of an email address.
438
437
439
438
This object MAY be extended with [Specification Extensions](#specificationExtensions).
@@ -819,13 +818,13 @@ components:
819
818
#### <a name="pathsObject"></a>Paths Object
820
819
821
820
Holds the relative paths to the individual endpoints and their operations.
822
-
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).
821
+
The path is appended to the URL from the [Server Object](#serverObject) in order to construct the full URL. The Paths Object MAY be empty, due to [Access Control List (ACL) constraints](#securityFiltering).
823
822
824
823
##### Patterned Fields
825
824
826
825
Field Pattern | Type | Description
827
826
---|:---:|---
828
-
<a name="pathsPath"></a>/{path} | [Path Item Object](#pathItemObject) | 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`](#serverObject)'s `url` field in order to construct the full URL. [Path templating](#pathTemplating) 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.
827
+
<a name="pathsPath"></a>/{path} | [Path Item Object](#pathItemObject) | 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](#serverObject)'s `url` field in order to construct the full URL. [Path templating](#pathTemplating) 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.
829
828
830
829
This object MAY be extended with [Specification Extensions](#specificationExtensions).
# subschema, which is an object, so `application/json`
1851
1850
type: array
1852
1851
items:
1853
-
type: object
1854
1852
$ref: '#/components/schemas/Address'
1855
1853
```
1856
1854
@@ -1926,9 +1924,9 @@ The documentation is not necessarily expected to cover all possible HTTP respons
1926
1924
However, documentation is expected to cover a successful operation response and any known errors.
1927
1925
1928
1926
The `default` MAY be used as a default response object for all HTTP codes
1929
-
that are not covered individually by the `Responses Object`.
1927
+
that are not covered individually by the Responses Object.
1930
1928
1931
-
The `Responses Object` MUST contain at least one response code, and if only one
1929
+
The Responses Object MUST contain at least one response code, and if only one
1932
1930
response code is provided it SHOULD be the response for a successful operation
1933
1931
call.
1934
1932
@@ -2137,7 +2135,7 @@ To describe incoming requests from the API provider independent from another API
2137
2135
##### Patterned Fields
2138
2136
Field Pattern | Type | Description
2139
2137
---|:---:|---
2140
-
<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.
2138
+
<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.
2141
2139
2142
2140
This object MAY be extended with [Specification Extensions](#specificationExtensions).
2143
2141
@@ -2394,7 +2392,7 @@ In this example, the JSON string had to be serialized before encoding it into th
2394
2392
2395
2393
#### <a name="linkObject"></a>Link Object
2396
2394
2397
-
The `Link object` represents a possible design-time link for a response.
2395
+
The Link Object represents a possible design-time link for a response.
2398
2396
The presence of a link does not guarantee the caller's ability to successfully invoke it, rather it provides a known relationship and traversal mechanism between responses and other operations.
2399
2397
2400
2398
Unlike _dynamic_ links (i.e. links provided **in** the response payload), the OAS linking mechanism does not require link information in the runtime response.
@@ -2790,8 +2788,12 @@ The OpenAPI Specification allows combining and extending model definitions using
2790
2788
`allOf`takes an array of object definitions that are validated *independently* but together compose a single object.
2791
2789
2792
2790
While composition offers model extensibility, it does not imply a hierarchy between the models.
2793
-
To support polymorphism, the OpenAPI Specification adds the `discriminator` keyword.
2791
+
To support polymorphism, the OpenAPI Specification adds the [`discriminator`](#schemaDiscriminator) field.
2794
2792
When used, the `discriminator` indicates the name of the property that hints which schema definition is expected to validate the structure of the model.
2793
+
As such, the `discriminator` field MUST be a required field.
2794
+
There are two ways to define the value of a discriminator for an inheriting instance.
2795
+
- Use the schema name.
2796
+
- [Override the schema name](#discriminatorMapping) by overriding the property with a new value. If a new value exists, this takes precedence over the schema name.
2795
2797
2796
2798
###### Generic (Template) Data Structures
2797
2799
@@ -3313,7 +3315,7 @@ MyResponseType:
3313
3315
- $ref: '#/components/schemas/Lizard'
3314
3316
```
3315
3317
3316
-
which means the payload _MUST_, by validation, match exactly one of the schemas described by `Cat`, `Dog`, or `Lizard`. Deserialization of a `oneOf` can be a costly operation, as it requires determining which schema matches the payload and thus should be used in deserialization. This problem also exists for `anyOf` schemas. A `discriminator` MAY be used as a "hint" to improve the efficiency of selection of the matching schema. The `discriminator` keyword cannot change the validation result of the `oneOf`, it can only help make the deserialization more efficient and provide better error messaging. We can specify the exact field that tells us which schema is expected to match the instance:
3318
+
which means the payload _MUST_, by validation, match exactly one of the schemas described by `Cat`, `Dog`, or `Lizard`. Deserialization of a `oneOf` can be a costly operation, as it requires determining which schema matches the payload and thus should be used in deserialization. This problem also exists for `anyOf` schemas. A `discriminator` MAY be used as a "hint" to improve the efficiency of selection of the matching schema. The `discriminator` field cannot change the validation result of the `oneOf`, it can only help make the deserialization more efficient and provide better error messaging. We can specify the exact field that tells us which schema is expected to match the instance:
3317
3319
3318
3320
```yaml
3319
3321
MyResponseType:
@@ -3437,7 +3439,7 @@ Field Name | Type | Description
3437
3439
3438
3440
This object MAY be extended with [Specification Extensions](#specificationExtensions).
3439
3441
3440
-
The `namespace` keyword is intended to match the syntax of [XML namespaces](https://www.w3.org/TR/xml-names11/), although there are a few caveats:
3442
+
The `namespace` field is intended to match the syntax of [XML namespaces](https://www.w3.org/TR/xml-names11/), although there are a few caveats:
3441
3443
3442
3444
* Versions 3.1.0, 3.0.3, and earlier of this specification erroneously used the term "absolute URI" instead of "non-relative URI", so authors using namespaces that include a fragment should check tooling support carefully.
3443
3445
* XML allows but discourages relative URI-references, while this specification outright forbids them.
@@ -3881,7 +3883,7 @@ description: Cert must be signed by example.com CA
0 commit comments