Skip to content

Commit

Permalink
adds missing formats in the registry (#3167)
Browse files Browse the repository at this point in the history
* - typo fix

* - adds UUID format

* - adds URI format

* - moves source links to YAML header so it can be in the table as well

* - adds URI template, IRI, IRI reference and URI reference

* - adds time and duration formats

* - adds email and idn email formats

* - adds ipv4, v6, hostname and idn hostname formats

* - adds json and relative json pointers

* - adds regex

* - adds base64 url format

* - adds decimal format

* - adds char format

* - typo fix

* - switches base type for decimal to number

* - removes link to master issue

Signed-off-by: Vincent Biret <vibiret@microsoft.com>

* - adds recommendation for binary format in 3.1

Signed-off-by: Vincent Biret <vibiret@microsoft.com>

* Update registries/_format/date.md

Co-authored-by: Ralf Handl <ralf.handl@sap.com>

* - fixes link to duration spec

Co-authored-by: Ralf Handl <ralf.handl@sap.com>

* - fixes email RFC number

Co-authored-by: Ralf Handl <ralf.handl@sap.com>

* - adds email rfc link

Co-authored-by: Ralf Handl <ralf.handl@sap.com>

* - adds IDN hostname RFC link

Co-authored-by: Ralf Handl <ralf.handl@sap.com>

* - adds idn email RFC link

Co-authored-by: Ralf Handl <ralf.handl@sap.com>

* - adds base type, version and remarks to format table

Signed-off-by: Vincent Biret <vibiret@microsoft.com>

* - adds version and remarks for binary format

Signed-off-by: Vincent Biret <vibiret@microsoft.com>

* - adds support for floating points in decimal

* Apply suggestions from code review

Co-authored-by: Ralf Handl <ralf.handl@sap.com>

* - adds int16 to the format list

Signed-off-by: Vincent Biret <vibiret@microsoft.com>

* - adds link to the base64 url RFC

Co-authored-by: Ralf Handl <ralf.handl@sap.com>

* - adds remark for base64url format

* - adds link to the base64 url RFC

* - fixes link to source

Signed-off-by: Vincent Biret <vibiret@microsoft.com>

* - adds details about base64, base64url and byte formats

Signed-off-by: Vincent Biret <vibiret@microsoft.com>

* - typo fix

Signed-off-by: Vincent Biret <vibiret@microsoft.com>

* - adds links to base64 RFC

Signed-off-by: Vincent Biret <vibiret@microsoft.com>

* - first batch of review suggestions

Co-authored-by: Ralf Handl <ralf.handl@sap.com>

* - second batch of PR feedback

Co-authored-by: Darrel <darrmi@microsoft.com>

* - third batch of PR review suggestions

Signed-off-by: Vincent Biret <vibiret@microsoft.com>

* - moves and renames version column for formats

Signed-off-by: Vincent Biret <vibiret@microsoft.com>

* - adds password format

Signed-off-by: Vincent Biret <vibiret@microsoft.com>

* - adds a source label for formats

Signed-off-by: Vincent Biret <vibiret@microsoft.com>

* - removes examples from registry entries

Signed-off-by: Vincent Biret <vibiret@microsoft.com>

* - removes remarks column in formats

Signed-off-by: Vincent Biret <vibiret@microsoft.com>

* - renames oas version to deprecated version

Signed-off-by: Vincent Biret <vibiret@microsoft.com>

* Update registry/format.md

Co-authored-by: Darrel <darrmi@microsoft.com>

* - changes the deprecation to a true/false in the table

Signed-off-by: Vincent Biret <vibiret@microsoft.com>

* - removes the deprecation notice from detail pages

Signed-off-by: Vincent Biret <vibiret@microsoft.com>

* - renames deprecated version to note as PR feedback

Signed-off-by: Vincent Biret <vibiret@microsoft.com>

* - moves base64url, int16 and char to separate PRs

* Apply suggestions from code review

Co-authored-by: Darrel <darrmi@microsoft.com>

* - moves decimal to a separate PR

* - adds OAS source for relevant formats

Signed-off-by: Vincent Biret <vibiret@microsoft.com>

* Update registries/_format/idn-email.md

Co-authored-by: Mike Ralphson <mike.ralphson@gmail.com>

---------

Signed-off-by: Vincent Biret <vibiret@microsoft.com>
Co-authored-by: Ralf Handl <ralf.handl@sap.com>
Co-authored-by: Darrel <darrmi@microsoft.com>
Co-authored-by: Mike Ralphson <mike.ralphson@gmail.com>
  • Loading branch information
4 people authored Mar 6, 2023
1 parent 6c3caaa commit 7592eb8
Show file tree
Hide file tree
Showing 31 changed files with 633 additions and 14 deletions.
12 changes: 11 additions & 1 deletion registries/_format/binary.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ issue:
description: any sequence of octets
base_type: string
layout: default
deprecated_note: '3.1'
remarks: "In OpenAPI 3.1, instead set the media type appropriately and do not use a schema property. Note that only complete HTTP message bodies or complete parts in a multipart media type can accommodate binary data. JSON strings and URL path components cannot."
source: https://spec.openapis.org/oas/v3.0.3.html#data-types
source_label: OAS
---

# <a href="..">{{ page.collection }}</a>
Expand All @@ -12,10 +16,16 @@ layout: default

Base type: `{{ page.base_type }}`.

The `{{page.slug}}` format represents any sequece of octets. This format entry is to ensure future versions of OpenAPI maintain compatibility with [OpenAPI 3.0.x](https://spec.openapis.org/oas/v3.0.0).
The `{{page.slug}}` format represents any sequence of octets. This format entry is to ensure future versions of OpenAPI maintain compatibility with [OpenAPI 3.0.x](https://spec.openapis.org/oas/v3.0.0).

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

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

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

{{ page.remarks }}
{% endif %}
14 changes: 12 additions & 2 deletions registries/_format/byte.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
---
owner: DarrelMiller
issue:
description: base64 encoded characters
description: base64 encoded data as defined in [RFC4648](https://www.rfc-editor.org/rfc/rfc4648#section-4)
base_type: string
layout: default
deprecated_note: '3.1'
remarks: "In OpenAPI 3.1, instead use [`contentEncoding: base64`](https://json-schema.org/draft/2020-12/json-schema-validation.html#name-contentencoding), optionally alongside [contentMediaType](https://json-schema.org/draft/2020-12/json-schema-validation.html#name-contentmediatype)."
source: https://spec.openapis.org/oas/v3.0.3.html#data-types
source_label: OAS
---

# <a href="..">{{ page.collection }}</a>
Expand All @@ -12,10 +16,16 @@ layout: default

Base type: `{{ page.base_type }}`.

The `{{page.slug}}` format represents any sequece of octets encoded as a base64 string. This format entry is to ensure future versions of OpenAPI maintain compatibility with [OpenAPI 3.0.x](https://spec.openapis.org/oas/v3.0.0).
The `{{page.slug}}` format represents any sequence of octets encoded as a base64 string as defined in [RFC4648](https://www.rfc-editor.org/rfc/rfc4648#section-4). This format entry is to ensure future versions of OpenAPI maintain compatibility with [OpenAPI 3.0.x](https://spec.openapis.org/oas/v3.0.0).

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

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

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

{{ page.remarks }}
{% endif %}
8 changes: 8 additions & 0 deletions registries/_format/commonmark.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ description: commonmark-formatted text
base_type: string
issue:
layout: default
source: https://spec.openapis.org/oas/latest.html#data-types
source_label: OAS
---

# <a href="..">{{ page.collection }}</a>
Expand All @@ -19,3 +21,9 @@ The `{{page.slug}}` format represents [CommonMark](https://commonmark.org/) form

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

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

{{ page.remarks }}
{% endif %}
12 changes: 10 additions & 2 deletions registries/_format/date-time.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
---
owner: DarrelMiller
issue:
description: date and time as defined by date-time - RFC3339
description: date and time as defined by date-time - [RFC3339](https://www.rfc-editor.org/rfc/rfc3339#section-5.6)
base_type: string
layout: default
source_label: JSON Schema
source: https://json-schema.org/draft/2020-12/json-schema-validation.html#name-dates-times-and-duration
---

# <a href="..">{{ page.collection }}</a>
Expand All @@ -12,10 +14,16 @@ layout: default

Base type: `{{ page.base_type }}`.

The `{{page.slug}}` format represents a date and time as defined by date-time - [RFC3339](https://xml2rfc.tools.ietf.org/public/rfc/html/rfc3339#anchor14one). This format entry is to ensure future versions of OpenAPI maintain compatibility with [OpenAPI 3.0.x](https://spec.openapis.org/oas/v3.0.0).
The `{{page.slug}}` format represents a date and time as defined by date-time - [RFC3339](https://www.rfc-editor.org/rfc/rfc3339#section-5.6). This format entry is to ensure future versions of OpenAPI maintain compatibility with [OpenAPI 3.0.x](https://spec.openapis.org/oas/v3.0.0).

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

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

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

{{ page.remarks }}
{% endif %}
12 changes: 10 additions & 2 deletions registries/_format/date.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
---
owner: DarrelMiller
issue:
description: date as defined by full-date - RFC3339
description: date as defined by full-date - [RFC3339](https://www.rfc-editor.org/rfc/rfc3339#section-5.6)
base_type: string
layout: default
source_label: JSON Schema
source: https://json-schema.org/draft/2020-12/json-schema-validation.html#name-dates-times-and-duration
---

# <a href="..">{{ page.collection }}</a>
Expand All @@ -12,10 +14,16 @@ layout: default

Base type: `{{ page.base_type }}`.

The `{{page.slug}}` format represents a date as defined by full-date - [RFC3339](https://xml2rfc.tools.ietf.org/public/rfc/html/rfc3339#anchor14one). This format entry is to ensure future versions of OpenAPI maintain compatibility with [OpenAPI 3.0.x](https://spec.openapis.org/oas/v3.0.0).
The `{{page.slug}}` format represents a date as defined by full-date - [RFC3339](https://www.rfc-editor.org/rfc/rfc3339#section-5.6). This format entry is to ensure future versions of OpenAPI maintain compatibility with [OpenAPI 3.0.x](https://spec.openapis.org/oas/v3.0.0).

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

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

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

{{ page.remarks }}
{% endif %}
8 changes: 8 additions & 0 deletions registries/_format/double.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ issue:
description: double precision floating point number
base_type: number
layout: default
source: https://spec.openapis.org/oas/latest.html#data-types
source_label: OAS
---

# <a href="..">{{ page.collection }}</a>
Expand All @@ -19,3 +21,9 @@ The `{{page.slug}}` format represents a double precision (64bit) floating point

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

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

{{ page.remarks }}
{% endif %}
29 changes: 29 additions & 0 deletions registries/_format/duration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
owner: baywet
issue:
description: duration as defined by duration - RFC3339
base_type: string
layout: default
source_label: JSON Schema
source: https://json-schema.org/draft/2020-12/json-schema-validation.html#name-dates-times-and-duration
---

# <a href="..">{{ page.collection }}</a>

## {{ page.slug }} - {{ page.description }}

Base type: `{{ page.base_type }}`.

The `{{page.slug}}` format represents a duration as defined by duration - [RFC3339](https://www.rfc-editor.org/rfc/rfc3339.html#appendix-A).

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

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

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

{{ page.remarks }}
{% endif %}
29 changes: 29 additions & 0 deletions registries/_format/email.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
owner: baywet
issue:
description: An email address as defined as Mailbox in RFC5321
base_type: string
layout: default
source_label: JSON Schema
source: https://json-schema.org/draft/2020-12/json-schema-validation.html#name-email-addresses
---

# <a href="..">{{ page.collection }}</a>

## {{ page.slug }} - {{ page.description }}

Base type: `{{ page.base_type }}`.

The `{{page.slug}}` format is an email address as defined as Mailbox in [RFC5321](https://www.rfc-editor.org/rfc/rfc5321).

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

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

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

{{ page.remarks }}
{% endif %}
8 changes: 8 additions & 0 deletions registries/_format/float.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ issue:
description: single precision floating point number
base_type: number
layout: default
source: https://spec.openapis.org/oas/latest.html#data-types
source_label: OAS
---

# <a href="..">{{ page.collection }}</a>
Expand All @@ -19,3 +21,9 @@ The `{{page.slug}}` format represents a single precision (32bit) floating point

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

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

{{ page.remarks }}
{% endif %}
29 changes: 29 additions & 0 deletions registries/_format/hostname.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
owner: baywet
issue:
description: A host name as defined by RFC1123
base_type: string
layout: default
source_label: JSON Schema
source: https://json-schema.org/draft/2020-12/json-schema-validation.html#name-hostnames
---

# <a href="..">{{ page.collection }}</a>

## {{ page.slug }} - {{ page.description }}

Base type: `{{ page.base_type }}`.

The `{{page.slug}}` format is a host name as defined by [RFC1123](https://www.rfc-editor.org/info/rfc1123).

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

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

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

{{ page.remarks }}
{% endif %}
8 changes: 8 additions & 0 deletions registries/_format/html.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ description: HTML-formatted text
base_type: string
issue:
layout: default
source: https://spec.openapis.org/oas/latest.html#data-types
source_label: OAS
---

# <a href="..">{{ page.collection }}</a>
Expand All @@ -19,3 +21,9 @@ The `{{page.slug}}` format represents HTML-formatted text.

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

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

{{ page.remarks }}
{% endif %}
29 changes: 29 additions & 0 deletions registries/_format/idn-email.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
owner: baywet
issue:
description: An email address as defined as Mailbox in RFC6531
base_type: string
layout: default
source_label: JSON Schema
source: https://json-schema.org/draft/2020-12/json-schema-validation.html#name-email-addresses
---

# <a href="..">{{ page.collection }}</a>

## {{ page.slug }} - {{ page.description }}

Base type: `{{ page.base_type }}`.

The `{{page.slug}}` format is an email address as defined as Mailbox in [RFC6531](https://www.rfc-editor.org/rfc/rfc6531).

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

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

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

{{ page.remarks }}
{% endif %}
29 changes: 29 additions & 0 deletions registries/_format/idn-hostname.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
owner: baywet
issue:
description: An internationalized host name as defined by RFC5890
base_type: string
layout: default
source_label: JSON Schema
source: https://json-schema.org/draft/2020-12/json-schema-validation.html#name-hostnames
---

# <a href="..">{{ page.collection }}</a>

## {{ page.slug }} - {{ page.description }}

Base type: `{{ page.base_type }}`.

The `{{page.slug}}` format is an internationalized host name as defined by [RFC5890](https://www.rfc-editor.org/rfc/rfc5890.html).

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

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

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

{{ page.remarks }}
{% endif %}
8 changes: 8 additions & 0 deletions registries/_format/int32.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ issue:
description: signed 32-bit integer
base_type: number
layout: default
source: https://spec.openapis.org/oas/latest.html#data-types
source_label: OAS
---

# <a href="..">{{ page.collection }}</a>
Expand All @@ -19,3 +21,9 @@ The `{{page.slug}}` format represents a signed 32-bit integer, with the range

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

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

{{ page.remarks }}
{% endif %}
8 changes: 8 additions & 0 deletions registries/_format/int64.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ issue:
description: signed 64-bit integer
base_type: number
layout: default
source: https://spec.openapis.org/oas/latest.html#data-types
source_label: OAS
---

# <a href="..">{{ page.collection }}</a>
Expand All @@ -19,3 +21,9 @@ The `{{page.slug}}` format represents a signed 64-bit integer, with the range -9

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

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

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

0 comments on commit 7592eb8

Please sign in to comment.