-
Notifications
You must be signed in to change notification settings - Fork 9.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3390 from mikekistler/structured-fields
Add structured fields primitive types to format registry
- Loading branch information
Showing
6 changed files
with
246 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
--- | ||
owner: mikekistler | ||
issue: | ||
description: structured fields byte sequence as defined in [RFC8941] | ||
source: https://www.rfc-editor.org/rfc/rfc8941#name-byte-sequences | ||
source_label: RFC 8941 | ||
base_type: string | ||
layout: default | ||
--- | ||
|
||
# <a href="..">{{ page.collection }}</a> | ||
|
||
## {{ page.slug }} - {{ page.description }} | ||
|
||
Base type: `{{ page.base_type }}`. | ||
|
||
The `{{page.slug}}` format represents a structured fields byte sequence as defined in [RFC8941]. | ||
|
||
```abnf | ||
sf-binary = ":" *(base64) ":" | ||
base64 = ALPHA / DIGIT / "+" / "/" / "=" | ||
``` | ||
|
||
A Byte Sequence is delimited with colons and encoded using base64 ([RFC4648], Section 4). | ||
|
||
This format is appropriate for a header value that must conform to the {{page.slug}} structured field definition. | ||
|
||
{% if page.issue %} | ||
### GitHub Issue | ||
|
||
* [#{{ page.issue }}](https://github.com/OAI/OpenAPI-Specification/issues/{{ page.issue }}) | ||
{% endif %} | ||
|
||
{% if page.remarks %} | ||
### Remarks | ||
|
||
{{ page.remarks }} | ||
{% endif %} | ||
|
||
[RFC8941]: https://www.rfc-editor.org/rfc/rfc8941#name-byte-sequences | ||
[RFC4648]: https://www.rfc-editor.org/rfc/rfc4648#section-4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
--- | ||
owner: mikekistler | ||
issue: | ||
description: structured fields boolean as defined in [RFC8941] | ||
source: https://www.rfc-editor.org/rfc/rfc8941#name-booleans | ||
source_label: RFC 8941 | ||
base_type: string | ||
layout: default | ||
--- | ||
|
||
# <a href="..">{{ page.collection }}</a> | ||
|
||
## {{ page.slug }} - {{ page.description }} | ||
|
||
Base type: `{{ page.base_type }}`. | ||
|
||
The `{{page.slug}}` format represents a structured fields boolean as defined in [RFC8941]. | ||
|
||
```abnf | ||
sf-boolean = "?" boolean | ||
boolean = "0" / "1" | ||
``` | ||
|
||
A Boolean is indicated with a leading "?" character followed by a "1" for a true value or "0" for false. | ||
|
||
This format is appropriate for a header value that must conform to the {{page.slug}} structured field definition. | ||
|
||
{% if page.issue %} | ||
### GitHub Issue | ||
|
||
* [#{{ page.issue }}](https://github.com/OAI/OpenAPI-Specification/issues/{{ page.issue }}) | ||
{% endif %} | ||
|
||
{% if page.remarks %} | ||
### Remarks | ||
|
||
{{ page.remarks }} | ||
{% endif %} | ||
|
||
[RFC8941]: https://www.rfc-editor.org/rfc/rfc8941#name-booleans |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
--- | ||
owner: mikekistler | ||
issue: | ||
description: structured fields decimal as defined in [RFC8941] | ||
source: https://www.rfc-editor.org/rfc/rfc8941#name-decimals | ||
source_label: RFC 8941 | ||
base_type: number | ||
layout: default | ||
--- | ||
|
||
# <a href="..">{{ page.collection }}</a> | ||
|
||
## {{ page.slug }} - {{ page.description }} | ||
|
||
Base type: `{{ page.base_type }}`. | ||
|
||
The `{{page.slug}}` format represents a structured fields decimal as defined in [RFC8941]. | ||
|
||
```abnf | ||
sf-decimal = ["-"] 1*12DIGIT "." 1*3DIGIT | ||
``` | ||
|
||
Decimals are numbers with an integer and a fractional component. | ||
The integer component has at most 12 digits; the fractional component has at most three digits. | ||
|
||
This format is appropriate for a header value that must conform to the {{page.slug}} structured field definition. | ||
|
||
{% if page.issue %} | ||
### GitHub Issue | ||
|
||
* [#{{ page.issue }}](https://github.com/OAI/OpenAPI-Specification/issues/{{ page.issue }}) | ||
{% endif %} | ||
|
||
{% if page.remarks %} | ||
### Remarks | ||
|
||
{{ page.remarks }} | ||
{% endif %} | ||
|
||
[RFC8941]: https://www.rfc-editor.org/rfc/rfc8941#name-decimals |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
--- | ||
owner: mikekistler | ||
issue: | ||
description: structured fields integer as defined in [RFC8941] | ||
source: https://www.rfc-editor.org/rfc/rfc8941#name-integers | ||
source_label: RFC 8941 | ||
base_type: integer, number | ||
layout: default | ||
--- | ||
|
||
# <a href="..">{{ page.collection }}</a> | ||
|
||
## {{ page.slug }} - {{ page.description }} | ||
|
||
Base type: `{{ page.base_type }}`. | ||
|
||
The `{{page.slug}}` format represents a structured fields integer as defined in [RFC8941]. | ||
|
||
```abnf | ||
sf-integer = ["-"] 1*15DIGIT | ||
``` | ||
|
||
Integers have a range of -999,999,999,999,999 to 999,999,999,999,999 inclusive (i.e., up to fifteen digits, signed), | ||
for IEEE 754 compatibility [IEEE754]. | ||
|
||
This format is appropriate for a header value that must conform to the {{page.slug}} structured field definition. | ||
|
||
{% if page.issue %} | ||
### GitHub Issue | ||
|
||
* [#{{ page.issue }}](https://github.com/OAI/OpenAPI-Specification/issues/{{ page.issue }}) | ||
{% endif %} | ||
|
||
{% if page.remarks %} | ||
### Remarks | ||
|
||
{{ page.remarks }} | ||
{% endif %} | ||
|
||
[RFC8941]: https://www.rfc-editor.org/rfc/rfc8941#name-integers | ||
[IEEE754]: https://ieeexplore.ieee.org/document/8766229 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
--- | ||
owner: mikekistler | ||
issue: | ||
description: structured fields string as defined in [RFC8941] | ||
source: https://www.rfc-editor.org/rfc/rfc8941#name-strings | ||
source_label: RFC 8941 | ||
base_type: string | ||
layout: default | ||
--- | ||
|
||
# <a href="..">{{ page.collection }}</a> | ||
|
||
## {{ page.slug }} - {{ page.description }} | ||
|
||
Base type: `{{ page.base_type }}`. | ||
|
||
The `{{page.slug}}` format represents a structured fields string as defined in [RFC8941]. | ||
|
||
```abnf | ||
sf-string = DQUOTE *chr DQUOTE | ||
chr = unescaped / escaped | ||
unescaped = %x20-21 / %x23-5B / %x5D-7E | ||
escaped = "\" ( DQUOTE / "\" ) | ||
``` | ||
|
||
Strings are zero or more printable ASCII [RFC0020] characters (i.e., the range %x20 to %x7E). | ||
Note that this excludes tabs, newlines, carriage returns, etc. | ||
|
||
Strings are delimited with double quotes, using a backslash ("\") to escape double quotes and backslashes. | ||
|
||
This format is appropriate for a header value that must conform to the {{page.slug}} structured field definition. | ||
|
||
{% if page.issue %} | ||
### GitHub Issue | ||
|
||
* [#{{ page.issue }}](https://github.com/OAI/OpenAPI-Specification/issues/{{ page.issue }}) | ||
{% endif %} | ||
|
||
{% if page.remarks %} | ||
### Remarks | ||
|
||
{{ page.remarks }} | ||
{% endif %} | ||
|
||
[RFC8941]: https://www.rfc-editor.org/rfc/rfc8941#name-strings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
--- | ||
owner: mikekistler | ||
issue: | ||
description: structured fields token as defined in [RFC8941] | ||
source: https://www.rfc-editor.org/rfc/rfc8941#name-tokens | ||
source_label: RFC 8941 | ||
base_type: string | ||
layout: default | ||
--- | ||
|
||
# <a href="..">{{ page.collection }}</a> | ||
|
||
## {{ page.slug }} - {{ page.description }} | ||
|
||
Base type: `{{ page.base_type }}`. | ||
|
||
The `{{page.slug}}` format represents a structured fields token as defined in [RFC8941]. | ||
|
||
```abnf | ||
sf-token = ( ALPHA / "*" ) *( tchar / ":" / "/" ) | ||
``` | ||
|
||
Tokens are short textual words; their abstract model is identical to their expression in the HTTP field value serialization. | ||
|
||
This format is appropriate for a header value that must conform to the {{page.slug}} structured field definition. | ||
|
||
{% if page.issue %} | ||
### GitHub Issue | ||
|
||
* [#{{ page.issue }}](https://github.com/OAI/OpenAPI-Specification/issues/{{ page.issue }}) | ||
{% endif %} | ||
|
||
{% if page.remarks %} | ||
### Remarks | ||
|
||
{{ page.remarks }} | ||
{% endif %} | ||
|
||
[RFC8941]: https://www.rfc-editor.org/rfc/rfc8941#name-tokens |