Skip to content

Commit 6bbdb88

Browse files
committed
Renamed representations to content
1 parent d5e14d1 commit 6bbdb88

File tree

1 file changed

+47
-54
lines changed

1 file changed

+47
-54
lines changed

versions/3.0.md

Lines changed: 47 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ Field Pattern | Type | Description
295295
"responses": {
296296
"200": {
297297
"description": "A list of pets.",
298-
"representations" : {
298+
"content" : {
299299
"application/json" : {
300300
"schema": {
301301
"type": "array",
@@ -319,7 +319,7 @@ Field Pattern | Type | Description
319319
responses:
320320
'200':
321321
description: A list of pets.
322-
representations:
322+
content:
323323
'application/json':
324324
schema:
325325
type: array
@@ -368,7 +368,7 @@ Field Pattern | Type | Description
368368
"responses": {
369369
"200": {
370370
"description": "pet response",
371-
"representations": {
371+
"content": {
372372
"application/json" : {
373373
"schema": {
374374
"type": "array",
@@ -381,7 +381,7 @@ Field Pattern | Type | Description
381381
},
382382
"default": {
383383
"description": "error payload",
384-
"representations": {
384+
"content": {
385385
"text/html" : {
386386
"schema": {
387387
"$ref": "#/definitions/ErrorModel"
@@ -415,15 +415,15 @@ get:
415415
responses:
416416
'200':
417417
description: pet response
418-
representations:
418+
content:
419419
'application/json':
420420
schema:
421421
type: array
422422
items:
423423
$ref: '#/definitions/Pet'
424424
default:
425425
description: error payload
426-
representations:
426+
content:
427427
'text/html':
428428
schema:
429429
$ref: '#/definitions/ErrorModel'
@@ -487,7 +487,7 @@ Field Pattern | Type | Description
487487
}
488488
],
489489
"requestBody" : {
490-
"representations" : {
490+
"content" : {
491491
"application/x-www-form-urlencoded":{
492492
"schema" : {
493493
"type" : "object",
@@ -507,14 +507,14 @@ Field Pattern | Type | Description
507507
"responses": {
508508
"200": {
509509
"description": "Pet updated.",
510-
"representations" : {
510+
"content" : {
511511
"application/json" : {},
512512
"application/xml" : {}
513513
}
514514
},
515515
"405": {
516516
"description": "Invalid input",
517-
"representations" : {
517+
"content" : {
518518
"application/json" : {},
519519
"application/xml" : {}
520520
}
@@ -544,7 +544,7 @@ parameters:
544544
required: true
545545
type: string
546546
responseBody:
547-
representations:
547+
content:
548548
'application/x-www-form-urlencoded':
549549
schema:
550550
properties:
@@ -559,12 +559,12 @@ responseBody:
559559
responses:
560560
'200':
561561
description: Pet updated.
562-
representations:
562+
content:
563563
'application/json': {}
564564
'application/xml': {}
565565
'405':
566566
description: Invalid input
567-
representations:
567+
content:
568568
'application/json': {}
569569
'application/xml': {}
570570
security:
@@ -624,13 +624,8 @@ For complex parameter schemas, a serialization strategy is required. For all typ
624624
Field Name | Type | Description
625625
---|:---:|---
626626
<a name="parameterName"></a>name | `string` | **Required.** The name of the parameter. Parameter names are *case sensitive*. <ul><li>If [`in`](#parameterIn) is `"path"`, the `name` field MUST correspond to the associated path segment from the [path](#pathsPath) field in the [Paths Object](#pathsObject). See [Path Templating](#pathTemplating) for further information.<li>For all other cases, the `name` corresponds to the parameter name used based on the [`in`](#parameterIn) property.</ul>
627-
<<<<<<< HEAD
628-
<a name="parameterIn"></a>in | `string` | **Required.** The ___location of the parameter. Possible values are "query", "header", "path" or "cookie".
629-
<a name="parameterDescription"></a>description | `string` | A brief description of the parameter. This could contain examples of use. [GFM syntax](https://help.github.com/articles/github-flavored-markdown) can be used for rich text representation.
630-
=======
631627
<a name="parameterIn"></a>in | `string` | **Required.** The ___location of the parameter. Possible values are "query", "header", "path", "formData" or "cookie".
632628
<a name="parameterDescription"></a>description | `string` | A brief description of the parameter. This could contain examples of use. [CommonMark syntax](http://spec.commonmark.org/) can be used for rich text representation.
633-
>>>>>>> OpenAPI.next
634629
<a name="parameterRequired"></a>required | `boolean` | Determines whether this parameter is mandatory. If the parameter is [`in`](#parameterIn) "path", this property is **required** and its value MUST be `true`. Otherwise, the property MAY be included and its default value is `false`.
635630
<a name="parameterDeprecated"></a> deprecated | `boolean` | Specifies that a parameter is deprecated and should be transitioned out of usage.
636631
<a name="parameterSchema"></a>schema | [Schema Object](#schemaObject) | The schema defining the type used for the parameter.
@@ -753,13 +748,11 @@ schema:
753748

754749
Describes a single request body.
755750

756-
The `Content-Type` of the request body must be specified by the `consumes` attribute, either at the [top-level](#oasConsumes) or [operation level](#operationConsumes).
757-
758751
##### Fixed Fields
759752
Field Name | Type | Description
760753
---|:---:|---
761754
<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.
762-
<a name="requestBodyRepresentations"></a>representations | [Representations Object](#representationsObject) | The representations of the request body.
755+
<a name="requestBodyContent"></a>content | [Content Object](#contentObject) | The content of the request body.
763756
<a name="requestBodyRequired"></a>required | `boolean` | Determines if the request body is required in the request. Defaults to `true`.
764757

765758

@@ -775,7 +768,7 @@ A request body with a referenced model definition.
775768
```js
776769
{
777770
"description": "user to add to the system",
778-
"representations" : {
771+
"content" : {
779772
"application/json" : {
780773
"schema": {
781774
"$ref": "#/definitions/User"
@@ -800,7 +793,7 @@ A request body with a referenced model definition.
800793

801794
```yaml
802795
description: user to add to the system
803-
representations:
796+
content:
804797
'application/json':
805798
schema:
806799
$ref: '#/definitions/User'
@@ -818,7 +811,7 @@ A body parameter that is an array of string values:
818811
```js
819812
{
820813
"description": "user to add to the system",
821-
"representations": {
814+
"content": {
822815
"application/json" : {
823816
"schema": {
824817
"type": "array",
@@ -834,7 +827,7 @@ A body parameter that is an array of string values:
834827
```yaml
835828
description: user to add to the system
836829
required: true
837-
representations:
830+
content:
838831
'application/json':
839832
schema:
840833
type: array
@@ -843,16 +836,16 @@ representations:
843836
```
844837

845838

846-
#### <a name="representationsObject"></a>Representations Object
839+
#### <a name="contentObject"></a>Content Object
847840

848-
Describes a set of supported representations. A representations object can be used in [requestBody](#requestBody) and [response objects](#responseObject).
841+
Describes a set of supported content types. A content object can be used in [requestBody](#requestBody) and [response objects](#responseObject).
849842

850-
Each key in the representations object is the media-type of the [Representation Object](#representationObject).
843+
Each key in the content object is the media-type of the [Content Type Object](#contentTypeObject).
851844

852-
##### Representations Examples
845+
##### Content Examples
853846

854847
```js
855-
"representations" : {
848+
"content" : {
856849
"application/json": {
857850
"schema": {
858851
"type": "array",
@@ -879,7 +872,7 @@ Each key in the representations object is the media-type of the [Representation
879872
```
880873

881874
```yaml
882-
representations:
875+
content:
883876
'application/json':
884877
schema:
885878
type: array
@@ -902,23 +895,23 @@ representations:
902895
- "Bob,Diane,Mary,Bill"
903896
```
904897

905-
#### <a name="representationObject"></a>Representation Object
906-
The representation object provides schema and examples for a the media type identified by its key. Representation objects can be used in a [representations object](#representationsObject).
898+
#### <a name="contentTypeObject"></a>Content Type Object
899+
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).
907900

908901
##### Fixed Fields
909902
Field Name | Type | Description
910903
---|:---:|---
911-
<a name="representationSchema"></a>schema | [Schema Object](#schemaObject) | The schema defining the type used for the request body.
912-
<a name="representationExamples"></a>examples | [Examples Array](#examplesArray) | Examples of the representation.
904+
<a name="contentTypeSchema"></a>schema | [Schema Object](#schemaObject) | The schema defining the type used for the request body.
905+
<a name="contentTypeExamples"></a>examples | [Examples Array](#examplesArray) | Examples of the content type.
913906

914907
##### Patterned Fields
915908
Field Pattern | Type | Description
916909
---|:---:|---
917910
<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 [Vendor Extensions](#vendorExtensions) for further details.
918911

919-
##### Representation Examples
912+
##### Content Type Examples
920913

921-
A representation description.
914+
A content type description.
922915
```js
923916
{
924917
"application/json": {
@@ -1046,7 +1039,7 @@ A 200 response for successful operation and a default response for others (imply
10461039
{
10471040
"200": {
10481041
"description": "a pet to be returned",
1049-
"representations" : {
1042+
"content" : {
10501043
"application/json" : {
10511044
"schema": {
10521045
"$ref": "#/definitions/Pet"
@@ -1056,7 +1049,7 @@ A 200 response for successful operation and a default response for others (imply
10561049
},
10571050
"default": {
10581051
"description": "Unexpected error",
1059-
"representations" : {
1052+
"content" : {
10601053
"application/json" : {
10611054
"schema": {
10621055
"$ref": "#/definitions/ErrorModel"
@@ -1070,13 +1063,13 @@ A 200 response for successful operation and a default response for others (imply
10701063
```yaml
10711064
'200':
10721065
description: a pet to be returned
1073-
representations:
1066+
content:
10741067
'application/json':
10751068
schema:
10761069
$ref: '#/definitions/Pet'
10771070
default:
10781071
description: Unexpected error
1079-
representations:
1072+
content:
10801073
'application/json':
10811074
schema:
10821075
$ref: '#/definitions/ErrorModel'
@@ -1090,7 +1083,7 @@ Field Name | Type | Description
10901083
---|:---:|---
10911084
<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.
10921085
<a name="responseHeaders"></a>headers | [Headers Object](#headersObject) | A list of headers that are sent with the response.
1093-
<a name="responseRepresentations"></a>representations | [Representations Object](#representationsObject) | An object containing descriptions of potential response payloads.
1086+
<a name="responseRepresentations"></a>content | [Content Object](#contentObject) | An object containing descriptions of potential response payloads.
10941087
<a name="responseLinks"></a>links | [Links Object](#linksObject) | An object representing operations related to the response payload.
10951088

10961089

@@ -1107,7 +1100,7 @@ Response of an array of a complex type:
11071100
```js
11081101
{
11091102
"description": "A complex object array response",
1110-
"representations" : {
1103+
"content" : {
11111104
"application/json" : {
11121105
"schema": {
11131106
"type": "array",
@@ -1122,7 +1115,7 @@ Response of an array of a complex type:
11221115

11231116
```yaml
11241117
description: A complex object array response
1125-
representations:
1118+
content:
11261119
'application/json':
11271120
schema:
11281121
type: array
@@ -1135,7 +1128,7 @@ Response with a string type:
11351128
```js
11361129
{
11371130
"description": "A simple string response",
1138-
"representations" : {
1131+
"content" : {
11391132
"application/json" : {
11401133
"schema": {
11411134
"type": "string"
@@ -1157,7 +1150,7 @@ Response with headers:
11571150
```js
11581151
{
11591152
"description": "A simple string response",
1160-
"representations" : {
1153+
"content" : {
11611154
"application/json" : {
11621155
"schema": {
11631156
"type": "string"
@@ -1183,7 +1176,7 @@ Response with headers:
11831176

11841177
```yaml
11851178
description: A simple string response
1186-
representations:
1179+
content:
11871180
'application/json':
11881181
schema:
11891182
type: string
@@ -1389,7 +1382,7 @@ paths:
13891382
responses:
13901383
200:
13911384
description: the user being returned
1392-
representations:
1385+
content:
13931386
'application/json':
13941387
schema:
13951388
type: object
@@ -1461,7 +1454,7 @@ paths:
14611454
responses:
14621455
200:
14631456
description: The User
1464-
representations:
1457+
content:
14651458
'application/json':
14661459
schema:
14671460
$ref: '#/components/definitions/user'
@@ -1479,7 +1472,7 @@ paths:
14791472
responses:
14801473
200:
14811474
description: repositories owned by the supplied user
1482-
representations:
1475+
content:
14831476
'application/json':
14841477
schema:
14851478
type: array
@@ -1503,7 +1496,7 @@ paths:
15031496
responses:
15041497
200:
15051498
description: The repository
1506-
representations:
1499+
content:
15071500
'application/json':
15081501
schema:
15091502
$ref: '#/components/definitions/repository'
@@ -1532,7 +1525,7 @@ paths:
15321525
responses:
15331526
200:
15341527
description: an array of pull request objects
1535-
representations:
1528+
content:
15361529
'application/json':
15371530
schema:
15381531
type: array
@@ -1557,7 +1550,7 @@ paths:
15571550
responses:
15581551
200:
15591552
description: a pull request object
1560-
representations:
1553+
content:
15611554
'application/json':
15621555
schema:
15631556
$ref: '#/components/definitions/pullrequest'
@@ -1783,7 +1776,7 @@ definitions:
17831776
17841777
# in a request body, note the plural `examples` as the content-type is set by `consumes`:
17851778
requestBody:
1786-
representations:
1779+
content:
17871780
'application/json':
17881781
schema:
17891782
$ref: '#/definitions/Address'
@@ -1813,7 +1806,7 @@ definitions:
18131806
responses:
18141807
200:
18151808
description: your car appointment has been booked
1816-
representations:
1809+
content:
18171810
'application/json':
18181811
schema:
18191812
$ref: '#/definitions/SuccessResponse'

0 commit comments

Comments
 (0)