Skip to content

Commit 8fa2710

Browse files
authored
Merge pull request #3748 from handrews/curly-braces-320
Correctly escape example operationRef URLs (3.2.0 port of #3731)
2 parents 6124cda + 6e9580b commit 8fa2710

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

versions/3.2.0.md

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

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

21472147

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

0 commit comments

Comments
 (0)