Skip to content

Commit acab4a9

Browse files
authored
Merge pull request #1219 from OAI/dm/redo-grammar
Grammar fixes copied from Kris' PRs
2 parents fdd5187 + 7d76b42 commit acab4a9

File tree

1 file changed

+17
-22
lines changed

1 file changed

+17
-22
lines changed

versions/3.0.md

+17-22
Original file line numberDiff line numberDiff line change
@@ -1852,7 +1852,7 @@ Content-Length: 123
18521852
Location: http://example.org/subscription/1
18531853
```
18541854

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`.
18561856

18571857
Expression | Value
18581858
---|:---
@@ -1969,26 +1969,26 @@ schemas:
19691969
The `Link object` represents a possible design-time link for a response.
19701970
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.
19711971

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.
19731973

19741974
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.
19751975

19761976
##### Fixed Fields
19771977

19781978
Field Name | Type | Description
19791979
---|:---:|---
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.
19851985

19861986
This object can be extended with [Specification Extensions](#specificationExtensions).
19871987

19881988
Locating a linked resource MAY be performed by either a `operationRef` or `operationId`.
19891989
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.
19921992

19931993
##### Examples
19941994

@@ -2053,8 +2053,8 @@ links:
20532053
userUuid: $response.body#/uuid
20542054
```
20552055
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 links at their discretion.
2057+
Neither permissions, nor the capability to make a successful call to that link, is guaranteed
20582058
solely by the existence of a relationship.
20592059
20602060
@@ -2100,7 +2100,7 @@ The runtime expression is defined by the following [ABNF](https://tools.ietf.org
21002100
header-reference = "header." token
21012101
query-reference = "query." name
21022102
path-reference = "path." name
2103-
body-reference = "body#" fragment
2103+
body-reference = "body" ["#" fragment]
21042104
fragment = a JSON Pointer [RFC 6901](https://tools.ietf.org/html/rfc6901)
21052105
name = *( char )
21062106
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
21152115
21162116
Source Location | example expression | notes
21172117
---|:---|:---|
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.
21192119
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.
21222122
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.
21242124
Response header | `$response.header.Server` | Single header values only are available
21252125
21262126
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.
21332128
21342129
#### <a name="headerObject"></a>Header Object
21352130

0 commit comments

Comments
 (0)