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
+27-98
Original file line number
Diff line number
Diff line change
@@ -43,7 +43,6 @@ Additional utilities can also take advantage of the resulting files, such as tes
43
43
- [Request Body Object](#request-body-object)
44
44
- [Content Object](#content-object)
45
45
- [Content Type Object](#content-type-object)
46
-
- [Items Object](#items-object)
47
46
- [Responses Object](#responses-object)
48
47
- [Response Object](#response-object)
49
48
- [Headers Object](#headers-object)
@@ -741,7 +740,7 @@ A unique parameter is defined by a combination of a [name](#parameterName) and [
741
740
There are four possible parameter types.
742
741
* Path - Used together with [Path Templating](#pathTemplating), where the parameter value is actually part of the operation's URL. This does not include the host or base path of the API. For example, in `/items/{itemId}`, the path parameter is `itemId`.
743
742
* Query - Parameters that are appended to the URL. For example, in `/items?id=###`, the query parameter is `id`.
744
-
* Header - Custom headers that are expected as part of the request.
743
+
* Header - Custom headers that are expected as part of the request. Note that [RFC 7230](https://tools.ietf.org/html/rfc7230#page-22) states header names are case insensitive.
745
744
* Cookie - Used to pass a specific cookie value to the API.
746
745
747
746
@@ -1282,71 +1281,6 @@ encoding:
1282
1281
contentType: image/png, image/jpeg
1283
1282
```
1284
1283
1285
-
#### <a name="itemsObject"></a>Items Object
1286
-
1287
-
A limited subset of JSON-Schema's items object.
1288
-
It is used by parameter definitions.
1289
-
1290
-
##### Fixed Fields
1291
-
Field Name | Type | Description
1292
-
---|:---:|---
1293
-
<a name="itemsType"></a>type | `string` | **Required.** The internal type of the array. The value MUST be one of `"string"`, `"number"`, `"integer"`, `"boolean"`, or `"array"`. Files and models are not allowed.
1294
-
<a name="itemsFormat"></a>format | `string` | The extending format for the previously mentioned [`type`](#parameterType). See [Data Type Formats](#dataTypeFormat) for further details.
1295
-
<a name="itemsItems"></a>items | [Items Object](#itemsObject) | **Required if [`type`](#itemsType) is "array".** Describes the type of items in the array.
1296
-
<a name="itemsCollectionFormat"></a>collectionFormat | `string` | Determines the format of the array if type array is used. Possible values are: <ul><li>`csv` - comma separated values `foo,bar`. <li>`ssv` - space separated values `foo bar`. <li>`tsv` - tab separated values `foo\tbar`. <li>`pipes` - pipe separated values <code>foo|bar</code>. </ul> Default value is `csv`.
1297
-
<a name="itemsDefault"></a>default | * | Declares the value of the item that the server will use if none is provided. (Note: "default"has no meaning for required items.) See http://json-schema.org/latest/json-schema-validation.html#anchor101. Unlike JSON Schema this value MUST conform to the defined [`type`](#itemsType) for the data type.
1298
-
<a name="itemsMaximum"></a>maximum | `number` | See http://json-schema.org/latest/json-schema-validation.html#anchor17.
1299
-
<a name="itemsMaximum"></a>exclusiveMaximum | `boolean` | See http://json-schema.org/latest/json-schema-validation.html#anchor17.
1300
-
<a name="itemsMinimum"></a>minimum | `number` | See http://json-schema.org/latest/json-schema-validation.html#anchor21.
1301
-
<a name="itemsExclusiveMinimum"></a>exclusiveMinimum | `boolean` | See http://json-schema.org/latest/json-schema-validation.html#anchor21.
1302
-
<a name="itemsMaxLength"></a>maxLength | `integer` | See http://json-schema.org/latest/json-schema-validation.html#anchor26.
1303
-
<a name="itemsMinLength"></a>minLength | `integer` | See http://json-schema.org/latest/json-schema-validation.html#anchor29.
1304
-
<a name="itemsPattern"></a>pattern | `string` | See http://json-schema.org/latest/json-schema-validation.html#anchor33.
1305
-
<a name="itemsMaxItems"></a>maxItems | `integer` | See http://json-schema.org/latest/json-schema-validation.html#anchor42.
1306
-
<a name="itemsMinItems"></a>minItems | `integer` | See http://json-schema.org/latest/json-schema-validation.html#anchor45.
1307
-
<a name="itemsUniqueItems"></a>uniqueItems | `boolean` | See http://json-schema.org/latest/json-schema-validation.html#anchor49.
1308
-
<a name="itemsEnum"></a>enum | [*] | See http://json-schema.org/latest/json-schema-validation.html#anchor76.
1309
-
<a name="itemsMultipleOf"></a>multipleOf | `number` | See http://json-schema.org/latest/json-schema-validation.html#anchor14.
1310
-
1311
-
This object can be extended with [Specification Extensions](#specificationExtensions).
1312
-
1313
-
##### Items Object Examples
1314
-
1315
-
Items must be of type string and have the minimum length of 2 characters:
1316
-
1317
-
```json
1318
-
{
1319
-
"type": "string",
1320
-
"minLength": 2
1321
-
}
1322
-
```
1323
-
1324
-
```yaml
1325
-
type: string
1326
-
minLength: 2
1327
-
```
1328
-
1329
-
An array of arrays, the internal array being of type integer, numbers must be between 0 and 63 (inclusive):
A container for the expected responses of an operation.
@@ -1591,7 +1525,7 @@ myWebhook:
1591
1525
1592
1526
1593
1527
#### <a name="headersObject"></a>Headers Object
1594
-
Lists the headers that can be sent as part of a response.
1528
+
Lists the headers that can be sent as part of a response. Note that [RFC 7230](https://tools.ietf.org/html/rfc7230#page-22) states header names are case insensitive.
1595
1529
1596
1530
##### Patterned Fields
1597
1531
Field Pattern | Type | Description
@@ -1606,29 +1540,38 @@ Rate-limit headers:
1606
1540
{
1607
1541
"X-Rate-Limit-Limit": {
1608
1542
"description": "The number of allowed requests in the current period",
1609
-
"type": "integer"
1543
+
"schema": {
1544
+
"type": "integer"
1545
+
}
1610
1546
},
1611
1547
"X-Rate-Limit-Remaining": {
1612
1548
"description": "The number of remaining requests in the current period",
1613
-
"type": "integer"
1549
+
"schema": {
1550
+
"type": "integer"
1551
+
}
1614
1552
},
1615
1553
"X-Rate-Limit-Reset": {
1616
1554
"description": "The number of seconds left in the current period",
1617
-
"type": "integer"
1555
+
"schema": {
1556
+
"type": "integer"
1557
+
}
1618
1558
}
1619
1559
}
1620
1560
```
1621
1561
1622
1562
```yaml
1623
1563
X-Rate-Limit-Limit:
1624
1564
description: The number of allowed requests in the current period
1625
-
type: integer
1565
+
schema:
1566
+
type: integer
1626
1567
X-Rate-Limit-Remaining:
1627
1568
description: The number of remaining requests in the current period
1628
-
type: integer
1569
+
schema:
1570
+
type: integer
1629
1571
X-Rate-Limit-Reset:
1630
1572
description: The number of seconds left in the current period
1631
-
type: integer
1573
+
schema:
1574
+
type: integer
1632
1575
```
1633
1576
1634
1577
#### <a name="examplesObject"></a>Examples Object
@@ -2084,28 +2027,11 @@ In the above, the link for `UserCommitHistory` points to the operation `getUserC
2084
2027
2085
2028
#### <a name="headerObject"></a>Header Object
2086
2029
2087
-
Field Name | Type | Description
2088
-
---|:---:|---
2089
-
<a name="headerDescription"></a>description | `string` | A short description of the header.
2090
-
<a name="headerType"></a>type | `string` | **Required.** The type of the object. The value MUST be one of `"string"`, `"number"`, `"integer"`, `"boolean"`, or `"array"`.
2091
-
<a name="headerFormat"></a>format | `string` | The extending format for the previously mentioned [`type`](#stType). See [Data Type Formats](#dataTypeFormat) for further details.
2092
-
<a name="headerItems"></a>items | [Items Object](#itemsObject) | **Required if [`type`](#stType) is "array".** Describes the type of items in the array.
2093
-
<a name="headerCollectionFormat"></a>collectionFormat | `string` | Determines the format of the array if type array is used. Possible values are: <ul><li>`csv` - comma separated values `foo,bar`. <li>`ssv` - space separated values `foo bar`. <li>`tsv` - tab separated values `foo\tbar`. <li>`pipes` - pipe separated values <code>foo|bar</code>. </ul> Default value is `csv`.
2094
-
<a name="headerDefault"></a>default | * | Declares the value of the header that the server will use if none is provided. (Note: "default"has no meaning for required headers.) See http://json-schema.org/latest/json-schema-validation.html#anchor101. Unlike JSON Schema this value MUST conform to the defined [`type`](#headerDefault) for the header.
2095
-
<a name="headerMaximum"></a>maximum | `number` | See http://json-schema.org/latest/json-schema-validation.html#anchor17.
2096
-
<a name="headerMaximum"></a>exclusiveMaximum | `boolean` | See http://json-schema.org/latest/json-schema-validation.html#anchor17.
2097
-
<a name="headerMinimum"></a>minimum | `number` | See http://json-schema.org/latest/json-schema-validation.html#anchor21.
2098
-
<a name="headerExclusiveMinimum"></a>exclusiveMinimum | `boolean` | See http://json-schema.org/latest/json-schema-validation.html#anchor21.
2099
-
<a name="headerMaxLength"></a>maxLength | `integer` | See http://json-schema.org/latest/json-schema-validation.html#anchor26.
2100
-
<a name="headerMinLength"></a>minLength | `integer` | See http://json-schema.org/latest/json-schema-validation.html#anchor29.
2101
-
<a name="headerPattern"></a>pattern | `string` | See http://json-schema.org/latest/json-schema-validation.html#anchor33.
2102
-
<a name="headerMaxItems"></a>maxItems | `integer` | See http://json-schema.org/latest/json-schema-validation.html#anchor42.
2103
-
<a name="headerMinItems"></a>minItems | `integer` | See http://json-schema.org/latest/json-schema-validation.html#anchor45.
2104
-
<a name="headerUniqueItems"></a>uniqueItems | `boolean` | See http://json-schema.org/latest/json-schema-validation.html#anchor49.
2105
-
<a name="headerEnum"></a>enum | [*] | See http://json-schema.org/latest/json-schema-validation.html#anchor76.
2106
-
<a name="headerMultipleOf"></a>multipleOf | `number` | See http://json-schema.org/latest/json-schema-validation.html#anchor14.
2030
+
The Header Object follows the structure of the [Parameter Object](#parameterObject), with the following changes:
2107
2031
2108
-
This object can be extended with [Specification Extensions](#specificationExtensions).
2032
+
1. `name` MUST NOT be specified, it is given in the [Headers Object](#headersObject).
2033
+
1. `in` MUST NOT be specified, it is implicitly in `header`.
2034
+
1. All traits that are affected by the location MUST follow the location of `header` (for example, [`style`](#parameterStyle)).
2109
2035
2110
2036
##### Header Object Example
2111
2037
@@ -2114,13 +2040,16 @@ A simple header with of an integer type:
2114
2040
```json
2115
2041
{
2116
2042
"description": "The number of allowed requests in the current period",
2117
-
"type": "integer"
2043
+
"schema": {
2044
+
"type": "integer"
2045
+
}
2118
2046
}
2119
2047
```
2120
2048
2121
2049
```yaml
2122
2050
description: The number of allowed requests in the current period
2123
-
type: integer
2051
+
schema:
2052
+
type: integer
2124
2053
```
2125
2054
2126
2055
#### <a name="tagObject"></a>Tag Object
@@ -2708,7 +2637,7 @@ See examples for expected behavior.
2708
2637
##### Fixed Fields
2709
2638
Field Name | Type | Description
2710
2639
---|:---:|---
2711
-
<a name="xmlName"></a>name | `string` | Replaces the name of the element/attribute used for the described schema property. When defined within the Items Object (`items`), it will affect the name of the individual XML elements within the list. When defined alongside `type` being `array` (outside the `items`), it will affect the wrapping element and only if `wrapped` is `true`. If `wrapped` is `false`, it will be ignored.
2640
+
<a name="xmlName"></a>name | `string` | Replaces the name of the element/attribute used for the described schema property. When defined within `items`, it will affect the name of the individual XML elements within the list. When defined alongside `type` being `array` (outside the `items`), it will affect the wrapping element and only if `wrapped` is `true`. If `wrapped` is `false`, it will be ignored.
2712
2641
<a name="xmlNamespace"></a>namespace | `string` | The URL of the namespace definition. Value SHOULD be in the form of a URL.
2713
2642
<a name="xmlPrefix"></a>prefix | `string` | The prefix to be used for the [name](#xmlName).
2714
2643
<a name="xmlAttribute"></a>attribute | `boolean` | Declares whether the property definition translates to an attribute instead of an element. Default value is `false`.
0 commit comments