Skip to content

Commit 528c3c7

Browse files
authored
Merge branch 'v3.0.4-dev' into v3.0.4-dev
2 parents 11ba729 + def3109 commit 528c3c7

File tree

1 file changed

+19
-15
lines changed

1 file changed

+19
-15
lines changed

versions/3.0.4.md

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,8 @@ Two formats, `binary` and `byte`, describe different ways to work with binary da
171171
* `binary` is used where unencoded binary data is allowed, such as when sending a binary payload as an HTTP message body, or as part of a `multipart/*` payload that allows binary parts
172172
* `byte` is used where binary data is embedded in a text-only format such as `application/json` or `application/x-www-form-urlencoded`
173173

174+
The `maxLength` keyword MAY be used to set an expected upper bound on the length of a streaming payload. The keyword can be applied to either string data, including encoded binary data, or to unencoded binary data. For unencoded binary, the length is the number of octets.
175+
174176
Note that the encoding indicated by `byte`, which inflates the size of data in order to represent it as 7-bit ASCII text, is unrelated to HTTP's `Content-Encoding` header, which indicates whether and how a message body has been compressed.
175177

176178
### <a name="richText"></a>Rich Text Formatting
@@ -1048,16 +1050,17 @@ Field Name | Type | Description
10481050

10491051
In order to support common ways of serializing simple parameters, a set of `style` values are defined.
10501052

