Skip to content

Commit 21a8c23

Browse files
authored
Merge pull request OAI#943 from OAI/dm/content-type-rename
Rename Content Type Object to Media Type Object
2 parents 260e45a + 92b8028 commit 21a8c23

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

versions/3.0.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Additional utilities can also take advantage of the resulting files, such as tes
4242
- [Parameter Object](#parameterObject)
4343
- [Request Body Object](#requestBodyObject)
4444
- [Content Object](#contentObject)
45-
- [Content Type Object](#contentTypeObject)
45+
- [Media Type Object](#mediaTypeObject)
4646
- [Responses Object](#responsesObject)
4747
- [Response Object](#responseObject)
4848
- [Headers Object](#headersObject)
@@ -933,7 +933,7 @@ Field Name | Type | Description
933933
<a name="parameterExamples"></a>examples | [[Example Object](#exampleObject) <span>&#124;</span> [Reference Object](#referenceObject)] | Examples of the content type. Each example in the Examples array SHOULD be in the correct format as specified parameter encoding. The `examples` object is mutually exclusive to the `example` object. Furthermore, if referencing a `schema` which contains an example, the `examples` value SHALL _override_ the example provided by the schema.
934934
<a name="parameterExample"></a>example | [Example Object](#exampleObject) <span>&#124;</span> [Reference Object](#referenceObject) | Example of the content type. The example object SHOULD be in the correct format as specified in the parameter encoding. The `example` object is mutually exclusive to the `examples` object. Furthermore, if referencing a `schema` which contains an example, the `example` value SHALL _override_ the example provided by the the schema.
935935

936-
For more complex scenarios a `content` object can be used to define the media-type
936+
For more complex scenarios a [Content Object](#contentObject) can be used to define the media type
937937
and schema of the parameter. This option is mutually exclusive with the simple scenario
938938
above. When `example` or `examples` are provided in conjunction with the `schema` object,
939939
the example must follow the prescribed serialization strategy for the parameter.
@@ -1194,10 +1194,10 @@ content:
11941194

11951195
#### <a name="contentObject"></a>Content Object
11961196

1197-
Describes a set of supported content types. A content object can be used in [requestBody](#requestBody),
1198-
[parameter objects](#parameterObject), [header objects](#headerObject), and [response objects](#responseObject).
1197+
Describes a set of supported media types. A Content Object can be used in [Request Body Object](#requestBody),
1198+
[Parameter Objects](#parameterObject), [Header Objects](#headerObject), and [Response Objects](#responseObject).
11991199

1200-
Each key in the content object is the media-type of the [Content Type Object](#contentTypeObject).
1200+
Each key in the Content Object is the media type of the [Media Type Object](#mediaTypeObject).
12011201

12021202
##### Content Examples
12031203

@@ -1252,25 +1252,25 @@ content:
12521252
- "Bob,Diane,Mary,Bill"
12531253
```
12541254

1255-
#### <a name="contentTypeObject"></a>Content Type Object
1256-
Each content type object provides schema and examples for a the media type identified by its key. Content Type objects can be used in a [content object](#contentObject).
1255+
#### <a name="mediaTypeObject"></a>Media Type Object
1256+
Each Media Type Object provides schema and examples for a the media type identified by its key. Media Type Objects can be used in a [Content Object](#contentObject).
12571257

12581258
##### Fixed Fields
12591259
Field Name | Type | Description
12601260
---|:---:|---
1261-
<a name="contentTypeSchema"></a>schema | [Schema Object](#schemaObject) | The schema defining the type used for the request body.
1262-
<a name="contentTypeExamples"></a>examples | [[Example Object](#exampleObject) <span>&#124;</span> [Reference Object](#referenceObject)] | Examples of the content type. Each example in the Examples array SHOULD be in the correct format as specified in the _content_ type. The `examples` object is mutually exclusive to the `example` object. Furthermore, if referencing a `schema` which contains an example, the `examples` value SHALL _override_ the example provided by the schema.
1263-
<a name="contentTypeExample"></a>example | [Example Object](#exampleObject) <span>&#124;</span> [Reference Object](#referenceObject) | Example of the content type. The example object SHOULD be in the correct format as specified in the _content_ type. The `example` object is mutually exclusive to the `examples` object. Furthermore, if referencing a `schema` which contains an example, the `example` value SHALL _override_ the the example provided by the schema.
1264-
<a name="contentTypeEncoding"></a>encoding | [Encoding Object](#encodingObject) | Encoding of the content type. The encoding object SHOULD only apply to `requestBody` objects when the content type is `multipart`.
1261+
1262+
<a name="mediaTypeSchema"></a>schema | [Schema Object](#schemaObject) | The schema defining the type used for the request body.
1263+
<a name="mediaTypeExamples"></a>examples | [[Example Object](#exampleObject) <span>&#124;</span> [Reference Object](#referenceObject)] | Examples of the media type. Each example in the Examples array SHOULD be in the correct format as specified in the media type. The `examples` object is mutually exclusive to the `example` object. Furthermore, if referencing a `schema` which contains an example, the `examples` value SHALL _override_ the example provided by the schema.
1264+
<a name="mediaTypeExample"></a>example | [Example Object](#exampleObject) <span>&#124;</span> [Reference Object](#referenceObject) | Example of the media type. The example object SHOULD be in the correct format as specified in the media type. The `example` object is mutually exclusive to the `examples` object. Furthermore, if referencing a `schema` which contains an example, the `example` value SHALL _override_ the the example provided by the schema.
1265+
<a name="mediaTypeEncoding"></a>encoding | [Encoding Object](#encodingObject) | Encoding of the media type. The encoding object SHOULD only apply to `requestBody` objects when the content type is `multipart`.
12651266

12661267
##### Patterned Fields
12671268
Field Pattern | Type | Description
12681269
---|:---:|---
12691270
<a name="parameterExtensions"></a>^x- | Any | Allows extensions to the OpenAPI Schema. The field name MUST begin with `x-`, for example, `x-internal-id`. The value can be `null`, a primitive, an array or an object. See [Specification Extensions](#specificationExtensions) for further details.
12701271

1271-
##### Content Type Examples
1272+
##### Media Type Examples
12721273

1273-
A content type description.
12741274
```js
12751275
{
12761276
"application/json": {
@@ -1453,7 +1453,7 @@ requestBody:
14531453
format: binary
14541454
encoding:
14551455
historyMetadata:
1456-
# require XML content-type in utf-8 encoding
1456+
# require XML Content-Type in utf-8 encoding
14571457
contentType: application/xml; charset=utf-8
14581458
profileImage:
14591459
# only accept png/jpeg
@@ -1467,9 +1467,9 @@ A single encoding definition applied to a single schema property.
14671467
##### Fixed Fields
14681468
Field Name | Type | Description
14691469
---|:---:|---
1470-
<a name="encodingContentType"></a>contentType | `string` | The content-type to use for encoding a specific property. Default value depends on the property type: for `string` with `format` being `binary` - `application/octet-stream`; for other primitive types - `plain/text`; for `object` - `application/json`; for `array` - the default is defined based on the inner type.
1470+
<a name="encodingContentType"></a>contentType | `string` | The Content-Type to use for encoding a specific property. Default value depends on the property type: for `string` with `format` being `binary` - `application/octet-stream`; for other primitive types - `plain/text`; for `object` - `application/json`; for `array` - the default is defined based on the inner type.
14711471
<a name="encodingHeaders"></a>Headers | `object` | A string map allowing additional information to be provided as headers, for example `Content-Disposition`. Note `Content-Type` is described separately and will be ignored from this section.
1472-
<a name="encodingStyle"></a>style | `string` | The content-type to use for encoding a specific property. See (#parameterContent) for details on the [`style`](#parameterStyle) property. The behavior follows the same values allowed for `query` parameters, including default values.
1472+
<a name="encodingStyle"></a>style | `string` | The Content-Type to use for encoding a specific property. See (#parameterContent) for details on the [`style`](#parameterStyle) property. The behavior follows the same values allowed for `query` parameters, including default values.
14731473
<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`.
14741474

14751475
This object can be extended with [Specification Extensions](#specificationExtensions).
@@ -1890,7 +1890,7 @@ Because of the potential for name clashes, consider the `href` syntax as the pre
18901890

18911891
#### <a name="responsePayload"></a>Response Payload Values
18921892

1893-
Payload values are only available in parsable response payloads which match the advertised media-type and for media-types that can be referenced using a JSON Pointer fragment Id.
1893+
Payload values are only available in parsable response payloads which match the advertised media type and for media types that can be referenced using a JSON Pointer fragment Id.
18941894
In all cases, if a value does _not_ exist, the parameter will be considered a `null` value (as opposed to an empty value) and _not_ passed as a parameter to the linked resource.
18951895
In cases where a value is required, and a parameter is not supplied, the client MAY choose to not follow the link definition.
18961896

@@ -2255,7 +2255,7 @@ components:
22552255

22562256

22572257
### <a name="linkParametersObject"></a>Link Parameters Object
2258-
Using the `operationId` to reference an operation in the definition has many benefits, including the ability to define media-type options, security requirements, response and error payloads.
2258+
Using the `operationId` to reference an operation in the definition has many benefits, including the ability to define media type options, security requirements, response and error payloads.
22592259
Many operations require parameters to be passed, and these MAY be dynamic depending on the response itself.
22602260

22612261
To specify parameters required by the operation, we can use a **Link Parameters Object**.
@@ -2364,7 +2364,7 @@ definitions:
23642364
example:
23652365
$ref: http://foo.bar#/examples/name-example
23662366
2367-
# in a request body, note the plural `examples` as the content-type is set to `*`:
2367+
# in a request body, note the plural `examples` as the Content-Type is set to `*`:
23682368
requestBody:
23692369
content:
23702370
'application/json':

0 commit comments

Comments
 (0)