Skip to content

Commit

Permalink
Merge pull request #4264 from baywet/feat/server-template-abnf-to-3-2…
Browse files Browse the repository at this point in the history
…-dev

adds server url template abnf
  • Loading branch information
miqui authored Jan 2, 2025
2 parents 53f96d7 + 6e4f8d6 commit 0d0c9da
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion src/oas.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ path-template = "/" *( path-segment "/" ) [ path-segment ]
path-segment = 1*( path-literal / template-expression )
path-literal = 1*pchar
template-expression = "{" template-expression-param-name "}"
template-expression-param-name = 1*( %x00-79 / %x7C / %x7E-10FFFF ) ; every UTF8 character except { and }
template-expression-param-name = 1*( %x00-7A / %x7C / %x7E-10FFFF ) ; every UTF8 character except { and }
pchar = unreserved / pct-encoded / sub-delims / ":" / "@"
unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
Expand Down Expand Up @@ -575,6 +575,31 @@ servers:
An object representing a Server Variable for server URL template substitution.
The server URL templating is defined by the following [ABNF](https://tools.ietf.org/html/rfc5234) syntax.
```abnf
server-url-template = 1*( literals / server-variable )
server-variable = "{" server-variable-name "}"
server-variable-name = 1*( %x00-7A / %x7C / %x7E-10FFFF ) ; every UTF8 character except { and }

literals = 1*( %x21 / %x23-24 / %x26-3B / %x3D / %x3F-5B
/ %x5D / %x5F / %x61-7A / %x7E / ucschar / iprivate
/ pct-encoded)
; any Unicode character except: CTL, SP,
; DQUOTE, "%" (aside from pct-encoded),
; "<", ">", "\", "^", "`", "{", "|", "}"
pct-encoded = "%" HEXDIG HEXDIG
ucschar = %xA0-D7FF / %xF900-FDCF / %xFDF0-FFEF
/ %x10000-1FFFD / %x20000-2FFFD / %x30000-3FFFD
/ %x40000-4FFFD / %x50000-5FFFD / %x60000-6FFFD
/ %x70000-7FFFD / %x80000-8FFFD / %x90000-9FFFD
/ %xA0000-AFFFD / %xB0000-BFFFD / %xC0000-CFFFD
/ %xD0000-DFFFD / %xE1000-EFFFD
iprivate = %xE000-F8FF / %xF0000-FFFFD / %x100000-10FFFD
```

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`.

##### Fixed Fields

| Field Name | Type | Description |
Expand Down

0 comments on commit 0d0c9da

Please sign in to comment.