1051-
`style` | [`type`](#dataTypes) | `in` | Comments
1053+
`style` | [`type`](#dataTypes) | `in` | Comments
10521054
----------- | ------ | -------- | --------
1053-
matrix | `primitive`, `array`, `object` | `path` | Path-style parameters defined by [RFC6570](https://tools.ietf.org/html/rfc6570#section-3.2.7)
1054-
label | `primitive`, `array`, `object` | `path` | Label style parameters defined by [RFC6570](https://tools.ietf.org/html/rfc6570#section-3.2.5)
1055-
form | `primitive`, `array`, `object` | `query`, `cookie` | Form style parameters defined by [RFC6570](https://tools.ietf.org/html/rfc6570#section-3.2.8). This option replaces `collectionFormat` with a `csv` (when `explode` is false) or `multi` (when `explode` is true) value from OpenAPI 2.0.
1056-
simple | `primitive`, `array`, `object` | `path`, `header` | Simple style parameters defined by [RFC6570](https://tools.ietf.org/html/rfc6570#section-3.2.2). This option replaces `collectionFormat` with a `csv` value from OpenAPI 2.0.
1055+
matrix | `primitive`, `array`, `object` | `path` | Path-style parameters defined by [RFC6570](https://tools.ietf.org/html/rfc6570#section-3.2.7)
1056+
label | `primitive`, `array`, `object` | `path` | Label style parameters defined by [RFC6570](https://tools.ietf.org/html/rfc6570#section-3.2.5)
1057+
simple | `primitive`, `array`, `object` | `path`, `header` | Simple style parameters defined by [RFC6570](https://tools.ietf.org/html/rfc6570#section-3.2.2). This option replaces `collectionFormat` with a `csv` value from OpenAPI 2.0.
1058+
form | `primitive`, `array`, `object` | `query`, `cookie` | Form style parameters defined by [RFC6570](https://tools.ietf.org/html/rfc6570#section-3.2.8). This option replaces `collectionFormat` with a `csv` (when `explode` is false) or `multi` (when `explode` is true) value from OpenAPI 2.0.
10571059
spaceDelimited | `array`, `object` | `query` | Space separated array values or object properties and values. This option replaces `collectionFormat` equal to `ssv` from OpenAPI 2.0.
10581060
pipeDelimited | `array`, `object` | `query` | Pipe separated array values or object properties and values. This option replaces `collectionFormat` equal to `pipes` from OpenAPI 2.0.
10591061
deepObject | `object` | `query` | Provides a simple way of rendering nested objects using form parameters.
10601062

1063+
The behavior of applying a style that uses a delimiter to data containing that delimiter is not defined, and is therefore NOT RECOMMENDED. To ensure interoperability, any such delimiter characters need to be escaped prior to serializing with the style, and unescaped after parsing. In the case of `spaceDelimited`, care must be taken to avoid confusing interactions with URL parameter encoding of spaces.
10611064

10621065
##### Style Examples
10631066

@@ -1074,12 +1077,12 @@ The following table shows examples of rendering differences for each value.
10741077
----------- | ------ | -------- | -------- | -------- | -------
10751078
matrix | false | ;color | ;color=blue | ;color=blue,black,brown | ;color=R,100,G,200,B,150
10761079
matrix | true | ;color | ;color=blue | ;color=blue;color=black;color=brown | ;R=100;G=200;B=150
1077-
label | false | . | .blue | .blue,black,brown | .R,100,G,200,B,150
1078-
label | true | . | .blue | .blue.black.brown | .R=100.G=200.B=150
1079-
form | false | color= | color=blue | color=blue,black,brown | color=R,100,G,200,B,150
1080-
form | true | color= | color=blue | color=blue&color=black&color=brown | R=100&G=200&B=150
1080+
label | false | . | .blue | .blue,black,brown | .R,100,G,200,B,150
1081+
label | true | . | .blue | .blue.black.brown | .R=100.G=200.B=150
10811082
simple | false | n/a | blue | blue,black,brown | R,100,G,200,B,150
10821083
simple | true | n/a | blue | blue,black,brown | R=100,G=200,B=150
1084+
form | false | color= | color=blue | color=blue,black,brown | color=R,100,G,200,B,150
1085+
form | true | color= | color=blue | color=blue&color=black&color=brown | R=100&G=200&B=150
10831086
spaceDelimited | false | n/a | n/a | color=blue%20black%20brown | color=R%20100%20G%20200%20B%20150
10841087
pipeDelimited | false | n/a | n/a | color=blue\|black\|brown | color=R\|100\|G\|200\|B\|150
10851088
deepObject | true | n/a | n/a | n/a | color[R]=100&color[G]=200&color[B]=150
@@ -1373,7 +1376,7 @@ Field Name | Type | Description
13731376
<a name="mediaTypeSchema"></a>schema | [Schema Object](#schemaObject) \| [Reference Object](#referenceObject) | The schema defining the content of the request, response, or parameter.
13741377
<a name="mediaTypeExample"></a>example | Any | Example of the media type. The example object SHOULD be in the correct format as specified by the media type. The `example` field is mutually exclusive of the `examples` field. Furthermore, if referencing a `schema` which contains an example, the `example` value SHALL _override_ the example provided by the schema.
13751378
<a name="mediaTypeExamples"></a>examples | Map[ `string`, [Example Object](#exampleObject) \| [Reference Object](#referenceObject)] | Examples of the media type. Each example object SHOULD match the media type and specified schema if present. The `examples` field is mutually exclusive of the `example` field. Furthermore, if referencing a `schema` which contains an example, the `examples` value SHALL _override_ the example provided by the schema.
1376-
<a name="mediaTypeEncoding"></a>encoding | Map[`string`, [Encoding Object](#encodingObject)] | A map between a property name and its encoding information. The key, being the property name, MUST exist in the schema as a property. The encoding object SHALL only apply to `requestBody` objects when the media type is `multipart` or `application/x-www-form-urlencoded`.
1379+
<a name="mediaTypeEncoding"></a>encoding | Map[`string`, [Encoding Object](#encodingObject)] | A map between a property name and its encoding information. The key, being the property name, MUST exist in the schema as a property. The encoding attribute SHALL only apply to [Request Body Objects](#requestBodyObject), and only when the media type is `multipart` or `application/x-www-form-urlencoded`. If no Encoding Object is provided for a property, the behavior is determined by the default values documented for the Encoding Object.
13771380

13781381
This object MAY be extended with [Specification Extensions](#specificationExtensions).
13791382

@@ -1567,7 +1570,7 @@ requestBody:
15671570
$ref: '#/components/schemas/Address'
15681571
```
15691572
1570-
An `encoding` attribute is introduced to give you control over the serialization of parts of `multipart` request bodies. This attribute is _only_ applicable to `multipart` and `application/x-www-form-urlencoded` request bodies.
1573+
An `encoding` attribute is introduced to give you control over the serialization of parts of `multipart` request bodies. This attribute is _only_ applicable to request bodies, and _only_ for `multipart` and `application/x-www-form-urlencoded` media types.
15711574

15721575
#### <a name="encodingObject"></a>Encoding Object
15731576

@@ -2124,7 +2127,7 @@ field in an [Operation Object](#operationObject)), references MAY also be made t
21242127
links:
21252128
UserRepositories:
21262129
# returns array of '#/components/schemas/repository'
2127-
operationRef: '#/paths/~12.0~1repositories~1{username}/get'
2130+
operationRef: '#/paths/~12.0~1repositories~1%7Busername%7D/get'
21282131
parameters:
21292132
username: $response.body#/username
21302133
```
@@ -2135,13 +2138,14 @@ or an absolute `operationRef`:
21352138
links:
21362139
UserRepositories:
21372140
# returns array of '#/components/schemas/repository'
2138-
operationRef: https://na2.gigantic-server.com/#/paths/~12.0~1repositories~1{username}/get
2141+
operationRef: https://na2.gigantic-server.com/#/paths/~12.0~1repositories~1%7Busername%7D/get
21392142
parameters:
21402143
username: $response.body#/username
21412144
```
21422145

21432146
Note that in the use of `operationRef`, the _escaped forward-slash_ is necessary when
2144-
using JSON references.
2147+
using JSON Pointers, and it is necessary to URL-encode `{` and `}` as `%7B` and `%7D`, respectively when
2148+
using JSON Pointers as URI fragments.
21452149

21462150

21472151
##### <a name="runtimeExpression"></a>Runtime Expressions
@@ -2718,7 +2722,7 @@ Field Name | Type | Description
27182722
<a name="propertyName"></a>propertyName | `string` | **REQUIRED**. The name of the property in the payload that will hold the discriminator value.
27192723
<a name="discriminatorMapping"></a> mapping | Map[`string`, `string`] | An object to hold mappings between payload values and schema names or references.
27202724

2721-
The discriminator object is legal only when using one of the composite keywords `oneOf`, `anyOf`, `allOf`.
2725+
The discriminator object is legal only when using one of the composite keywords `oneOf`, `anyOf`, `allOf`. Note that because the discriminating property's value is used as a component name and/or as the key in the `mapping` object, the behavior of any value that is not a string is undefined.
27222726

27232727
In OAS 3.0, a response payload MAY be described to be exactly one of any number of types:
27242728

0 commit comments

Comments
 (0)