Skip to content

Commit 53196d5

Browse files
committed
Removed Link Parameters Object
1 parent 3711cfe commit 53196d5

File tree

1 file changed

+2
-42
lines changed

1 file changed

+2
-42
lines changed

versions/3.0.md

Lines changed: 2 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ Additional utilities can also take advantage of the resulting files, such as tes
5151
- [Callback Object](#callbackObject)
5252
- [Example Object](#exampleObject)
5353
- [Link Object](#linkObject)
54-
- [Link Parameters Object](#linkParametersObject)
5554
- [Header Object](#headerObject)
5655
- [Tag Object](#tagObject)
5756
- [Reference Object](#referenceObject)
@@ -1917,15 +1916,15 @@ The presence of a link does not guarantee the caller's ability to successfully i
19171916

19181917
As opposed to _dynamic_ links (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.
19191918

1920-
For computing links, and providing instructions to execute them, [variable substitution](#variableSubstitution) is used for accessing values in a response and using them as values while invoking the linked operation.
1919+
Many operations require parameters to be passed, and these MAY be dynamic depending on the response itself. For computing links, and providing instructions to execute them, [variable substitution](#variableSubstitution) is used for accessing values in a response and using them as values while invoking the linked operation.
19211920

19221921
##### Fixed Fields
19231922

19241923
Field Name | Type | Description
19251924
---|:---:|---
19261925
<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.
19271926
<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.
1928-
<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`.
1927+
<a name="linkParameters"></a>parameters | Map[`string` | Any \| [{expression}](#variableSubstitution) | A map representing parameters to pass to the 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.
19291928
<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.
19301929
<a name="linkDescription"></a>description | `string` | a description of the link, supports [CommonMark syntax](http://spec.commonmark.org/).
19311930
<a name="linkServer"></a>server | [Server Object](#serverObject) | a server object to be used by the target operation.
@@ -2317,45 +2316,6 @@ components:
23172316
Note that in the use of `operationRef`, the _escaped forward-slash_ is necessary when
23182317
using JSON references.
23192318

2320-
#### <a name="linkParametersObject"></a>Link Parameters Object
2321-
Using the `operationId` to reference an operation in the definition has many benefits, including the ability to define media type options, security requirements, response and error payloads.
2322-
Many operations require parameters to be passed, and these MAY be dynamic depending on the response itself.
2323-
2324-
To specify parameters required by the operation, we can use a **Link Parameters Object**.
2325-
This object contains parameter names along with static or dynamic values:
2326-
2327-
##### Patterned Fields
2328-
Field Pattern | Type | Description
2329-
---|:---:|---
2330-
<a name="linkParameterName"></a> {name} | Any \| [{expression}](#variableSubstitution) | A constant value or expression to be evaluated and passed to the linked operation.
2331-
2332-
```yaml
2333-
paths:
2334-
/user/{username}: # ...
2335-
/user/{username}/commits:
2336-
get:
2337-
operationId: userCommitHistory
2338-
parameters:
2339-
- name: username
2340-
in: path
2341-
type: string
2342-
required: true
2343-
- name: page
2344-
type: integer
2345-
format: int32
2346-
required: true
2347-
responses: { ... }
2348-
components:
2349-
links:
2350-
UserCommitHistory:
2351-
operationId: userCommitHistory
2352-
parameters:
2353-
username: $response.body#/user/username
2354-
page: 0
2355-
```
2356-
2357-
In the above, the link for `UserCommitHistory` points to the operation `getUserCommitHistory`, and passes the `username` value from the response payload as well as the static scalar value `0`.
2358-
23592319
#### <a name="headerObject"></a>Header Object
23602320

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

0 commit comments

Comments
 (0)