Skip to content

Commit 816574d

Browse files
committed
Fixes to callback objects, components and references
1 parent dee224a commit 816574d

File tree

1 file changed

+25
-13
lines changed

1 file changed

+25
-13
lines changed

versions/3.0.md

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -392,10 +392,10 @@ Field Pattern | Type | Description
392392
<a name="componentsParameters"></a> parameters | Map[`string`, [Parameter Object](#parameterObject)] | An object to hold reusable [Parameter Objects](#parameterObject).
393393
<a name="componentsExamples"></a> examples | Map[`string`, [Example Object](#exampleObject)] | An object to hold reusable [Example Objects](#exampleObject).
394394
<a name="componentsRequestBodies"></a> requestBodies | Map[`string`, [RequestBody Object](#requestBodyObject)] | An object to hold reusable [RequestBody objects](#requestBodyObject).
395-
<a name="componentsResponseHeaders"></a> responseHeaders | Map[`string`, [Response Header object](#headersObject)] | An object to hold reusable [Response Headers objects](#headersObject).
395+
<a name="componentsHeaders"></a> headers | Map[`string`, [Header object](#headerObject)] | An object to hold reusable [Header objects](#headerObject).
396396
<a name="componentsSecurityDefinitions"></a> securityDefinitions| Map[`string`, [Security Scheme object](#securitySchemeObject)] | An object to hold reusable [Security Scheme objects](#securitySchemeObject).
397397
<a name="componentsLinks"></a> links | Map[`string`, [Link Object](#linkObject)] | An object to hold reusable [Link Objects](#linkObject).
398-
<a name="componentsCallbacks"></a> callbacks | Map[`string`, [Callbacks Object](#callbacksObject)] | An object to hold reusable [Callbacks Objects](#callbacksObject).
398+
<a name="componentsCallbacks"></a> callbacks | Map[`string`, [Callback Object](#callbackObject)] | An object to hold reusable [Callback Object](#callbackObject).
399399

400400
All the fixed fields declared above are objects that MUST use keys that match the regular expression: `[a-zA-Z0-9.\-_]+`.
401401

@@ -915,8 +915,8 @@ Field Name | Type | Description
915915
<a name="parameterExplode"></a>explode | `boolean` | When this is true, parameter values of type `array` or `object` generate separate parameters for each value of the array, or key-value-pair of the map. For other types of parameters this property has no effect. When [`style`](#parameterStyle) is `form`, the default value is `true`. For all other styles, the default value is `false`.
916916
<a name="parameterAllowReserved"></a>allowReserved | `boolean` | Determines whether the parameter value SHOULD allow reserved characters, as defined by [RFC3986](https://tools.ietf.org/html/rfc3986#section-2.2) `:/?#[]@!$&'()*+,;=` to be included without percent-encoding. This property only applies to parameters with an `in` value of `query`. The default value is `false`.
917917
<a name="parameterSchema"></a>schema | [Schema Object](#schemaObject) | The schema defining the type used for the parameter.
918-
<a name="parameterExamples"></a>examples | [[Example Object](#exampleObject)] | Examples of the content type. Each example in the Examples array SHOULD be in the correct format as specified 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.
919-
<a name="parameterExample"></a>example | [Example Object](#exampleObject) | Example of the content type. The example object SHOULD be in the correct format as specified in the parameter encoding. 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 example provided by the the schema.
918+
<a name="parameterExamples"></a>examples | [[Example Object](#exampleObject) <span>&#124;</span> [Reference Object](#referenceObject)] | Examples of the content type. Each example in the Examples array SHOULD be in the correct format as specified 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.
919+
<a name="parameterExample"></a>example | [Example Object](#exampleObject) <span>&#124;</span> [Reference Object](#referenceObject) | Example of the content type. The example object SHOULD be in the correct format as specified in the parameter encoding. 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 example provided by the the schema.
920920

921921
For more complex scenarios a `content` object can be used to define the media-type
922922
and schema of the parameter. This option is mutually exclusive with the simple scenario
@@ -1244,8 +1244,8 @@ Each content type object provides schema and examples for a the media type ident
12441244
Field Name | Type | Description
12451245
---|:---:|---
12461246
<a name="contentTypeSchema"></a>schema | [Schema Object](#schemaObject) | The schema defining the type used for the request body.
1247-
<a name="contentTypeExamples"></a>examples | [Examples Array](#examplesArray) | Examples of the content type. Each example in the Examples array SHOULD be in the correct format as specified in the _content_ type. 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.
1248-
<a name="contentTypeExample"></a>example | [Example Object](#exampleObject) | Example of the content type. The example object SHOULD be in the correct format as specified in the _content_ type. 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.
1247+
<a name="contentTypeExamples"></a>examples | [[Example Object](#exampleObject) <span>&#124;</span> [Reference Object](#referenceObject)] | Examples of the content type. Each example in the Examples array SHOULD be in the correct format as specified in the _content_ type. 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.
1248+
<a name="contentTypeExample"></a>example | [Example Object](#exampleObject) <span>&#124;</span> [Reference Object](#referenceObject) | Example of the content type. The example object SHOULD be in the correct format as specified in the _content_ type. 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.
12491249

12501250
##### Patterned Fields
12511251
Field Pattern | Type | Description
@@ -1672,24 +1672,36 @@ description: object created
16721672
#### <a name="callbacksObject"></a>Callbacks Object
16731673

16741674
A map of possible out-of band callbacks related to the parent operation.
1675-
Each value in the map is an [Operation Object](#operationObject) that describes a request that may be initiated by the API provider and the expected responses.
1675+
Each value in the map is an [Callback Object](#callbackObject) that describes a request that may be initiated by the API provider and the expected responses.
16761676
The key value used to identify the callback object is an expression, evaluated at runtime, that identifies a URL to use for the callback operation.
16771677

16781678
##### Patterned Fields
16791679
Field Pattern | Type | Description
16801680
---|:---:|---
1681-
<a name="callbackName"></a>Callback name | [Callback Operation Object](#operationObject) <span>&#124;</span> [Operation Object](#operationObject) | An Operation Object used to define a callback request and expected responses
1681+
<a name="callbackName"></a>{name} | [Callback Object](#callbackObject) <span>&#124;</span> [Reference Object](#ReferenceObject) | A Callback Object used to define a callback request and expected responses
1682+
1683+
This object can be extended with [Specification Extensions](#specificationExtensions).
1684+
1685+
#### <a name="callbackObject"></a>Callback Object
1686+
1687+
A map of possible out-of band callbacks related to the parent operation.
1688+
Each value in the map is a [Path Item Object](#pathItemObject) that describes a set of requests that may be initiated by the API provider and the expected responses.
1689+
The key value used to identify the callback object is an expression, evaluated at runtime, that identifies a URL to use for the callback operation.
1690+
1691+
##### Patterned Fields
1692+
Field Pattern | Type | Description
1693+
---|:---:|---
1694+
<a name="callbackExpression"></a>{expression} | [Path Item Object](#pathItemObject) | An Path Item Object used to define a callback request and expected responses
16821695

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

16851698
##### Key Expression
16861699

1687-
The key used to identify the callback object is a variable expression that can be evaluated in the context of a runtime HTTP request/response to identify the URL to be used for the callback request.
1700+
The key used to identify the Path Item Object is a variable expression that can be evaluated in the context of a runtime HTTP request/response to identify the URL to be used for the callback request.
16881701
A simple example might be `$request.body#/url`.
16891702
However, using [variable substition](#variableSubstition) syntax the complete HTTP message can be accessed.
16901703
This includes accessing any part of a body that can be accessed using a JSON Pointer [RFC6901](https://tools.ietf.org/html/rfc6901).
16911704

1692-
16931705
For example, given the following HTTP request:
16941706

16951707
```http
@@ -1748,12 +1760,12 @@ myWebhook:
17481760

17491761

17501762
#### <a name="headersObject"></a>Headers Object
1751-
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.
1763+
Lists the headers that can be sent in a response or forwarded via a link. Note that [RFC 7230](https://tools.ietf.org/html/rfc7230#page-22) states header names are case insensitive.
17521764

17531765
##### Patterned Fields
17541766
Field Pattern | Type | Description
17551767
---|:---:|---
1756-
<a name="headersName"></a>{name} | [Header Object](#headerObject) | The name of the property corresponds to the name of the header. The value describes the type of the header.
1768+
<a name="headersName"></a>{name} | [Header Object](#headerObject) <span>&#124;</span> [Reference Object](#referenceObject) | The name of the property corresponds to the name of the header. The value describes the type of the header.
17571769

17581770
##### Headers Object Example
17591771

@@ -1850,7 +1862,7 @@ Field Name | Type | Description
18501862
---|:---:|---
18511863
href | `string` | a relative or absolute URL to a linked resource. This field is mutually exclusive with the `operationId` field.
18521864
operationId | `string` | the name of an _existing_, resolvable OAS operation, as defined with a unique `operationId`. This field is mutually exclusive with the `href` field. Relative `href` values MAY be used to locate an existing Operation Object in the OAS.
1853-
parameters | [Link Parameters Object](#linkParameters) | an Object representing parameters to pass to an operation as specified with `operationId` or identified via `href`.
1865+
parameters | [Link Parameters Object](#linkParameters) | an object representing parameters to pass to an operation as specified with `operationId` or identified via `href`.
18541866
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.
18551867
description | `string` | a description of the link, supports [CommonMark syntax](http://spec.commonmark.org/).
18561868

0 commit comments

Comments
 (0)