You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: versions/3.0.md
+47-54Lines changed: 47 additions & 54 deletions
Original file line number
Diff line number
Diff line change
@@ -295,7 +295,7 @@ Field Pattern | Type | Description
295
295
"responses": {
296
296
"200": {
297
297
"description": "A list of pets.",
298
-
"representations" : {
298
+
"content" : {
299
299
"application/json" : {
300
300
"schema": {
301
301
"type": "array",
@@ -319,7 +319,7 @@ Field Pattern | Type | Description
319
319
responses:
320
320
'200':
321
321
description: A list of pets.
322
-
representations:
322
+
content:
323
323
'application/json':
324
324
schema:
325
325
type: array
@@ -368,7 +368,7 @@ Field Pattern | Type | Description
368
368
"responses": {
369
369
"200": {
370
370
"description": "pet response",
371
-
"representations": {
371
+
"content": {
372
372
"application/json" : {
373
373
"schema": {
374
374
"type": "array",
@@ -381,7 +381,7 @@ Field Pattern | Type | Description
381
381
},
382
382
"default": {
383
383
"description": "error payload",
384
-
"representations": {
384
+
"content": {
385
385
"text/html" : {
386
386
"schema": {
387
387
"$ref": "#/definitions/ErrorModel"
@@ -415,15 +415,15 @@ get:
415
415
responses:
416
416
'200':
417
417
description: pet response
418
-
representations:
418
+
content:
419
419
'application/json':
420
420
schema:
421
421
type: array
422
422
items:
423
423
$ref: '#/definitions/Pet'
424
424
default:
425
425
description: error payload
426
-
representations:
426
+
content:
427
427
'text/html':
428
428
schema:
429
429
$ref: '#/definitions/ErrorModel'
@@ -487,7 +487,7 @@ Field Pattern | Type | Description
487
487
}
488
488
],
489
489
"requestBody" : {
490
-
"representations" : {
490
+
"content" : {
491
491
"application/x-www-form-urlencoded":{
492
492
"schema" : {
493
493
"type" : "object",
@@ -507,14 +507,14 @@ Field Pattern | Type | Description
507
507
"responses": {
508
508
"200": {
509
509
"description": "Pet updated.",
510
-
"representations" : {
510
+
"content" : {
511
511
"application/json" : {},
512
512
"application/xml" : {}
513
513
}
514
514
},
515
515
"405": {
516
516
"description": "Invalid input",
517
-
"representations" : {
517
+
"content" : {
518
518
"application/json" : {},
519
519
"application/xml" : {}
520
520
}
@@ -544,7 +544,7 @@ parameters:
544
544
required: true
545
545
type: string
546
546
responseBody:
547
-
representations:
547
+
content:
548
548
'application/x-www-form-urlencoded':
549
549
schema:
550
550
properties:
@@ -559,12 +559,12 @@ responseBody:
559
559
responses:
560
560
'200':
561
561
description: Pet updated.
562
-
representations:
562
+
content:
563
563
'application/json': {}
564
564
'application/xml': {}
565
565
'405':
566
566
description: Invalid input
567
-
representations:
567
+
content:
568
568
'application/json': {}
569
569
'application/xml': {}
570
570
security:
@@ -624,13 +624,8 @@ For complex parameter schemas, a serialization strategy is required. For all typ
624
624
Field Name | Type | Description
625
625
---|:---:|---
626
626
<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
-
=======
631
627
<a name="parameterIn"></a>in | `string` | **Required.** The ___location of the parameter. Possible values are "query", "header", "path", "formData" or "cookie".
632
628
<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
634
629
<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`.
635
630
<a name="parameterDeprecated"></a> deprecated | `boolean` | Specifies that a parameter is deprecated and should be transitioned out of usage.
636
631
<a name="parameterSchema"></a>schema | [Schema Object](#schemaObject) | The schema defining the type used for the parameter.
@@ -753,13 +748,11 @@ schema:
753
748
754
749
Describes a single request body.
755
750
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
-
758
751
##### Fixed Fields
759
752
Field Name | Type | Description
760
753
---|:---:|---
761
754
<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.
763
756
<a name="requestBodyRequired"></a>required | `boolean` | Determines if the request body is required in the request. Defaults to `true`.
764
757
765
758
@@ -775,7 +768,7 @@ A request body with a referenced model definition.
775
768
```js
776
769
{
777
770
"description": "user to add to the system",
778
-
"representations" : {
771
+
"content" : {
779
772
"application/json" : {
780
773
"schema": {
781
774
"$ref": "#/definitions/User"
@@ -800,7 +793,7 @@ A request body with a referenced model definition.
800
793
801
794
```yaml
802
795
description: user to add to the system
803
-
representations:
796
+
content:
804
797
'application/json':
805
798
schema:
806
799
$ref: '#/definitions/User'
@@ -818,7 +811,7 @@ A body parameter that is an array of string values:
818
811
```js
819
812
{
820
813
"description": "user to add to the system",
821
-
"representations": {
814
+
"content": {
822
815
"application/json" : {
823
816
"schema": {
824
817
"type": "array",
@@ -834,7 +827,7 @@ A body parameter that is an array of string values:
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).
849
842
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).
851
844
852
-
##### Representations Examples
845
+
##### Content Examples
853
846
854
847
```js
855
-
"representations" : {
848
+
"content" : {
856
849
"application/json": {
857
850
"schema": {
858
851
"type": "array",
@@ -879,7 +872,7 @@ Each key in the representations object is the media-type of the [Representation
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).
907
900
908
901
##### Fixed Fields
909
902
Field Name | Type | Description
910
903
---|:---:|---
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.
913
906
914
907
##### Patterned Fields
915
908
Field Pattern | Type | Description
916
909
---|:---:|---
917
910
<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.
918
911
919
-
##### Representation Examples
912
+
##### Content Type Examples
920
913
921
-
A representation description.
914
+
A content type description.
922
915
```js
923
916
{
924
917
"application/json": {
@@ -1046,7 +1039,7 @@ A 200 response for successful operation and a default response for others (imply
1046
1039
{
1047
1040
"200": {
1048
1041
"description": "a pet to be returned",
1049
-
"representations" : {
1042
+
"content" : {
1050
1043
"application/json" : {
1051
1044
"schema": {
1052
1045
"$ref": "#/definitions/Pet"
@@ -1056,7 +1049,7 @@ A 200 response for successful operation and a default response for others (imply
1056
1049
},
1057
1050
"default": {
1058
1051
"description": "Unexpected error",
1059
-
"representations" : {
1052
+
"content" : {
1060
1053
"application/json" : {
1061
1054
"schema": {
1062
1055
"$ref": "#/definitions/ErrorModel"
@@ -1070,13 +1063,13 @@ A 200 response for successful operation and a default response for others (imply
1070
1063
```yaml
1071
1064
'200':
1072
1065
description: a pet to be returned
1073
-
representations:
1066
+
content:
1074
1067
'application/json':
1075
1068
schema:
1076
1069
$ref: '#/definitions/Pet'
1077
1070
default:
1078
1071
description: Unexpected error
1079
-
representations:
1072
+
content:
1080
1073
'application/json':
1081
1074
schema:
1082
1075
$ref: '#/definitions/ErrorModel'
@@ -1090,7 +1083,7 @@ Field Name | Type | Description
1090
1083
---|:---:|---
1091
1084
<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.
1092
1085
<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.
1094
1087
<a name="responseLinks"></a>links | [Links Object](#linksObject) | An object representing operations related to the response payload.
1095
1088
1096
1089
@@ -1107,7 +1100,7 @@ Response of an array of a complex type:
1107
1100
```js
1108
1101
{
1109
1102
"description": "A complex object array response",
1110
-
"representations" : {
1103
+
"content" : {
1111
1104
"application/json" : {
1112
1105
"schema": {
1113
1106
"type": "array",
@@ -1122,7 +1115,7 @@ Response of an array of a complex type:
1122
1115
1123
1116
```yaml
1124
1117
description: A complex object array response
1125
-
representations:
1118
+
content:
1126
1119
'application/json':
1127
1120
schema:
1128
1121
type: array
@@ -1135,7 +1128,7 @@ Response with a string type:
1135
1128
```js
1136
1129
{
1137
1130
"description": "A simple string response",
1138
-
"representations" : {
1131
+
"content" : {
1139
1132
"application/json" : {
1140
1133
"schema": {
1141
1134
"type": "string"
@@ -1157,7 +1150,7 @@ Response with headers:
1157
1150
```js
1158
1151
{
1159
1152
"description": "A simple string response",
1160
-
"representations" : {
1153
+
"content" : {
1161
1154
"application/json" : {
1162
1155
"schema": {
1163
1156
"type": "string"
@@ -1183,7 +1176,7 @@ Response with headers:
1183
1176
1184
1177
```yaml
1185
1178
description: A simple string response
1186
-
representations:
1179
+
content:
1187
1180
'application/json':
1188
1181
schema:
1189
1182
type: string
@@ -1389,7 +1382,7 @@ paths:
1389
1382
responses:
1390
1383
200:
1391
1384
description: the user being returned
1392
-
representations:
1385
+
content:
1393
1386
'application/json':
1394
1387
schema:
1395
1388
type: object
@@ -1461,7 +1454,7 @@ paths:
1461
1454
responses:
1462
1455
200:
1463
1456
description: The User
1464
-
representations:
1457
+
content:
1465
1458
'application/json':
1466
1459
schema:
1467
1460
$ref: '#/components/definitions/user'
@@ -1479,7 +1472,7 @@ paths:
1479
1472
responses:
1480
1473
200:
1481
1474
description: repositories owned by the supplied user
1482
-
representations:
1475
+
content:
1483
1476
'application/json':
1484
1477
schema:
1485
1478
type: array
@@ -1503,7 +1496,7 @@ paths:
1503
1496
responses:
1504
1497
200:
1505
1498
description: The repository
1506
-
representations:
1499
+
content:
1507
1500
'application/json':
1508
1501
schema:
1509
1502
$ref: '#/components/definitions/repository'
@@ -1532,7 +1525,7 @@ paths:
1532
1525
responses:
1533
1526
200:
1534
1527
description: an array of pull request objects
1535
-
representations:
1528
+
content:
1536
1529
'application/json':
1537
1530
schema:
1538
1531
type: array
@@ -1557,7 +1550,7 @@ paths:
1557
1550
responses:
1558
1551
200:
1559
1552
description: a pull request object
1560
-
representations:
1553
+
content:
1561
1554
'application/json':
1562
1555
schema:
1563
1556
$ref: '#/components/definitions/pullrequest'
@@ -1783,7 +1776,7 @@ definitions:
1783
1776
1784
1777
# in a request body, note the plural `examples` as the content-type is set by `consumes`:
0 commit comments