Skip to content

Commit b228c46

Browse files
committed
Removed Headers Object
1 parent f774f1d commit b228c46

File tree

1 file changed

+3
-54
lines changed

1 file changed

+3
-54
lines changed

versions/3.0.md

Lines changed: 3 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ Additional utilities can also take advantage of the resulting files, such as tes
4949
- [Responses Object](#responsesObject)
5050
- [Response Object](#responseObject)
5151
- [Callback Object](#callbackObject)
52-
- [Headers Object](#headersObject)
5352
- [Example Object](#exampleObject)
5453
- [Links Object](#linksObject)
5554
- [Link Object](#linkObject)
@@ -1637,7 +1636,7 @@ Describes a single response from an API Operation, including design-time, static
16371636
Field Name | Type | Description
16381637
---|:---:|---
16391638
<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.
1640-
<a name="responseHeaders"></a>headers | [Headers Object](#headersObject) | A list of headers that are sent with the response. If a response header is defined with the name `"Content-Type"`, it SHALL be ignored.
1639+
<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.
16411640
<a name="responseContentObject"></a>content | [Content Object](#contentObject) | An object containing descriptions of potential response payloads.
16421641
<a name="responseLinks"></a>links | [Links Object](#linksObject) | An object representing operations related to the response payload.
16431642

@@ -1834,56 +1833,6 @@ myWebhook:
18341833
```
18351834

18361835

1837-
#### <a name="headersObject"></a>Headers Object
1838-
Lists the headers that can be sent in a response or forwarded via a link. Note that [RFC7230](https://tools.ietf.org/html/rfc7230#page-22) states header names are case insensitive.
1839-
1840-
##### Patterned Fields
1841-
Field Pattern | Type | Description
1842-
---|:---:|---
1843-
<a name="headersName"></a>{name} | [Header Object](#headerObject) \| [Reference Object](#referenceObject) | The name of the property corresponds to the name of the header. The value describes the type of the header.
1844-
1845-
##### Headers Object Example
1846-
1847-
Rate-limit headers:
1848-
1849-
```json
1850-
{
1851-
"X-Rate-Limit-Limit": {
1852-
"description": "The number of allowed requests in the current period",
1853-
"schema": {
1854-
"type": "integer"
1855-
}
1856-
},
1857-
"X-Rate-Limit-Remaining": {
1858-
"description": "The number of remaining requests in the current period",
1859-
"schema": {
1860-
"type": "integer"
1861-
}
1862-
},
1863-
"X-Rate-Limit-Reset": {
1864-
"description": "The number of seconds left in the current period",
1865-
"schema": {
1866-
"type": "integer"
1867-
}
1868-
}
1869-
}
1870-
```
1871-
1872-
```yaml
1873-
X-Rate-Limit-Limit:
1874-
description: The number of allowed requests in the current period
1875-
schema:
1876-
type: integer
1877-
X-Rate-Limit-Remaining:
1878-
description: The number of remaining requests in the current period
1879-
schema:
1880-
type: integer
1881-
X-Rate-Limit-Reset:
1882-
description: The number of seconds left in the current period
1883-
schema:
1884-
type: integer
1885-
```
1886-
18871836
#### <a name="exampleObject"></a>Example Object
18881837

18891838
##### Fixed Fields
@@ -1985,7 +1934,7 @@ Field Name | Type | Description
19851934
<a name="linkOperationRef"></a>operationRef | `string` | a relative or absolute reference to an OAS operation. This field is mutually exclusive with the `operationId` field, and must point to the fragment of a valid OAS definition.
19861935
<a name="linkOperationId"></a>operationId | `string` | the name of an _existing_, resolvable OAS operation, as defined with a unique `operationId`. This field is mutually exclusive with the `operationRef` field. Relative `operationRef` values MAY be used to locate an existing [Operation Object](#operationObject) in the OAS.
19871936
<a name="linkParameters"></a>parameters | [Link Parameters Object](#linkParametersObject) | an object representing parameters to pass to an operation as specified with `operationId` or identified via `operationRef`.
1988-
<a name="linkHeaders"></a>headers | [Headers Object](#headersObject) | an object representing headers to pass to the linked resource. Where conflicts occur between these headers, and those defined in the related operation, these headers override.
1937+
<a name="linkHeaders"></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. This represents the headers to pass to the linked resource. Where conflicts occur between these headers, and those defined in the related operation, these headers override.
19891938
<a name="linkDescription"></a>description | `string` | a description of the link, supports [CommonMark syntax](http://spec.commonmark.org/).
19901939
<a name="linkServer"></a>server | [Server Object](#serverObject) | a server object to be used by the target operation.
19911940

@@ -2419,7 +2368,7 @@ In the above, the link for `UserCommitHistory` points to the operation `getUserC
24192368

24202369
The Header Object follows the structure of the [Parameter Object](#parameterObject), with the following changes:
24212370

2422-
1. `name` MUST NOT be specified, it is given in the [Headers Object](#headersObject).
2371+
1. `name` MUST NOT be specified, it is given in the corresponding `headers` map.
24232372
1. `in` MUST NOT be specified, it is implicitly in `header`.
24242373
1. All traits that are affected by the ___location MUST be applicable to a ___location of `header` (for example, [`style`](#parameterStyle)).
24252374

0 commit comments

Comments
 (0)