Skip to content

Commit 8cb215c

Browse files
committed
Add structured fields primitive types to format registry
1 parent 44cf3d7 commit 8cb215c

File tree

6 files changed

+222
-0
lines changed

6 files changed

+222
-0
lines changed

registries/_format/sf-binary.md

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

registries/_format/sf-boolean.md

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

registries/_format/sf-decimal.md

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

registries/_format/sf-integer.md

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

registries/_format/sf-string.md

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

registries/_format/sf-token.md

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

0 commit comments

Comments
 (0)