Skip to content

Commit ef319b2

Browse files
authored
Merge pull request #3953 from ralfhandl/v3.1.1/sync-with-3.0.4
Align 3.1.1 with 3.0.4
2 parents 10308db + be16865 commit ef319b2

File tree

1 file changed

+24
-22
lines changed

1 file changed

+24
-22
lines changed

versions/3.1.1.md

+24-22
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,6 @@ Field Name | Type | Description
365365
<a name="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.
366366
<a name="oasExternalDocs"></a>externalDocs | [External Documentation Object](#externalDocumentationObject) | Additional external documentation.
367367

368-
369368
This object MAY be extended with [Specification Extensions](#specificationExtensions).
370369

371370
#### <a name="infoObject"></a>Info Object
@@ -433,7 +432,7 @@ Contact information for the exposed API.
433432
Field Name | Type | Description
434433
---|:---:|---
435434
<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.
437436
<a name="contactEmail"></a>email | `string` | The email address of the contact person/organization. This MUST be in the form of an email address.
438437

439438
This object MAY be extended with [Specification Extensions](#specificationExtensions).
@@ -819,13 +818,13 @@ components:
819818
#### <a name="pathsObject"></a>Paths Object
820819

821820
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).
823822

824823
##### Patterned Fields
825824

826825
Field Pattern | Type | Description
827826
---|:---:|---
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.
829828

830829
This object MAY be extended with [Specification Extensions](#specificationExtensions).
831830

@@ -1113,12 +1112,12 @@ requestBody:
11131112
schema:
11141113
type: object
11151114
properties:
1116-
name:
1117-
description: Updated name of the pet
1118-
type: string
1119-
status:
1120-
description: Updated status of the pet
1121-
type: string
1115+
name:
1116+
description: Updated name of the pet
1117+
type: string
1118+
status:
1119+
description: Updated status of the pet
1120+
type: string
11221121
required:
11231122
- status
11241123
responses:
@@ -1512,7 +1511,7 @@ content:
15121511
$ref: '#/components/schemas/User'
15131512
examples:
15141513
user:
1515-
summary: User Example
1514+
summary: User example
15161515
externalValue: https://foo.bar/examples/user-example.json
15171516
application/xml:
15181517
schema:
@@ -1524,7 +1523,7 @@ content:
15241523
text/plain:
15251524
examples:
15261525
user:
1527-
summary: User example in Plain text
1526+
summary: User example in plain text
15281527
externalValue: https://foo.bar/examples/user-example.txt
15291528
'*/*':
15301529
examples:
@@ -1850,7 +1849,6 @@ requestBody:
18501849
# subschema, which is an object, so `application/json`
18511850
type: array
18521851
items:
1853-
type: object
18541852
$ref: '#/components/schemas/Address'
18551853
```
18561854
@@ -1926,9 +1924,9 @@ The documentation is not necessarily expected to cover all possible HTTP respons
19261924
However, documentation is expected to cover a successful operation response and any known errors.
19271925

19281926
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.
19301928

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
19321930
response code is provided it SHOULD be the response for a successful operation
19331931
call.
19341932

@@ -2137,7 +2135,7 @@ To describe incoming requests from the API provider independent from another API
21372135
##### Patterned Fields
21382136
Field Pattern | Type | Description
21392137
---|:---:|---
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.
21412139

21422140
This object MAY be extended with [Specification Extensions](#specificationExtensions).
21432141

@@ -2394,7 +2392,7 @@ In this example, the JSON string had to be serialized before encoding it into th
23942392

23952393
#### <a name="linkObject"></a>Link Object
23962394

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.
23982396
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.
23992397

24002398
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
27902788
`allOf` takes an array of object definitions that are validated *independently* but together compose a single object.
27912789

27922790
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.
27942792
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.
27952797

27962798
###### Generic (Template) Data Structures
27972799

@@ -3313,7 +3315,7 @@ MyResponseType:
33133315
- $ref: '#/components/schemas/Lizard'
33143316
```
33153317

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:
33173319

33183320
```yaml
33193321
MyResponseType:
@@ -3437,7 +3439,7 @@ Field Name | Type | Description
34373439

34383440
This object MAY be extended with [Specification Extensions](#specificationExtensions).
34393441

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:
34413443

34423444
* 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.
34433445
* 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
38813883

38823884
```yaml
38833885
type: oauth2
3884-
flows:
3886+
flows:
38853887
implicit:
38863888
authorizationUrl: https://example.com/api/oauth/dialog
38873889
scopes:
@@ -4186,7 +4188,7 @@ Certain properties allow the use of Markdown which can contain HTML including sc
41864188

41874189
Version | Date | Notes
41884190
--- | --- | ---
4189-
3.1.1 | TBD | TBD
4191+
3.1.1 | TBD | Patch release of the OpenAPI Specification 3.1.1
41904192
3.1.0 | 2021-02-15 | Release of the OpenAPI Specification 3.1.0
41914193
3.1.0-rc1 | 2020-10-08 | rc1 of the 3.1 specification
41924194
3.1.0-rc0 | 2020-06-18 | rc0 of the 3.1 specification

0 commit comments

Comments
 (0)