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
+39-24Lines changed: 39 additions & 24 deletions
Original file line number
Diff line number
Diff line change
@@ -1860,25 +1860,21 @@ The presence of a link does not guarantee the caller's ability to successfully i
1860
1860
1861
1861
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.
1862
1862
1863
-
For computing links, and providing instructions to execute them, a mechanism is defined for accessing values in a response and using them as variables while invoking the linked operation.
1864
-
1865
-
Field Name | Type | Description
1866
-
---|:---:|---
1867
-
<a name="referenceRef"></a>$ref | `string` | If present, a reference to another Links Object. Note, the presence of `$ref` in the Links Object will cause all _Patterned Objects_ to be ignored.
1863
+
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.
1868
1864
1865
+
##### Patterned Fields
1869
1866
Field Pattern | Type | Description
1870
1867
---|:---:|---
1871
-
<a name="linkName"></a>link name | [Link Object](#linkObject) <span>|</span> [Reference Object](#referenceObject)] | A short name for the link, following the naming constraints of the names for [Component Objects](#componentsObject).
1868
+
<a name="linkName"></a> {name} | [Link Object](#linkObject) <span>|</span> [Reference Object](#referenceObject) | A short name for the link, following the naming constraints of the names for [Component Objects](#componentsObject).
1872
1869
The link SHALL reference a single Link Object, or a JSON Reference to a single link object.
1873
1870
1874
-
1875
1871
#### <a name="#linkObject"></a>Link Object
1876
1872
The `Link Object` is responsible for defining a possible operation based on a single response.
1877
1873
1878
1874
Field Name | Type | Description
1879
1875
---|:---:|---
1880
1876
href | `string` | a relative or absolute URL to a linked resource. This field is mutually exclusive with the `operationId` field.
1881
-
operationId | `string` | the name of an _existing_, resolvable OAS operation, as defined with a unique `operationId`. This field is mutually exclusive with the `href` field. Relative `href` values MAY be used to locate an existing Operation Object in the OAS.
1877
+
operationId | `string` | the name of an _existing_, resolvable OAS operation, as defined with a unique `operationId`. This field is mutually exclusive with the `href` field. Relative `href` values MAY be used to locate an existing [Operation Object](#operationObject) in the OAS.
1882
1878
parameters | [Link Parameters Object](#linkParametersObject) | an object representing parameters to pass to an operation as specified with `operationId` or identified via `href`.
1883
1879
headers | [Headers Object](#headersObject) | an object representing headers to pass to the linked resource. Where conflicts occur between these headers, and those defined in the related operation, these headers override.
1884
1880
description | `string` | a description of the link, supports [CommonMark syntax](http://spec.commonmark.org/).
@@ -2053,9 +2049,10 @@ paths:
2053
2049
operationId: getUserByName
2054
2050
parameters:
2055
2051
- name: username
2056
-
type: string
2057
2052
in: path
2058
2053
required: true
2054
+
schema:
2055
+
type: string
2059
2056
responses:
2060
2057
200:
2061
2058
description: The User
@@ -2071,9 +2068,10 @@ paths:
2071
2068
operationId: getRepositoriesByOwner
2072
2069
parameters:
2073
2070
- name: username
2074
-
type: string
2075
2071
in: path
2076
2072
required: true
2073
+
schema:
2074
+
type: string
2077
2075
responses:
2078
2076
200:
2079
2077
description: repositories owned by the supplied user
@@ -2094,10 +2092,13 @@ paths:
2094
2092
type: string
2095
2093
in: path
2096
2094
required: true
2095
+
schema:
2096
+
type: string
2097
2097
- name: slug
2098
-
type: string
2099
2098
in: path
2100
2099
required: true
2100
+
schema:
2101
+
type: string
2101
2102
responses:
2102
2103
200:
2103
2104
description: The repository
@@ -2113,20 +2114,23 @@ paths:
2113
2114
operationId: getPullRequestsByRepository
2114
2115
parameters:
2115
2116
- name: username
2116
-
type: string
2117
2117
in: path
2118
2118
required: true
2119
+
schema:
2120
+
type: string
2119
2121
- name: slug
2120
-
type: string
2121
2122
in: path
2122
2123
required: true
2124
+
schema:
2125
+
type: string
2123
2126
- name: state
2124
-
type: string
2125
2127
in: query
2126
-
enum:
2127
-
- open
2128
-
- merged
2129
-
- declined
2128
+
schema:
2129
+
type: string
2130
+
enum:
2131
+
- open
2132
+
- merged
2133
+
- declined
2130
2134
responses:
2131
2135
200:
2132
2136
description: an array of pull request objects
@@ -2141,17 +2145,20 @@ paths:
2141
2145
operationId: getPullRequestsById
2142
2146
parameters:
2143
2147
- name: username
2144
-
type: string
2145
2148
in: path
2146
2149
required: true
2150
+
schema:
2151
+
type: string
2147
2152
- name: slug
2148
-
type: string
2149
2153
in: path
2150
2154
required: true
2155
+
schema:
2156
+
type: string
2151
2157
- name: pid
2152
-
type: string
2153
2158
in: path
2154
2159
required: true
2160
+
schema:
2161
+
type: string
2155
2162
responses:
2156
2163
200:
2157
2164
description: a pull request object
@@ -2166,17 +2173,20 @@ paths:
2166
2173
operationId: mergePullRequest
2167
2174
parameters:
2168
2175
- name: username
2169
-
type: string
2170
2176
in: path
2171
2177
required: true
2178
+
schema:
2179
+
type: string
2172
2180
- name: slug
2173
-
type: string
2174
2181
in: path
2175
2182
required: true
2183
+
schema:
2184
+
type: string
2176
2185
- name: pid
2177
-
type: string
2178
2186
in: path
2179
2187
required: true
2188
+
schema:
2189
+
type: string
2180
2190
responses:
2181
2191
204:
2182
2192
description: the PR was successfully merged
@@ -2262,6 +2272,11 @@ Many operations require parameters to be passed, and these MAY be dynamic depend
2262
2272
To specify parameters required by the operation, we can use a **Link Parameters Object**.
2263
2273
This object contains parameter names along with static or dynamic values:
2264
2274
2275
+
##### Patterned Fields
2276
+
Field Pattern | Type | Description
2277
+
---|:---:|---
2278
+
<a name="linkParameterName"></a> {name} | Any <span>|</span> [{expression}](#variableSubstitution) | A constant value or expression to be evaluated and passed to the linked operation.
0 commit comments