Skip to content

Commit 11d0ae5

Browse files
authored
Merge pull request #3390 from mikekistler/structured-fields
Add structured fields primitive types to format registry
2 parents ae1528c + a5fe410 commit 11d0ae5

File tree

6 files changed

+246
-0
lines changed

6 files changed

+246
-0
lines changed

registries/_format/sf-binary.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
owner: mikekistler
3+
issue:
4+
description: structured fields byte sequence as defined in [RFC8941]
5+
source: https://www.rfc-editor.org/rfc/rfc8941#name-byte-sequences
6+
source_label: RFC 8941
7+
base_type: string
8+
layout: default
9+
---
10+
11+
# <a href="..">{{ page.collection }}</a>
12+
13+
## {{ page.slug }} - {{ page.description }}
14+
15+
Base type: `{{ page.base_type }}`.
16+
17+
The `{{page.slug}}` format represents a structured fields byte sequence as defined in [RFC8941].
18+
19+
```abnf
20+
sf-binary = ":" *(base64) ":"
21+
base64 = ALPHA / DIGIT / "+" / "/" / "="
22+
```
23+
24+
A Byte Sequence is delimited with colons and encoded using base64 ([RFC4648], Section 4).
25+
26+
This format is appropriate for a header value that must conform to the {{page.slug}} structured field definition.
27+
28+
{% if page.issue %}
29+
### GitHub Issue
30+
31+
* [#{{ page.issue }}](https://github.com/OAI/OpenAPI-Specification/issues/{{ page.issue }})
32+
{% endif %}
33+
34+
{% if page.remarks %}
35+
### Remarks
36+
37+
{{ page.remarks }}
38+
{% endif %}
39+
40+
[RFC8941]: https://www.rfc-editor.org/rfc/rfc8941#name-byte-sequences
41+
[RFC4648]: https://www.rfc-editor.org/rfc/rfc4648#section-4

registries/_format/sf-boolean.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
owner: mikekistler
3+
issue:
4+
description: structured fields boolean as defined in [RFC8941]
5+
source: https://www.rfc-editor.org/rfc/rfc8941#name-booleans
6+
source_label: RFC 8941
7+
base_type: string
8+
layout: default
9+
---
10+
11+
# <a href="..">{{ page.collection }}</a>
12+
13+
## {{ page.slug }} - {{ page.description }}
14+
15+
Base type: `{{ page.base_type }}`.
16+
17+
The `{{page.slug}}` format represents a structured fields boolean as defined in [RFC8941].
18+
19+
```abnf
20+
sf-boolean = "?" boolean
21+
boolean = "0" / "1"
22+
```
23+
24+
A Boolean is indicated with a leading "?" character followed by a "1" for a true value or "0" for false.
25+
26+
This format is appropriate for a header value that must conform to the {{page.slug}} structured field definition.
27+
28+
{% if page.issue %}
29+
### GitHub Issue
30+
31+
* [#{{ page.issue }}](https://github.com/OAI/OpenAPI-Specification/issues/{{ page.issue }})
32+
{% endif %}
33+
34+
{% if page.remarks %}
35+
### Remarks
36+
37+
{{ page.remarks }}
38+
{% endif %}
39+
40+
[RFC8941]: https://www.rfc-editor.org/rfc/rfc8941#name-booleans

registries/_format/sf-decimal.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
owner: mikekistler
3+
issue:
4+
description: structured fields decimal as defined in [RFC8941]
5+
source: https://www.rfc-editor.org/rfc/rfc8941#name-decimals
6+
source_label: RFC 8941
7+
base_type: number
8+
layout: default
9+
---
10+
11+
# <a href="..">{{ page.collection }}</a>
12+
13+
## {{ page.slug }} - {{ page.description }}
14+
15+
Base type: `{{ page.base_type }}`.
16+
17+
The `{{page.slug}}` format represents a structured fields decimal as defined in [RFC8941].
18+
19+
```abnf
20+
sf-decimal = ["-"] 1*12DIGIT "." 1*3DIGIT
21+
```
22+
23+
Decimals are numbers with an integer and a fractional component.
24+
The integer component has at most 12 digits; the fractional component has at most three digits.
25+
26+
This format is appropriate for a header value that must conform to the {{page.slug}} structured field definition.
27+
28+
{% if page.issue %}
29+
### GitHub Issue
30+
31+
* [#{{ page.issue }}](https://github.com/OAI/OpenAPI-Specification/issues/{{ page.issue }})
32+
{% endif %}
33+
34+
{% if page.remarks %}
35+
### Remarks
36+
37+
{{ page.remarks }}
38+
{% endif %}
39+
40+
[RFC8941]: https://www.rfc-editor.org/rfc/rfc8941#name-decimals

registries/_format/sf-integer.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
owner: mikekistler
3+
issue:
4+
description: structured fields integer as defined in [RFC8941]
5+
source: https://www.rfc-editor.org/rfc/rfc8941#name-integers
6+
source_label: RFC 8941
7+
base_type: integer, number
8+
layout: default
9+
---
10+
11+
# <a href="..">{{ page.collection }}</a>
12+
13+
## {{ page.slug }} - {{ page.description }}
14+
15+
Base type: `{{ page.base_type }}`.
16+
17+
The `{{page.slug}}` format represents a structured fields integer as defined in [RFC8941].
18+
19+
```abnf
20+
sf-integer = ["-"] 1*15DIGIT
21+
```
22+
23+
Integers have a range of -999,999,999,999,999 to 999,999,999,999,999 inclusive (i.e., up to fifteen digits, signed),
24+
for IEEE 754 compatibility [IEEE754].
25+
26+
This format is appropriate for a header value that must conform to the {{page.slug}} structured field definition.
27+
28+
{% if page.issue %}
29+
### GitHub Issue
30+
31+
* [#{{ page.issue }}](https://github.com/OAI/OpenAPI-Specification/issues/{{ page.issue }})
32+
{% endif %}
33+
34+
{% if page.remarks %}
35+
### Remarks
36+
37+
{{ page.remarks }}
38+
{% endif %}
39+
40+
[RFC8941]: https://www.rfc-editor.org/rfc/rfc8941#name-integers
41+
[IEEE754]: https://ieeexplore.ieee.org/document/8766229

registries/_format/sf-string.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
---
2+
owner: mikekistler
3+
issue:
4+
description: structured fields string as defined in [RFC8941]
5+
source: https://www.rfc-editor.org/rfc/rfc8941#name-strings
6+
source_label: RFC 8941
7+
base_type: string
8+
layout: default
9+
---
10+
11+
# <a href="..">{{ page.collection }}</a>
12+
13+
## {{ page.slug }} - {{ page.description }}
14+
15+
Base type: `{{ page.base_type }}`.
16+
17+
The `{{page.slug}}` format represents a structured fields string as defined in [RFC8941].
18+
19+
```abnf
20+
sf-string = DQUOTE *chr DQUOTE
21+
chr = unescaped / escaped
22+
unescaped = %x20-21 / %x23-5B / %x5D-7E
23+
escaped = "\" ( DQUOTE / "\" )
24+
```
25+
26+
Strings are zero or more printable ASCII [RFC0020] characters (i.e., the range %x20 to %x7E).
27+
Note that this excludes tabs, newlines, carriage returns, etc.
28+
29+
Strings are delimited with double quotes, using a backslash ("\") to escape double quotes and backslashes.
30+
31+
This format is appropriate for a header value that must conform to the {{page.slug}} structured field definition.
32+
33+
{% if page.issue %}
34+
### GitHub Issue
35+
36+
* [#{{ page.issue }}](https://github.com/OAI/OpenAPI-Specification/issues/{{ page.issue }})
37+
{% endif %}
38+
39+
{% if page.remarks %}
40+
### Remarks
41+
42+
{{ page.remarks }}
43+
{% endif %}
44+
45+
[RFC8941]: https://www.rfc-editor.org/rfc/rfc8941#name-strings

registries/_format/sf-token.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
owner: mikekistler
3+
issue:
4+
description: structured fields token as defined in [RFC8941]
5+
source: https://www.rfc-editor.org/rfc/rfc8941#name-tokens
6+
source_label: RFC 8941
7+
base_type: string
8+
layout: default
9+
---
10+
11+
# <a href="..">{{ page.collection }}</a>
12+
13+
## {{ page.slug }} - {{ page.description }}
14+
15+
Base type: `{{ page.base_type }}`.
16+
17+
The `{{page.slug}}` format represents a structured fields token as defined in [RFC8941].
18+
19+
```abnf
20+
sf-token = ( ALPHA / "*" ) *( tchar / ":" / "/" )
21+
```
22+
23+
Tokens are short textual words; their abstract model is identical to their expression in the HTTP field value serialization.
24+
25+
This format is appropriate for a header value that must conform to the {{page.slug}} structured field definition.
26+
27+
{% if page.issue %}
28+
### GitHub Issue
29+
30+
* [#{{ page.issue }}](https://github.com/OAI/OpenAPI-Specification/issues/{{ page.issue }})
31+
{% endif %}
32+
33+
{% if page.remarks %}
34+
### Remarks
35+
36+
{{ page.remarks }}
37+
{% endif %}
38+
39+
[RFC8941]: https://www.rfc-editor.org/rfc/rfc8941#name-tokens

0 commit comments

Comments
 (0)