Skip to content

Commit 7f49b70

Browse files
committed
Remove "byte" and "binary" formats altogether.
Instead of just deprecating. The "content*" keywords now cover these use cases.
1 parent dcf9878 commit 7f49b70

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

versions/3.1.0.md

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -164,13 +164,6 @@ The formats defined by the OAS are:
164164
`number` | `float` | |
165165
`number` | `double` | |
166166
`string` | `password` | A hint to UIs to obscure input.
167-
`string` | `byte` | base64 encoded characters **Deprecated**
168-
`string` | `binary` | any sequence of octets **Deprecated**
169-
170-
Use of `byte` or `binary` is discouraged, and later versions of this specification may remove them from this list. They SHOULD be replaced with the JSON Schema keywords `contentEncoding` or `contentMediaType` as follows:
171-
172-
* replace `"format": "byte"` with `"contentEncoding": "base64"` or `"contentEncoding": "base64url"`
173-
* replace `"format": "binary"` with `"contentMediaType": "application/octet-stream"` or an appropriate specific media type
174167

175168
### <a name="richText"></a>Rich Text Formatting
176169
Throughout the specification `description` fields are noted as supporting CommonMark markdown formatting.
@@ -1550,7 +1543,6 @@ When passing in `multipart` types, boundaries MAY be used to separate sections o
15501543
* If the property is complex, or an array of complex values, the default Content-Type is `application/json`
15511544
* If the property is a `type: string` with a `contentMediaType`, the Content-Type is the value from `contentMediaType`
15521545
* If the property is a `type: string` with a `contentEncoding` of `base64` or `base64url`, but does _not_ have a `contentMediaType`, the default Content-Type is `application/octet-stream`
1553-
* **Deprecated:** If the property is a `type: string` with `format: binary` or `format: base64` (aka a file object), the default Content-Type is `application/octet-stream`
15541546

15551547

15561548
Examples:
@@ -1594,7 +1586,7 @@ A single encoding definition applied to a single schema property.
15941586
##### Fixed Fields
15951587
Field Name | Type | Description
15961588
---|:---:|---
1597-
<a name="encodingContentType"></a>contentType | `string` | The Content-Type for encoding a specific property. Default value depends on the property type: for `string` with a `contentMediaType` - `contentMediaType`; for other primitive types – `text/plain`; for `object` - `application/json`; for `array` – the default is defined based on the inner type. The value can be a specific media type (e.g. `application/json`), a wildcard media type (e.g. `image/*`), or a comma-separated list of the two types; **Deprecated:** for `string` with `format` being `binary` – `application/octet-stream`.
1589+
<a name="encodingContentType"></a>contentType | `string` | The Content-Type for encoding a specific property. Default value depends on the property type: for `string` with a `contentMediaType` - `contentMediaType`; for other primitive types – `text/plain`; for `object` - `application/json`; for `array` – the default is defined based on the inner type. The value can be a specific media type (e.g. `application/json`), a wildcard media type (e.g. `image/*`), or a comma-separated list of the two types.
15981590
<a name="encodingHeaders"></a>headers | Map[`string`, [Header Object](#headerObject) \| [Reference Object](#referenceObject)] | A map allowing additional information to be provided as headers, for example `Content-Disposition`. `Content-Type` is described separately and SHALL be ignored in this section. This property SHALL be ignored if the request body media type is not a `multipart`.
15991591
<a name="encodingStyle"></a>style | `string` | Describes how a specific property value will be serialized depending on its type. See [Parameter Object](#parameterObject) for details on the [`style`](#parameterStyle) property. The behavior follows the same values as `query` parameters, including default values. This property SHALL be ignored if the request body media type is not `application/x-www-form-urlencoded` or `multipart/form-data`. If a value is explicitly defined, then the value of [`contentType`](#encodingContentType) (implicit or explicit) SHALL be ignored.
16001592
<a name="encodingExplode"></a>explode | `boolean` | When this is true, property values of type `array` or `object` generate separate parameters for each value of the array, or key-value-pair of the map. For other types of properties this property has no effect. When [`style`](#encodingStyle) is `form`, the default value is `true`. For all other styles, the default value is `false`. This property SHALL be ignored if the request body media type is not `application/x-www-form-urlencoded` or `multipart/form-data`. If a value is explicitly defined, then the value of [`contentType`](#encodingContentType) (implicit or explicit) SHALL be ignored.

0 commit comments

Comments
 (0)