Skip to content

Commit 53dbc0e

Browse files
provide an example of a prohibited use of "/" in the template
1 parent 9307120 commit 53dbc0e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/oas.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -519,6 +519,9 @@ Path templating refers to the usage of template expressions, delimited by curly
519519
Each template expression in the path MUST correspond to a path parameter that is included in the [Path Item](#path-item-object) itself and/or in each of the Path Item's [Operations](#operation-object). An exception is if the path item is empty, for example due to ACL constraints, matching path parameters are not required.
520520

521521
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 (`#`).
522+
This means that when matching templates to request URLs, no values that include a forward slash are matched.
523+
For example, the template `/foo/{bar}` cannot match the URI path "/foo/alpha/beta" because the value of the template variable "bar" would have to be "alpha/beta".
524+
522525
See [URL Percent-Encoding](#url-percent-encoding) for additional guidance on escaping characters.
523526

524527
The path templating is defined by the following [ABNF](https://tools.ietf.org/html/rfc5234) syntax

0 commit comments

Comments
 (0)