Skip to content

Commit ffa2946

Browse files
committed
More example corrections
1 parent d69b3b5 commit ffa2946

File tree

1 file changed

+30
-14
lines changed

1 file changed

+30
-14
lines changed

versions/3.0.md

Lines changed: 30 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1915,27 +1915,43 @@ paths:
19151915
- name: id
19161916
in: path
19171917
required: true
1918-
description: the user identifier, as userId or username
1918+
description: the user identifier, as userId
19191919
schema:
19201920
type: string
1921-
responses:
1922-
'200':
1923-
description: the user being returned
1924-
content:
1925-
application/json:
1926-
schema:
1927-
type: object
1928-
properties:
1929-
uuid: the unique user id
1930-
type: string
1931-
format: uuid
1921+
get:
1922+
responses:
1923+
'200':
1924+
description: the user being returned
1925+
content:
1926+
application/json:
1927+
schema:
1928+
type: object
1929+
properties:
1930+
uuid: the unique user id
1931+
type: string
1932+
format: uuid
19321933
links:
1933-
Address:
1934+
address:
19341935
# the target link operationId
19351936
operationId: getUserAddress
19361937
parameters:
19371938
# get the `id` field from the request path parameter named `id`
19381939
userId: $request.path.id
1940+
# the path item of the linked operation
1941+
/users/{userid}/address:
1942+
parameters:
1943+
- name: userid
1944+
in: path
1945+
required: true
1946+
description: the user identifier, as userId
1947+
schema:
1948+
type: string
1949+
# linked operation
1950+
get:
1951+
operationId: getUserAddress
1952+
responses:
1953+
'200':
1954+
description: the user's address
19391955
```
19401956
19411957
When a runtime expression evaluates to null, no parameter value is passed to the target operation.
@@ -1944,7 +1960,7 @@ Values from the response body can be used to drive a linked operation.
19441960
19451961
```yaml
19461962
links:
1947-
addressesLink:
1963+
address:
19481964
operationId: getUserAddressByUUID
19491965
parameters:
19501966
# get the `id` field from the request path parameter named `id`

0 commit comments

Comments
 (0)