Skip to content

Commit 0d0c9da

Browse files
authored
Merge pull request #4264 from baywet/feat/server-template-abnf-to-3-2-dev
adds server url template abnf
2 parents 53f96d7 + 6e4f8d6 commit 0d0c9da

File tree

1 file changed

+26
-1
lines changed

1 file changed

+26
-1
lines changed

src/oas.md

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ path-template = "/" *( path-segment "/" ) [ path-segment ]
5151
path-segment = 1*( path-literal / template-expression )
5252
path-literal = 1*pchar
5353
template-expression = "{" template-expression-param-name "}"
54-
template-expression-param-name = 1*( %x00-79 / %x7C / %x7E-10FFFF ) ; every UTF8 character except { and }
54+
template-expression-param-name = 1*( %x00-7A / %x7C / %x7E-10FFFF ) ; every UTF8 character except { and }
5555
5656
pchar = unreserved / pct-encoded / sub-delims / ":" / "@"
5757
unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
@@ -575,6 +575,31 @@ servers:
575575
576576
An object representing a Server Variable for server URL template substitution.
577577
578+
The server URL templating is defined by the following [ABNF](https://tools.ietf.org/html/rfc5234) syntax.
579+
580+
```abnf
581+
server-url-template = 1*( literals / server-variable )
582+
server-variable = "{" server-variable-name "}"
583+
server-variable-name = 1*( %x00-7A / %x7C / %x7E-10FFFF ) ; every UTF8 character except { and }
584+
585+
literals = 1*( %x21 / %x23-24 / %x26-3B / %x3D / %x3F-5B
586+
/ %x5D / %x5F / %x61-7A / %x7E / ucschar / iprivate
587+
/ pct-encoded)
588+
; any Unicode character except: CTL, SP,
589+
; DQUOTE, "%" (aside from pct-encoded),
590+
; "<", ">", "\", "^", "`", "{", "|", "}"
591+
pct-encoded = "%" HEXDIG HEXDIG
592+
ucschar = %xA0-D7FF / %xF900-FDCF / %xFDF0-FFEF
593+
/ %x10000-1FFFD / %x20000-2FFFD / %x30000-3FFFD
594+
/ %x40000-4FFFD / %x50000-5FFFD / %x60000-6FFFD
595+
/ %x70000-7FFFD / %x80000-8FFFD / %x90000-9FFFD
596+
/ %xA0000-AFFFD / %xB0000-BFFFD / %xC0000-CFFFD
597+
/ %xD0000-DFFFD / %xE1000-EFFFD
598+
iprivate = %xE000-F8FF / %xF0000-FFFFD / %x100000-10FFFD
599+
```
600+
601+
Here, `literals`, `pct-encoded`, `ucschar` and `iprivate` definitions are taken from [RFC 6570](https://www.rfc-editor.org/rfc/rfc6570), incorporating the corrections specified in [Errata 6937](https://www.rfc-editor.org/errata/eid6937) for `literals`.
602+
578603
##### Fixed Fields
579604

580605
| Field Name | Type | Description |

0 commit comments

Comments
 (0)