Skip to content

Commit 2ad9ff9

Browse files
authored
Merge pull request #3747 from handrews/curly-braces-311
Correctly escape example operationRef URLs (3.1.1 port of #3731)
2 parents 88b199d + d2f194e commit 2ad9ff9

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
@@ -2180,7 +2180,7 @@ field in an [Operation Object](#operationObject)), references MAY also be made t
21802180
links:
21812181
UserRepositories:
21822182
# returns array of '#/components/schemas/repository'
2183-
operationRef: '#/paths/~12.0~1repositories~1{username}/get'
2183+
operationRef: '#/paths/~12.0~1repositories~1%7Busername%7D/get'
21842184
parameters:
21852185
username: $response.body#/username
21862186
```
@@ -2191,13 +2191,13 @@ or an absolute `operationRef`:
21912191
links:
21922192
UserRepositories:
21932193
# returns array of '#/components/schemas/repository'
2194-
operationRef: https://na2.gigantic-server.com/#/paths/~12.0~1repositories~1{username}/get
2194+
operationRef: https://na2.gigantic-server.com/#/paths/~12.0~1repositories~1%7Busername%7D/get
21952195
parameters:
21962196
username: $response.body#/username
21972197
```
21982198

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

22022202

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

0 commit comments

Comments
 (0)