Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add structured fields primitive types to format registry #3390

Merged
merged 4 commits into from
Feb 29, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions registries/_format/sf-binary.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
owner: mikekistler
issue:
description: structured fields byte sequence as defined in [RFC 8941]
mikekistler marked this conversation as resolved.
Show resolved Hide resolved
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 [RFC 8941].

```abnf
sf-binary = ":" *(base64) ":"
base64 = ALPHA / DIGIT / "+" / "/" / "="
```

A Byte Sequence is delimited with colons and encoded using base64 ([RFC 4648], Section 4).

{% if page.issue %}
### GitHub Issue

* [#{{ page.issue }}](https://github.com/OAI/OpenAPI-Specification/issues/{{ page.issue }})
{% endif %}

{% if page.remarks %}
### Remarks

{{ page.remarks }}
{% endif %}

[RFC 8941]: https://www.rfc-editor.org/rfc/rfc8941#name-byte-sequences
[RFC 4648]: https://www.rfc-editor.org/rfc/rfc4648#section-4
36 changes: 36 additions & 0 deletions registries/_format/sf-boolean.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
owner: mikekistler
issue:
description: structured fields boolean as defined in [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 [RFC 8941].

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

{% if page.issue %}
### GitHub Issue

* [#{{ page.issue }}](https://github.com/OAI/OpenAPI-Specification/issues/{{ page.issue }})
{% endif %}

{% if page.remarks %}
### Remarks

{{ page.remarks }}
{% endif %}

[RFC 8941]: https://www.rfc-editor.org/rfc/rfc8941#name-booleans
36 changes: 36 additions & 0 deletions registries/_format/sf-decimal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
owner: mikekistler
issue:
description: structured fields decimal as defined in [RFC 8941]
base_type: integer
mikekistler marked this conversation as resolved.
Show resolved Hide resolved
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 [RFC 8941].

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

{% if page.issue %}
### GitHub Issue

* [#{{ page.issue }}](https://github.com/OAI/OpenAPI-Specification/issues/{{ page.issue }})
{% endif %}

{% if page.remarks %}
### Remarks

{{ page.remarks }}
{% endif %}

[RFC 8941]: https://www.rfc-editor.org/rfc/rfc8941#name-decimals
37 changes: 37 additions & 0 deletions registries/_format/sf-integer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
owner: mikekistler
issue:
description: structured fields integer as defined in [RFC 8941]
base_type: integer
mikekistler marked this conversation as resolved.
Show resolved Hide resolved
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 [RFC 8941].

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

{% if page.issue %}
### GitHub Issue

* [#{{ page.issue }}](https://github.com/OAI/OpenAPI-Specification/issues/{{ page.issue }})
{% endif %}

{% if page.remarks %}
### Remarks

{{ page.remarks }}
{% endif %}

[RFC 8941]: https://www.rfc-editor.org/rfc/rfc8941#name-integers
[IEEE754]: https://ieeexplore.ieee.org/document/8766229
41 changes: 41 additions & 0 deletions registries/_format/sf-string.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
owner: mikekistler
issue:
description: structured fields string as defined in [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 [RFC 8941].

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

{% if page.issue %}
### GitHub Issue

* [#{{ page.issue }}](https://github.com/OAI/OpenAPI-Specification/issues/{{ page.issue }})
{% endif %}

{% if page.remarks %}
### Remarks

{{ page.remarks }}
{% endif %}

[RFC 8941]: https://www.rfc-editor.org/rfc/rfc8941#name-strings
35 changes: 35 additions & 0 deletions registries/_format/sf-token.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
owner: mikekistler
issue:
description: structured fields token as defined in [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 [RFC 8941].

```abnf
sf-token = ( ALPHA / "*" ) *( tchar / ":" / "/" )
```

Tokens are short textual words; their abstract model is identical to their expression in the HTTP field value serialization.

{% if page.issue %}
### GitHub Issue

* [#{{ page.issue }}](https://github.com/OAI/OpenAPI-Specification/issues/{{ page.issue }})
{% endif %}

{% if page.remarks %}
### Remarks

{{ page.remarks }}
{% endif %}

[RFC 8941]: https://www.rfc-editor.org/rfc/rfc8941#name-tokens