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
+37-24Lines changed: 37 additions & 24 deletions
Original file line number
Diff line number
Diff line change
@@ -1860,25 +1860,20 @@ 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
1869
1865
Field Pattern | Type | Description
1870
1866
---|:---:|---
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).
1867
+
<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
1868
The link SHALL reference a single Link Object, or a JSON Reference to a single link object.
1873
1869
1874
-
1875
1870
#### <a name="#linkObject"></a>Link Object
1876
1871
The `Link Object` is responsible for defining a possible operation based on a single response.
1877
1872
1878
1873
Field Name | Type | Description
1879
1874
---|:---:|---
1880
1875
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.
1876
+
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
1877
parameters | [Link Parameters Object](#linkParametersObject) | an object representing parameters to pass to an operation as specified with `operationId` or identified via `href`.
1883
1878
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
1879
description | `string` | a description of the link, supports [CommonMark syntax](http://spec.commonmark.org/).
@@ -2053,9 +2048,10 @@ paths:
2053
2048
operationId: getUserByName
2054
2049
parameters:
2055
2050
- name: username
2056
-
type: string
2057
2051
in: path
2058
2052
required: true
2053
+
schema:
2054
+
type: string
2059
2055
responses:
2060
2056
200:
2061
2057
description: The User
@@ -2071,9 +2067,10 @@ paths:
2071
2067
operationId: getRepositoriesByOwner
2072
2068
parameters:
2073
2069
- name: username
2074
-
type: string
2075
2070
in: path
2076
2071
required: true
2072
+
schema:
2073
+
type: string
2077
2074
responses:
2078
2075
200:
2079
2076
description: repositories owned by the supplied user
@@ -2094,10 +2091,13 @@ paths:
2094
2091
type: string
2095
2092
in: path
2096
2093
required: true
2094
+
schema:
2095
+
type: string
2097
2096
- name: slug
2098
-
type: string
2099
2097
in: path
2100
2098
required: true
2099
+
schema:
2100
+
type: string
2101
2101
responses:
2102
2102
200:
2103
2103
description: The repository
@@ -2113,20 +2113,23 @@ paths:
2113
2113
operationId: getPullRequestsByRepository
2114
2114
parameters:
2115
2115
- name: username
2116
-
type: string
2117
2116
in: path
2118
2117
required: true
2118
+
schema:
2119
+
type: string
2119
2120
- name: slug
2120
-
type: string
2121
2121
in: path
2122
2122
required: true
2123
+
schema:
2124
+
type: string
2123
2125
- name: state
2124
-
type: string
2125
2126
in: query
2126
-
enum:
2127
-
- open
2128
-
- merged
2129
-
- declined
2127
+
schema:
2128
+
type: string
2129
+
enum:
2130
+
- open
2131
+
- merged
2132
+
- declined
2130
2133
responses:
2131
2134
200:
2132
2135
description: an array of pull request objects
@@ -2141,17 +2144,20 @@ paths:
2141
2144
operationId: getPullRequestsById
2142
2145
parameters:
2143
2146
- name: username
2144
-
type: string
2145
2147
in: path
2146
2148
required: true
2149
+
schema:
2150
+
type: string
2147
2151
- name: slug
2148
-
type: string
2149
2152
in: path
2150
2153
required: true
2154
+
schema:
2155
+
type: string
2151
2156
- name: pid
2152
-
type: string
2153
2157
in: path
2154
2158
required: true
2159
+
schema:
2160
+
type: string
2155
2161
responses:
2156
2162
200:
2157
2163
description: a pull request object
@@ -2166,17 +2172,20 @@ paths:
2166
2172
operationId: mergePullRequest
2167
2173
parameters:
2168
2174
- name: username
2169
-
type: string
2170
2175
in: path
2171
2176
required: true
2177
+
schema:
2178
+
type: string
2172
2179
- name: slug
2173
-
type: string
2174
2180
in: path
2175
2181
required: true
2182
+
schema:
2183
+
type: string
2176
2184
- name: pid
2177
-
type: string
2178
2185
in: path
2179
2186
required: true
2187
+
schema:
2188
+
type: string
2180
2189
responses:
2181
2190
204:
2182
2191
description: the PR was successfully merged
@@ -2262,6 +2271,10 @@ Many operations require parameters to be passed, and these MAY be dynamic depend
2262
2271
To specify parameters required by the operation, we can use a **Link Parameters Object**.
2263
2272
This object contains parameter names along with static or dynamic values:
2264
2273
2274
+
Field Pattern | Type | Description
2275
+
---|:---:|---
2276
+
<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