Skip to content

Commit 53f96d7

Browse files
authored
Merge pull request #4244 from baywet/feat/url-template-anbf-to-3-2-dev
2 parents d2c39a8 + 72d93b8 commit 53f96d7

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

src/oas.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,24 @@ Each template expression in the path MUST correspond to a path parameter that is
4444

4545
The value for these path parameters MUST NOT contain any unescaped "generic syntax" characters described by [RFC3986](https://tools.ietf.org/html/rfc3986#section-3): forward slashes (`/`), question marks (`?`), or hashes (`#`).
4646

47+
The path templating is defined by the following [ABNF](https://tools.ietf.org/html/rfc5234) syntax
48+
49+
```abnf
50+
path-template = "/" *( path-segment "/" ) [ path-segment ]
51+
path-segment = 1*( path-literal / template-expression )
52+
path-literal = 1*pchar
53+
template-expression = "{" template-expression-param-name "}"
54+
template-expression-param-name = 1*( %x00-79 / %x7C / %x7E-10FFFF ) ; every UTF8 character except { and }
55+
56+
pchar = unreserved / pct-encoded / sub-delims / ":" / "@"
57+
unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
58+
pct-encoded = "%" HEXDIG HEXDIG
59+
sub-delims = "!" / "$" / "&" / "'" / "(" / ")"
60+
/ "*" / "+" / "," / ";" / "="
61+
```
62+
63+
Here, `pchar`, `unreserved`, `pct-encoded` and `sub-delims` definitions are taken from [RFC 3986](https://tools.ietf.org/html/rfc3986). The `path-template` is directly derived from [RFC 3986, section 3.3](https://datatracker.ietf.org/doc/html/rfc3986#section-3.3).
64+
4765
### Media Types
4866

4967
Media type definitions are spread across several resources.

0 commit comments

Comments
 (0)