Skip to content

Commit 9dd627e

Browse files
committed
Updates to link object and link parameter objects
1 parent fa603c0 commit 9dd627e

File tree

1 file changed

+37
-24
lines changed

1 file changed

+37
-24
lines changed

versions/3.0.md

Lines changed: 37 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1860,25 +1860,20 @@ The presence of a link does not guarantee the caller's ability to successfully i
18601860

18611861
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.
18621862

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

18691865
Field Pattern | Type | Description
18701866
---|:---:|---
1871-
<a name="linkName"></a>link name | [Link Object](#linkObject) <span>&#124;</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>&#124;</span> [Reference Object](#referenceObject)] | A short name for the link, following the naming constraints of the names for [Component Objects](#componentsObject).
18721868
The link SHALL reference a single Link Object, or a JSON Reference to a single link object.
18731869

1874-
18751870
#### <a name="#linkObject"></a>Link Object
18761871
The `Link Object` is responsible for defining a possible operation based on a single response.
18771872

18781873
Field Name | Type | Description
18791874
---|:---:|---
18801875
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.
18821877
parameters | [Link Parameters Object](#linkParametersObject) | an object representing parameters to pass to an operation as specified with `operationId` or identified via `href`.
18831878
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.
18841879
description | `string` | a description of the link, supports [CommonMark syntax](http://spec.commonmark.org/).
@@ -2053,9 +2048,10 @@ paths:
20532048
operationId: getUserByName
20542049
parameters:
20552050
- name: username
2056-
type: string
20572051
in: path
20582052
required: true
2053+
schema:
2054+
type: string
20592055
responses:
20602056
200:
20612057
description: The User
@@ -2071,9 +2067,10 @@ paths:
20712067
operationId: getRepositoriesByOwner
20722068
parameters:
20732069
- name: username
2074-
type: string
20752070
in: path
20762071
required: true
2072+
schema:
2073+
type: string
20772074
responses:
20782075
200:
20792076
description: repositories owned by the supplied user
@@ -2094,10 +2091,13 @@ paths:
20942091
type: string
20952092
in: path
20962093
required: true
2094+
schema:
2095+
type: string
20972096
- name: slug
2098-
type: string
20992097
in: path
21002098
required: true
2099+
schema:
2100+
type: string
21012101
responses:
21022102
200:
21032103
description: The repository
@@ -2113,20 +2113,23 @@ paths:
21132113
operationId: getPullRequestsByRepository
21142114
parameters:
21152115
- name: username
2116-
type: string
21172116
in: path
21182117
required: true
2118+
schema:
2119+
type: string
21192120
- name: slug
2120-
type: string
21212121
in: path
21222122
required: true
2123+
schema:
2124+
type: string
21232125
- name: state
2124-
type: string
21252126
in: query
2126-
enum:
2127-
- open
2128-
- merged
2129-
- declined
2127+
schema:
2128+
type: string
2129+
enum:
2130+
- open
2131+
- merged
2132+
- declined
21302133
responses:
21312134
200:
21322135
description: an array of pull request objects
@@ -2141,17 +2144,20 @@ paths:
21412144
operationId: getPullRequestsById
21422145
parameters:
21432146
- name: username
2144-
type: string
21452147
in: path
21462148
required: true
2149+
schema:
2150+
type: string
21472151
- name: slug
2148-
type: string
21492152
in: path
21502153
required: true
2154+
schema:
2155+
type: string
21512156
- name: pid
2152-
type: string
21532157
in: path
21542158
required: true
2159+
schema:
2160+
type: string
21552161
responses:
21562162
200:
21572163
description: a pull request object
@@ -2166,17 +2172,20 @@ paths:
21662172
operationId: mergePullRequest
21672173
parameters:
21682174
- name: username
2169-
type: string
21702175
in: path
21712176
required: true
2177+
schema:
2178+
type: string
21722179
- name: slug
2173-
type: string
21742180
in: path
21752181
required: true
2182+
schema:
2183+
type: string
21762184
- name: pid
2177-
type: string
21782185
in: path
21792186
required: true
2187+
schema:
2188+
type: string
21802189
responses:
21812190
204:
21822191
description: the PR was successfully merged
@@ -2262,6 +2271,10 @@ Many operations require parameters to be passed, and these MAY be dynamic depend
22622271
To specify parameters required by the operation, we can use a **Link Parameters Object**.
22632272
This object contains parameter names along with static or dynamic values:
22642273

2274+
Field Pattern | Type | Description
2275+
---|:---:|---
2276+
<a name="linkParameterName"></a> {name} | Any <span>&#124;</span> [{expression}](#variableSubstitution) | A constant value or expression to be evaluated and passed to the linked operation.
2277+
22652278
```yaml
22662279
paths:
22672280
/user/{username}: # ...

0 commit comments

Comments
 (0)