Skip to content

Commit d8654ad

Browse files
committed
Removed Content Object
1 parent 53196d5 commit d8654ad

File tree

1 file changed

+6
-104
lines changed

1 file changed

+6
-104
lines changed

versions/3.0.md

Lines changed: 6 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ Additional utilities can also take advantage of the resulting files, such as tes
4343
- [External Documentation Object](#externalDocumentationObject)
4444
- [Parameter Object](#parameterObject)
4545
- [Request Body Object](#requestBodyObject)
46-
- [Content Object](#contentObject)
4746
- [Media Type Object](#mediaTypeObject)
4847
- [Encoding Object](#encodingObject)
4948
- [Responses Object](#responsesObject)
@@ -931,15 +930,14 @@ Field Name | Type | Description
931930
<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.
932931
<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.
933932

934-
For more complex scenarios a [Content Object](#contentObject) can be used to define the media type and schema of the parameter.
933+
For more complex scenarios the [`content`](#parameterContent) can be used to define the media type and schema of the parameter.
935934
A parameter MUST contain either a `schema` property, or a `content` property, but not both.
936-
When `example` or `examples` are provided in conjunction with the `schema` object,
937-
the example MUST follow the prescribed serialization strategy for the parameter.
935+
When `example` or `examples` are provided in conjunction with the `schema` object, the example MUST follow the prescribed serialization strategy for the parameter.
938936

939937

940938
Field Name | Type | Description
941939
---|:---:|---
942-
<a name="parameterContent"></a>content | [Content Object](#contentObject) | The content of the parameter.
940+
<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.
943941

944942
##### Style Values
945943

@@ -1103,7 +1101,7 @@ Describes a single request body.
11031101
Field Name | Type | Description
11041102
---|:---:|---
11051103
<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.
1106-
<a name="requestBodyContent"></a>content | [Content Object](#contentObject) | **Required.** The content of the request body.
1104+
<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.
11071105
<a name="requestBodyRequired"></a>required | `boolean` | Determines if the request body is required in the request. Defaults to `false`.
11081106

11091107

@@ -1216,104 +1214,8 @@ content:
12161214
```
12171215

12181216

1219-
#### <a name="contentObject"></a>Content Object
1220-
1221-
Describes a set of supported media types. A Content Object can be used in [Request Body Object](#requestBodyObject),
1222-
[Parameter Objects](#parameterObject), [Header Objects](#headerObject), and [Response Objects](#responseObject).
1223-
1224-
##### Patterned Fields
1225-
Field Pattern | Type | Description
1226-
---|:---:|---
1227-
<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.
1228-
1229-
##### Content Examples
1230-
1231-
```js
1232-
"content": {
1233-
"application/json": {
1234-
"schema": {
1235-
"type": "array",
1236-
"items": {
1237-
"type": "string"
1238-
}
1239-
},
1240-
"examples": {
1241-
"list": {
1242-
"summary": "List of names",
1243-
"value" : ["Bob","Diane","Mary","Bill"]
1244-
},
1245-
"empty":{
1246-
"summary": "Empty List",
1247-
"value": []
1248-
}
1249-
}
1250-
},
1251-
"application/xml": {
1252-
"examples": {
1253-
"list": {
1254-
"summary": "List of names",
1255-
"value": "<Users><User name='Bob'/><User name='Diane'/><User name='Mary'/><User name='Bill'/></Users>"
1256-
},
1257-
"empty": {
1258-
"summary":"Empty",
1259-
"value": "<Users/>"
1260-
}
1261-
}
1262-
},
1263-
"text/plain": {
1264-
"examples": {
1265-
"list": {
1266-
"summary": "List of names",
1267-
"value": "Bob,Diane,Mary,Bill"
1268-
},
1269-
"empty": {
1270-
"summary": "Empty",
1271-
"value" : ""
1272-
}
1273-
}
1274-
}
1275-
}
1276-
```
1277-
1278-
```yaml
1279-
content:
1280-
'application/json':
1281-
schema:
1282-
type: array
1283-
items:
1284-
type: string
1285-
examples:
1286-
list:
1287-
summary: List of Names
1288-
value:
1289-
- Bob
1290-
- Diane
1291-
- Mary
1292-
- Bill
1293-
empty:
1294-
summary: Empty
1295-
value: {}
1296-
1297-
'application/xml':
1298-
examples:
1299-
list:
1300-
summary: List of names
1301-
value: "<Users><User name='Bob'/><User name='Diane'/><User name='Mary'/><User name='Bill'/></Users>"
1302-
empty:
1303-
summmary: Empty list
1304-
value: "<Users/>"
1305-
'text/plain':
1306-
examples:
1307-
list:
1308-
summary: List of names
1309-
value: "Bob,Diane,Mary,Bill"
1310-
empty:
1311-
summary: Empty
1312-
value: ""
1313-
```
1314-
13151217
#### <a name="mediaTypeObject"></a>Media Type Object
1316-
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).
1218+
Each Media Type Object provides schema and examples for a the media type identified by its key.
13171219

13181220
##### Fixed Fields
13191221
Field Name | Type | Description
@@ -1634,7 +1536,7 @@ Field Name | Type | Description
16341536
---|:---:|---
16351537
<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.
16361538
<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.
1637-
<a name="responseContentObject"></a>content | [Content Object](#contentObject) | An object containing descriptions of potential response payloads.
1539+
<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.
16381540
<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).
16391541

16401542
This object can be extended with [Specification Extensions](#specificationExtensions).

0 commit comments

Comments
 (0)