Skip to content

Commit a89f36d

Browse files
committed
fix: expands the allowed set for server templates literal
Signed-off-by: Vincent Biret <vibiret@microsoft.com>
1 parent ee4b871 commit a89f36d

File tree

1 file changed

+16
-7
lines changed

1 file changed

+16
-7
lines changed

src/oas.md

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -560,19 +560,28 @@ An object representing a Server Variable for server URL template substitution.
560560
The server URL templating is defined by the following [ABNF](https://tools.ietf.org/html/rfc5234) syntax.
561561
562562
```abnf
563-
server-url-template = 1*( server-literal / template-expression )
564-
server-literal = 1*pchar
563+
server-url-template = 1*( literals / template-expression )
565564
template-expression = "{" template-expression-param-name "}"
566565
template-expression-param-name = 1*( %x00-79 / %x7C / %x7E-10FFFF ) ; every UTF8 character except { and }
566+
literals = 1*( %x21 / %x23-24 / %x26 / %x28-3B / %x3D / %x3F-5B
567+
/ %x5D / %x5F / %x61-7A / %x7E / ucschar / iprivate
568+
/ pct-encoded)
569+
; any Unicode character except: CTL, SP,
570+
; DQUOTE, "'", "%" (aside from pct-encoded),
571+
; "<", ">", "\", "^", "`", "{", "|", "}"
572+
567573

568-
pchar = unreserved / pct-encoded / sub-delims / ":" / "@"
569-
unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
570574
pct-encoded = "%" HEXDIG HEXDIG
571-
sub-delims = "!" / "$" / "&" / "'" / "(" / ")"
572-
/ "*" / "+" / "," / ";" / "="
575+
ucschar = %xA0-D7FF / %xF900-FDCF / %xFDF0-FFEF
576+
/ %x10000-1FFFD / %x20000-2FFFD / %x30000-3FFFD
577+
/ %x40000-4FFFD / %x50000-5FFFD / %x60000-6FFFD
578+
/ %x70000-7FFFD / %x80000-8FFFD / %x90000-9FFFD
579+
/ %xA0000-AFFFD / %xB0000-BFFFD / %xC0000-CFFFD
580+
/ %xD0000-DFFFD / %xE1000-EFFFD
581+
iprivate = %xE000-F8FF / %xF0000-FFFFD / %x100000-10FFFD
573582
```
574583

575-
Here, `pchar`, `unreserved`, `pct-encoded` and `sub-delims` definitions are taken from [RFC 3986](https://tools.ietf.org/html/rfc3986).
584+
Here, `pct-encoded`, `uschar` and `iprivate` definitions are taken from [RFC 6570](https://www.rfc-editor.org/rfc/rfc6570).
576585

577586
##### Fixed Fields
578587

0 commit comments

Comments
 (0)