Removed Content Object
MODIFY
versions/3.0.md
versions/3.0.md
@@ -43,7 +43,6 @@ Additional utilities can also take advantage of the resulting files, such as tes
- [External Documentation Object](#externalDocumentationObject)
- [Parameter Object](#parameterObject)
- [Request Body Object](#requestBodyObject)
- - [Content Object](#contentObject)
- [Media Type Object](#mediaTypeObject)
- [Encoding Object](#encodingObject)
- [Responses Object](#responsesObject)
@@ -931,15 +930,14 @@ Field Name | Type | Description
<a name="parameterExample"></a>example | Any | Example of the media type. The example SHOULD match the specified schema and encoding properties if present. 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. To represent examples of media types that cannot naturally represented in JSON or YAML, a string value can be used to contain the example with escaping where necessary.
<a name="parameterExamples"></a>examples | Map[ `string`, [Example Object](#exampleObject) \| [Reference Object](#referenceObject)] | Examples of the media type. Each example SHOULD contain a value in the correct format as specified in the 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.
-For more complex scenarios a [Content Object](#contentObject) can be used to define the media type and schema of the parameter.
+For more complex scenarios the [`content`](#parameterContent) can be used to define the media type and schema of the parameter.
A parameter MUST contain either a `schema` property, or a `content` property, but not both.
-When `example` or `examples` are provided in conjunction with the `schema` object,
-the example MUST follow the prescribed serialization strategy for the parameter.
+When `example` or `examples` are provided in conjunction with the `schema` object, the example MUST follow the prescribed serialization strategy for the parameter.
Field Name | Type | Description
---|:---:|---
-<a name="parameterContent"></a>content | [Content Object](#contentObject) | The content of the parameter.
+<a name="parameterContent"></a>content | Map[`string`, [Media Type Object](#mediaTypeObject)] | An map containing the representations for the parameter. The key is the media type and the value is used to describe it.
##### Style Values
@@ -1103,7 +1101,7 @@ Describes a single request body.
Field Name | Type | Description
---|:---:|---
<a name="requestBodyDescription"></a>description | `string` | A brief description of the request body. This could contain examples of use. [CommonMark syntax](http://spec.commonmark.org/) can be used for rich text representation.
-<a name="requestBodyContent"></a>content | [Content Object](#contentObject) | **Required.** The content of the request body.
+<a name="requestBodyContent"></a>content | Map[`string`, [Media Type Object](#mediaTypeObject)] | **Required.** The content of the request body. The key is the media type and the value is used to describe it.
<a name="requestBodyRequired"></a>required | `boolean` | Determines if the request body is required in the request. Defaults to `false`.
@@ -1216,104 +1214,8 @@ content:
```
-#### <a name="contentObject"></a>Content Object
-
-Describes a set of supported media types. A Content Object can be used in [Request Body Object](#requestBodyObject),
-[Parameter Objects](#parameterObject), [Header Objects](#headerObject), and [Response Objects](#responseObject).
-
-##### Patterned Fields
-Field Pattern | Type | Description
----|:---:|---
-<a name="contentMediaType"></a>{mediaType} | [Media Type Object](#mediaTypeObject) | A media type that is supported by this container. The key should be the media type and the value is used to describe it.
-
-##### Content Examples
-
-```js
-"content": {
- "application/json": {
- "schema": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "examples": {
- "list": {
- "summary": "List of names",
- "value" : ["Bob","Diane","Mary","Bill"]
- },
- "empty":{
- "summary": "Empty List",
- "value": []
- }
- }
- },
- "application/xml": {
- "examples": {
- "list": {
- "summary": "List of names",
- "value": "<Users><User name='Bob'/><User name='Diane'/><User name='Mary'/><User name='Bill'/></Users>"
- },
- "empty": {
- "summary":"Empty",
- "value": "<Users/>"
- }
- }
- },
- "text/plain": {
- "examples": {
- "list": {
- "summary": "List of names",
- "value": "Bob,Diane,Mary,Bill"
- },
- "empty": {
- "summary": "Empty",
- "value" : ""
- }
- }
- }
-}
-```
-
-```yaml
-content:
- 'application/json':
- schema:
- type: array
- items:
- type: string
- examples:
- list:
- summary: List of Names
- value:
- - Bob
- - Diane
- - Mary
- - Bill
- empty:
- summary: Empty
- value: {}
-
- 'application/xml':
- examples:
- list:
- summary: List of names
- value: "<Users><User name='Bob'/><User name='Diane'/><User name='Mary'/><User name='Bill'/></Users>"
- empty:
- summmary: Empty list
- value: "<Users/>"
- 'text/plain':
- examples:
- list:
- summary: List of names
- value: "Bob,Diane,Mary,Bill"
- empty:
- summary: Empty
- value: ""
-```
-
#### <a name="mediaTypeObject"></a>Media Type Object
-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).
+Each Media Type Object provides schema and examples for a the media type identified by its key.
##### Fixed Fields
Field Name | Type | Description
@@ -1634,7 +1536,7 @@ Field Name | Type | Description
---|:---:|---
<a name="responseDescription"></a>description | `string` | **Required.** A short description of the response. [CommonMark syntax](http://spec.commonmark.org/) can be used for rich text representation.
<a name="responseHeaders"></a>headers | Map[`string`, [Header Object](#headerObject) \| [Reference Object](#referenceObject)] | Maps a header name to its definition. Note that [RFC7230](https://tools.ietf.org/html/rfc7230#page-22) states header names are case insensitive. If a response header is defined with the name `"Content-Type"`, it SHALL be ignored.
-<a name="responseContentObject"></a>content | [Content Object](#contentObject) | An object containing descriptions of potential response payloads.
+<a name="responseContentObject"></a>content | Map[`string`, [Media Type Object](#mediaTypeObject)] | An map containing descriptions of potential response payloads. The key is the media type and the value is used to describe it.
<a name="responseLinks"></a>links | Map[`string`, [Link Object](#linkObject) \| [Reference Object](#referenceObject)] | A map of operations links that can be followed from the response. The key of the map is a short name for the link, following the naming constraints of the names for [Component Objects](#componentsObject).
This object can be extended with [Specification Extensions](#specificationExtensions).

Removed Content Object