Skip to content

Commit b0ecc00

Browse files
authored
Merge pull request #1756 from MikeRalphson/abnf-fix
Make ABNF for runtime expressions complete
2 parents f623831 + 24185d7 commit b0ecc00

File tree

1 file changed

+17
-9
lines changed

1 file changed

+17
-9
lines changed

versions/3.0.3.md

+17-9
Original file line numberDiff line numberDiff line change
@@ -2127,18 +2127,26 @@ This mechanism is used by [Link Objects](#linkObject) and [Callback Objects](#ca
21272127

21282128
The runtime expression is defined by the following [ABNF](https://tools.ietf.org/html/rfc5234) syntax
21292129

2130-
```
2131-
expression = ( "$url" | "$method" | "$statusCode" | "$request." source | "$response." source )
2132-
source = ( header-reference | query-reference | path-reference | body-reference )
2130+
```abnf
2131+
expression = ( "$url" / "$method" / "$statusCode" / "$request." source / "$response." source )
2132+
source = ( header-reference / query-reference / path-reference / body-reference )
21332133
header-reference = "header." token
21342134
query-reference = "query." name
21352135
path-reference = "path." name
2136-
body-reference = "body" ["#" fragment]
2137-
fragment = a JSON Pointer [RFC 6901](https://tools.ietf.org/html/rfc6901)
2138-
name = *( char )
2139-
char = as per RFC [7159](https://tools.ietf.org/html/rfc7159#section-7)
2140-
token = as per RFC [7230](https://tools.ietf.org/html/rfc7230#section-3.2.6)
2141-
```
2136+
body-reference = "body" ["#" json-pointer ]
2137+
json-pointer = *( "/" reference-token )
2138+
reference-token = *( unescaped / escaped )
2139+
unescaped = %x00-2E / %x30-7D / %x7F-10FFFF
2140+
; %x2F ('/') and %x7E ('~') are excluded from 'unescaped'
2141+
escaped = "~" ( "0" / "1" )
2142+
; representing '~' and '/', respectively
2143+
name = *( CHAR )
2144+
token = 1*tchar
2145+
tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*" / "+" / "-" / "." /
2146+
"^" / "_" / "`" / "|" / "~" / DIGIT / ALPHA
2147+
```
2148+
2149+
Here, `json-pointer` is taken from [RFC 6901](https://tools.ietf.org/html/rfc6901), `char` from [RFC 7159](https://tools.ietf.org/html/rfc7159#section-7) and `token` from [RFC 7230](https://tools.ietf.org/html/rfc7230#section-3.2.6).
21422150

21432151
The `name` identifier is case-sensitive, whereas `token` is not.
21442152

0 commit comments

Comments
 (0)