Skip to content

Commit d2f194e

Browse files
committed
Correctly escape example operationRef URLs (3.1.1)
1 parent ddbd53f commit d2f194e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

versions/3.1.1.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -2136,7 +2136,7 @@ field in an [Operation Object](#operationObject)), references MAY also be made t
21362136
links:
21372137
UserRepositories:
21382138
# returns array of '#/components/schemas/repository'
2139-
operationRef: '#/paths/~12.0~1repositories~1{username}/get'
2139+
operationRef: '#/paths/~12.0~1repositories~1%7Busername%7D/get'
21402140
parameters:
21412141
username: $response.body#/username
21422142
```
@@ -2147,13 +2147,13 @@ or an absolute `operationRef`:
21472147
links:
21482148
UserRepositories:
21492149
# returns array of '#/components/schemas/repository'
2150-
operationRef: https://na2.gigantic-server.com/#/paths/~12.0~1repositories~1{username}/get
2150+
operationRef: https://na2.gigantic-server.com/#/paths/~12.0~1repositories~1%7Busername%7D/get
21512151
parameters:
21522152
username: $response.body#/username
21532153
```
21542154

21552155
Note that in the use of `operationRef`, the _escaped forward-slash_ is necessary when
2156-
using JSON references.
2156+
using JSON Pointer, and it is necessary to URL-encode `{` and `}` as `%7B` and `%7D`, respectively when using JSON Pointer as URI fragments.
21572157

21582158

21592159
##### <a name="runtimeExpression"></a>Runtime Expressions

0 commit comments

Comments
 (0)