Skip to content

Commit dbf5f6d

Browse files
committed
added callbacks
1 parent 12e553f commit dbf5f6d

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

versions/3.0.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,7 @@ Field Name | Type | Description
453453
<a name="operationParameters"></a>parameters | [[Parameter Object](#parameterObject) <span>&#124;</span> [Reference Object](#referenceObject)] | A list of parameters that are applicable for this operation. If a parameter is already defined at the [Path Item](#pathItemParameters), the new definition will override it, but can never remove it. The list MUST NOT include duplicated parameters. A unique parameter is defined by a combination of a [name](#parameterName) and [___location](#parameterIn). The list can use the [Reference Object](#referenceObject) to link to parameters that are defined at the [OpenAPI Object's parameters](#oasParameters).
454454
<a name="operationRequestBody"></a>requestBody | [[Request Body Object](#requestBodyObject) <span>&#124;</span> [Reference Object](#referenceObject)] | The request body applicable for this operation.
455455
<a name="operationResponses"></a>responses | [Responses Object](#responsesObject) | **Required.** The list of possible responses as they are returned from executing this operation.
456+
<a name="operationCallbacks"></a>callback responses | [Callback Responses Object](#callbackObject) | The list of possible callback responses as they are returned from executing this operation.
456457
<a name="operationSchemes"></a>schemes | [`string`] | The transfer protocol for the operation. Values MUST be from the list: `"http"`, `"https"`, `"ws"`, `"wss"`. The value overrides the OpenAPI Object [`schemes`](#oasSchemes) definition.
457458
<a name="operationDeprecated"></a>deprecated | `boolean` | Declares this operation to be deprecated. Usage of the declared operation should be refrained. Default value is `false`.
458459
<a name="operationSecurity"></a>security | [[Security Requirement Object](#securityRequirementObject)] | A declaration of which security schemes are applied for this operation. The list of values describes alternative security schemes that can be used (that is, there is a logical OR between the security requirements). This definition overrides any declared top-level [`security`](#oasSecurity). To remove a top-level security declaration, an empty array can be used.
@@ -1050,6 +1051,36 @@ Response with no return value:
10501051
description: object created
10511052
```
10521053

1054+
#### <a name="callbackObject"></a>Callback Object
1055+
1056+
A container for possible out-of band callbacks from an operation. A callback may be returned from an operation, calling back to the path specified in the operation object.
1057+
1058+
##### Patterned Fields
1059+
Field Pattern | Type | Description
1060+
---|:---:|---
1061+
<a name="responseName"></a>Callback name | [Callback Operation Object](#operationObject) <span>&#124;</span> [Operation Object](#operationObject) | An operation object used to define a callback payload structure
1062+
<a name="responsesExtensions"></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 [Specification Extensions](#specificationExtensions) for further details.
1063+
1064+
1065+
##### Callback Object Example
1066+
1067+
A callback to the URL specified by the `url` parameter in the request
1068+
1069+
1070+
```yaml
1071+
myWebhook:
1072+
'$request.url':
1073+
post:
1074+
body:
1075+
name: postResponse
1076+
schema:
1077+
$ref: '#/definitions/SomePayload'
1078+
responses:
1079+
200:
1080+
description: webhook successfully processed an no retries will be performed
1081+
```
1082+
1083+
10531084
#### <a name="headersObject"></a>Headers Object
10541085
Lists the headers that can be sent as part of a response.
10551086

0 commit comments

Comments
 (0)