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: src/oas.md
+8-5Lines changed: 8 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2652,8 +2652,10 @@ solely by the existence of a relationship.
2652
2652
2653
2653
##### `operationRef` Examples
2654
2654
2655
-
As references to `operationId` MAY NOT be possible (the `operationId` is an optional
2656
-
field in an [Operation Object](#operation-object)), references MAY also be made through a relative `operationRef`:
2655
+
As the `operationId` is an optional field in an [Operation Object](#operation-object), references MAY instead be made through a URI-reference with `operationRef`.
2656
+
Note that both of these examples reference operations that can be identified via the [Paths Object](#paths-object) to ensure that the operation's path template is unambiguous.
2657
+
2658
+
A relative URI-reference `operationRef`:
2657
2659
2658
2660
```yaml
2659
2661
links:
@@ -2664,7 +2666,7 @@ links:
2664
2666
username: $response.body#/username
2665
2667
```
2666
2668
2667
-
or a URI `operationRef`:
2669
+
A non-relative URI `operationRef`:
2668
2670
2669
2671
```yaml
2670
2672
links:
@@ -2675,8 +2677,9 @@ links:
2675
2677
username: $response.body#/username
2676
2678
```
2677
2679
2678
-
Note that in the use of `operationRef` the _escaped forward-slash_ is necessary when
2679
-
using JSON Pointer, and it is necessary to URL-encode `{` and `}` as `%7B` and `%7D`, respectively, when using JSON Pointer as URI fragments.
2680
+
Note that in the use of `operationRef` the _escaped forward-slash_ (`~1`) is necessary when
2681
+
using JSON Pointer in URI fragments, and it is necessary to URL-encode `{` and `}` as `%7B` and `%7D`, respectively.
2682
+
The unescaped, percent-decoded path template in the above examples would be `/2.0/repositories/{username}`.
0 commit comments