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
Clarify Link Obj parameters as best we can (3.0.4)
This acknowledges the ambiguity in the key and value syntax of the
Link Object's `parameter` field, and provides a bit of guidance
on how to implement it. Sadly it is not possible to fully solve
in a point release.
Copy file name to clipboardExpand all lines: versions/3.0.4.md
+11-1Lines changed: 11 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2060,7 +2060,7 @@ Field Name | Type | Description
2060
2060
---|:---:|---
2061
2061
<a name="linkOperationRef"></a>operationRef | `string` | A relative or absolute URI reference to an OAS operation. This field is mutually exclusive of the `operationId` field, and MUST point to an [Operation Object](#operationObject). Relative `operationRef` values MAY be used to locate an existing [Operation Object](#operationObject) in the OpenAPI definition.
2062
2062
<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.
2063
-
<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. The parameter name can be qualified using the [parameter location](#parameterIn) `[{in}.]{name}` for operations that use the same parameter name in different locations (e.g. path\.id).
2063
+
<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 (see further details below).
2064
2064
<a name="linkRequestBody"></a>requestBody | Any \| [{expression}](#runtimeExpression) | A literal value or [{expression}](#runtimeExpression) to use as a request body when calling the target operation.
2065
2065
<a name="linkDescription"></a>description | `string` | A description of the link. [CommonMark syntax](https://spec.commonmark.org/) MAY be used for rich text representation.
2066
2066
<a name="linkServer"></a>server | [Server Object](#serverObject) | A server object to be used by the target operation.
@@ -2072,6 +2072,16 @@ In the case of an `operationId`, it MUST be unique and resolved in the scope of
2072
2072
Because of the potential for name clashes, the `operationRef` syntax is preferred
2073
2073
for specifications with external references.
2074
2074
2075
+
Keys and values for `parameters` have multiple syntaxes:
2076
+
2077
+
* The key can either be just the parameter name, or can be qualified using the [parameter location](#parameterIn) `[{in}.]{name}` for operations that use the same parameter name in different locations (e.g. path\.id).
2078
+
* The value can be a literal value or a [Runtime Expression](#runtimeExpression)
2079
+
2080
+
Certain keys and values for `parameters` can be ambiguous, in which case their handling is implementation-defined as it was not spelled out in earlier versions of OAS 3.0. However, it is RECOMMENDED that:
2081
+
2082
+
* Keys that match unqualified parameter names be treated as those names, as a parameter that is (confusingly) named to appear qualified (e.g. `path\.id`) can be qualified to disambiguate it (e.g. `path\.path\.id`)
2083
+
* Values that are valid runtime expressions be handled as runtime expressions, although this means that it is not possible to pass a literal value that looks like a runtime expression
2084
+
2075
2085
##### Examples
2076
2086
2077
2087
Computing a link from a request operation where the `$request.path.id` is used to pass a request parameter to the linked operation.
0 commit comments