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
+17-22
Original file line number
Diff line number
Diff line change
@@ -1852,7 +1852,7 @@ Content-Length: 123
1852
1852
Location: http://example.org/subscription/1
1853
1853
```
1854
1854
1855
-
Here are the examples of how the various expressions evaluate, assuming a the callback operation has a path parameter named `eventType` and a query parameter named `queryUrl`.
1855
+
The following examples show how the various expressions evaluate, assuming the callback operation has a path parameter named `eventType` and a query parameter named `queryUrl`.
1856
1856
1857
1857
Expression | Value
1858
1858
---|:---
@@ -1969,26 +1969,26 @@ schemas:
1969
1969
The `Link object` represents a possible design-time link for a response.
1970
1970
The presence of a link does not guarantee the caller's ability to successfully invoke it, rather it provides a known relationship and traversal mechanism between responses and other operations.
1971
1971
1972
-
As opposed to _dynamic_ links (i.e. links provided **in** the response payload), the OAS linking mechanism does not require that link information be provided in a specific response format at runtime.
1972
+
Unlike _dynamic_ links (i.e. links provided **in** the response payload), the OAS linking mechanism does not require link information in the runtime response.
1973
1973
1974
1974
For computing links, and providing instructions to execute them, a [runtime expression](#runtimeExpression) is used for accessing values in an operation and using them as parameters while invoking the linked operation.
1975
1975
1976
1976
##### Fixed Fields
1977
1977
1978
1978
Field Name | Type | Description
1979
1979
---|:---:|---
1980
-
<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 an [Operation Object](#operationObject).
1981
-
<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.
1982
-
<a name="linkParameters"></a>parameters | Map[`string`, Any \| [{expression}](#runtimeExpression)] | A map representing parameters to pass to an operation as specified with `operationId` or identified via `operationRef`. The key is the parameter name to be used, whereas the value can be a constant or an expression to be evaluated and passed to the linked operation.
1983
-
<a name="linkDescription"></a>description | `string` | a description of the link, supports [CommonMark syntax](http://spec.commonmark.org/).
1984
-
<a name="linkServer"></a>server | [Server Object](#serverObject) | a server object to be used by the target operation.
1980
+
<a name="linkOperationRef"></a>operationRef | `string` | A relative or absolute reference to an OAS operation. This field is mutually exclusive of the `operationId` field, and MUST point to an [Operation Object](#operationObject).
1981
+
<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 of the `operationRef` field. Relative `operationRef` values MAY be used to locate an existing [Operation Object](#operationObject) in the OAS.
1982
+
<a name="linkParameters"></a>parameters | Map[`string`, Any \| [{expression}](#runtimeExpression) | A map representing parameters to pass to an operation as specified with `operationId` or identified via `operationRef`. The key is the parameter name to be used, whereas the value can be a constant or an expression to be evaluated and passed to the linked operation.
1983
+
<a name="linkDescription"></a>description | `string` | A description of the link. Supports [CommonMark syntax](http://spec.commonmark.org/).
1984
+
<a name="linkServer"></a>server | [Server Object](#serverObject) | A server object to be used by the target operation.
1985
1985
1986
1986
This object can be extended with [Specification Extensions](#specificationExtensions).
1987
1987
1988
1988
Locating a linked resource MAY be performed by either a `operationRef` or `operationId`.
1989
1989
In the case of an `operationId`, it MUST be unique and resolved in the scope of the OAS document.
1990
-
Because of the potential for name clashes, consider the `operationRef` syntax as the preferred
1991
-
method for specifications with external references.
1990
+
Because of the potential for name clashes, the `operationRef` syntax is preferred
1991
+
for specifications with external references.
1992
1992
1993
1993
##### Examples
1994
1994
@@ -2053,8 +2053,8 @@ links:
2053
2053
userUuid: $response.body#/uuid
2054
2054
```
2055
2055
2056
-
As with all links, it is at the clients' discretion to follow them, neither
2057
-
permissions nor the ability to make a successful call to that link is guaranteed
2056
+
Clients follow all linksat their discretion.
2057
+
Neither permissions, nor the capability to make a successful call to that link, is guaranteed
2058
2058
solely by the existence of a relationship.
2059
2059
2060
2060
@@ -2100,7 +2100,7 @@ The runtime expression is defined by the following [ABNF](https://tools.ietf.org
2100
2100
header-reference = "header." token
2101
2101
query-reference = "query." name
2102
2102
path-reference = "path." name
2103
-
body-reference = "body#" fragment
2103
+
body-reference = "body" ["#" fragment]
2104
2104
fragment = a JSON Pointer [RFC 6901](https://tools.ietf.org/html/rfc6901)
2105
2105
name = *( char )
2106
2106
char = as per RFC [7159](https://tools.ietf.org/html/rfc7159#section-7)
@@ -2115,21 +2115,16 @@ The table below provides examples of runtime expressions and examples of their u
2115
2115
2116
2116
Source Location | example expression | notes
2117
2117
---|:---|:---|
2118
-
HTTP Method | `$method` | The allowable values for the `$method` will be those for the HTTP operation
2118
+
HTTP Method | `$method` | The allowable values for the `$method` will be those for the HTTP operation.
2119
2119
Requested media type | `$request.header.accept` |
2120
-
Request parameter | `$request.path.id` | Request parameters MUST be declared in the `parameters` section for the parent operation or they cannot be evaluated. This includes request headers.
2121
-
Request body property | `$request.body#/user/uuid` | For operations which accept payloads, references may be made to portions of the `requestBody` or the entire body itself
2120
+
Request parameter | `$request.path.id` | Request parameters MUST be declared in the `parameters` section of the parent operation or they cannot be evaluated. This includes request headers.
2121
+
Request body property | `$request.body#/user/uuid` | In operations which accept payloads, references may be made to portions of the `requestBody` or the entire body.
2122
2122
Request URL | `$url` |
2123
-
Response value | `$response.body#/status` | Only the payload in the response can be accessed with the `$response` syntax.
2123
+
Response value | `$response.body#/status` | In operations which return payloads, references may be made to portions of the response body or the entire body.
2124
2124
Response header | `$response.header.Server` | Single header values only are available
2125
2125
2126
2126
Runtime expressions preserve the type of the referenced value.
2127
-
Expression values can be embeded into string values by surrounding the expression with `{}` curly braces.
2128
-
2129
-
`$request.body`and `$response.body`expressions are only available in payloads which that can be accessed using a JSON Pointer.
2130
-
If a value does _not_ exist, the result of the expression will be considered a `null` value (as opposed to an empty value).
2131
-
2132
-
2127
+
Expressions can be embeded into string values by surrounding the expression with `{}` curly braces.
0 commit comments