diff --git a/_includes/format-entry.md b/_includes/format-entry.md new file mode 100644 index 0000000000..7706e8cfc5 --- /dev/null +++ b/_includes/format-entry.md @@ -0,0 +1,19 @@ +# {{ page.collection }} + +## {{ page.slug }} - {{ page.description }} + +Base type: `{{ page.base_type }}`. + +{{ include.summary }} + +{% if page.issue %} +### GitHub Issue + +* [#{{ page.issue }}](https://github.com/OAI/OpenAPI-Specification/issues/{{ page.issue }}) +{% endif %} + +{% if page.remarks %} +### Remarks + +{{ page.remarks }} +{% endif %} diff --git a/registries/_format/base64url.md b/registries/_format/base64url.md index 0756f637b0..eac3e8ec22 100644 --- a/registries/_format/base64url.md +++ b/registries/_format/base64url.md @@ -8,22 +8,8 @@ deprecated_note: '3.1' remarks: "When using OpenAPI 3.1 it's recommended not to use this format and instead use [`contentEncoding` with a value of `base64url`](https://json-schema.org/draft/2020-12/json-schema-validation.html#name-contentencoding)." --- -# {{ page.collection }} - -## {{ page.slug }} - {{ page.description }} - -Base type: `{{ page.base_type }}`. - +{% capture summary %} The `{{page.slug}}` format is binary data encoded as a url-safe string as defined in [RFC4648](https://www.rfc-editor.org/rfc/rfc4648#section-5). +{% endcapture %} -{% if page.issue %} -### GitHub Issue - -* [#{{ page.issue }}](https://github.com/OAI/OpenAPI-Specification/issues/{{ page.issue }}) -{% endif %} - -{% if page.remarks %} -### Remarks - -{{ page.remarks }} -{% endif %} \ No newline at end of file +{% include format-entry.md summary=summary %} diff --git a/registries/_format/binary.md b/registries/_format/binary.md index 6d63a63f3f..6b77446759 100644 --- a/registries/_format/binary.md +++ b/registries/_format/binary.md @@ -10,22 +10,8 @@ source: https://spec.openapis.org/oas/v3.0.3.html#data-types source_label: OAS --- -# {{ page.collection }} - -## {{ page.slug }} - {{ page.description }} - -Base type: `{{ page.base_type }}`. - +{% capture summary %} 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). +{% endcapture %} -{% if page.issue %} -### GitHub Issue - -* [#{{ page.issue }}](https://github.com/OAI/OpenAPI-Specification/issues/{{ page.issue }}) -{% endif %} - -{% if page.remarks %} -### Remarks - -{{ page.remarks }} -{% endif %} +{% include format-entry.md summary=summary %} diff --git a/registries/_format/byte.md b/registries/_format/byte.md index 1ddf3408e1..920c65ce2c 100644 --- a/registries/_format/byte.md +++ b/registries/_format/byte.md @@ -10,22 +10,8 @@ source: https://spec.openapis.org/oas/v3.0.3.html#data-types source_label: OAS --- -# {{ page.collection }} - -## {{ page.slug }} - {{ page.description }} - -Base type: `{{ page.base_type }}`. - +{% capture summary %} 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). +{% endcapture %} -{% if page.issue %} -### GitHub Issue - -* [#{{ page.issue }}](https://github.com/OAI/OpenAPI-Specification/issues/{{ page.issue }}) -{% endif %} - -{% if page.remarks %} -### Remarks - -{{ page.remarks }} -{% endif %} +{% include format-entry.md summary=summary %} diff --git a/registries/_format/char.md b/registries/_format/char.md index 4ac98e911d..a475303718 100644 --- a/registries/_format/char.md +++ b/registries/_format/char.md @@ -6,22 +6,8 @@ base_type: string layout: default --- -# {{ page.collection }} - -## {{ page.slug }} - {{ page.description }} - -Base type: `{{ page.base_type }}`. - +{% capture summary %} The `{{page.slug}}` format is a single character. +{% endcapture %} -{% if page.issue %} -### GitHub Issue - -* [#{{ page.issue }}](https://github.com/OAI/OpenAPI-Specification/issues/{{ page.issue }}) -{% endif %} - -{% if page.remarks %} -### Remarks - -{{ page.remarks }} -{% endif %} \ No newline at end of file +{% include format-entry.md summary=summary %} diff --git a/registries/_format/commonmark.md b/registries/_format/commonmark.md index 5cccd7c593..1e0adc0f26 100644 --- a/registries/_format/commonmark.md +++ b/registries/_format/commonmark.md @@ -8,22 +8,8 @@ source: https://spec.openapis.org/oas/latest.html#data-types source_label: OAS --- -# {{ page.collection }} - -## {{ page.slug }} - {{ page.description }} - -Base type: `{{ page.base_type }}`. - +{% capture summary %} The `{{page.slug}}` format represents [CommonMark](https://commonmark.org/) formatted text. +{% endcapture %} -{% if page.issue %} -### GitHub Issue - -* [#{{ page.issue }}](https://github.com/OAI/OpenAPI-Specification/issues/{{ page.issue }}) -{% endif %} - -{% if page.remarks %} -### Remarks - -{{ page.remarks }} -{% endif %} \ No newline at end of file +{% include format-entry.md summary=summary %} diff --git a/registries/_format/date-time.md b/registries/_format/date-time.md index a998aa8007..8c4aeb43ce 100644 --- a/registries/_format/date-time.md +++ b/registries/_format/date-time.md @@ -8,22 +8,8 @@ source_label: JSON Schema source: https://json-schema.org/draft/2020-12/json-schema-validation.html#name-dates-times-and-duration --- -# {{ page.collection }} - -## {{ page.slug }} - {{ page.description }} - -Base type: `{{ page.base_type }}`. - +{% capture summary %} 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). +{% endcapture %} -{% if page.issue %} -### GitHub Issue - -* [#{{ page.issue }}](https://github.com/OAI/OpenAPI-Specification/issues/{{ page.issue }}) -{% endif %} - -{% if page.remarks %} -### Remarks - -{{ page.remarks }} -{% endif %} +{% include format-entry.md summary=summary %} diff --git a/registries/_format/date.md b/registries/_format/date.md index 6aca9e58c0..7d9fc70533 100644 --- a/registries/_format/date.md +++ b/registries/_format/date.md @@ -8,22 +8,8 @@ source_label: JSON Schema source: https://json-schema.org/draft/2020-12/json-schema-validation.html#name-dates-times-and-duration --- -# {{ page.collection }} - -## {{ page.slug }} - {{ page.description }} - -Base type: `{{ page.base_type }}`. - +{% capture summary %} 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). +{% endcapture %} -{% if page.issue %} -### GitHub Issue - -* [#{{ page.issue }}](https://github.com/OAI/OpenAPI-Specification/issues/{{ page.issue }}) -{% endif %} - -{% if page.remarks %} -### Remarks - -{{ page.remarks }} -{% endif %} +{% include format-entry.md summary=summary %} diff --git a/registries/_format/decimal.md b/registries/_format/decimal.md index 9637eacdd2..6dbcb1b723 100644 --- a/registries/_format/decimal.md +++ b/registries/_format/decimal.md @@ -7,22 +7,8 @@ layout: default remarks: This format is used in a variety of conflicting ways and is not interoperable. --- -# {{ page.collection }} - -## {{ page.slug }} - {{ page.description }} - -Base type: `{{ page.base_type }}`. - +{% capture summary %} The `{{page.slug}}` format represents a fixed point decimal number of unspecified precision and range. +{% endcapture %} -{% if page.issue %} -### GitHub Issue - -* [#{{ page.issue }}](https://github.com/OAI/OpenAPI-Specification/issues/{{ page.issue }}) -{% endif %} - -{% if page.remarks %} -### Remarks - -{{ page.issue }} -{% endif %} +{% include format-entry.md summary=summary %} diff --git a/registries/_format/decimal128.md b/registries/_format/decimal128.md index 218f81209a..da2d806535 100644 --- a/registries/_format/decimal128.md +++ b/registries/_format/decimal128.md @@ -6,26 +6,12 @@ base_type: [string, number] layout: default --- -# {{ page.collection }} - -## {{ page.slug }} - {{ page.description }} - -Base type: `{{ page.base_type }}`. - +{% capture summary %} The `{{page.slug}}` format represents a [128-bit decimal floating-point number](https://en.wikipedia.org/wiki/Decimal128_floating-point_format) as defined by IEEE 754 2008 and ISO/IEC/IEEE 60559:2011. Representation as a JSON string is preferred as this avoids problems with recipients that parse JSON numbers into [binary64](https://en.wikipedia.org/wiki/Double-precision_floating-point_format) memory representation. String representation allows expressing the special values `NaN`, `-INF`, and `INF` that cannot be expressed as JSON numbers. +{% endcapture %} -{% if page.issue %} -### GitHub Issue - -* [#{{ page.issue }}](https://github.com/OAI/OpenAPI-Specification/issues/{{ page.issue }}) -{% endif %} - -{% if page.remarks %} -### Remarks - -{{ page.issue }} -{% endif %} +{% include format-entry.md summary=summary %} diff --git a/registries/_format/double-int.md b/registries/_format/double-int.md index c930f888f8..87a821f708 100644 --- a/registries/_format/double-int.md +++ b/registries/_format/double-int.md @@ -6,24 +6,10 @@ base_type: integer layout: default --- -# {{ page.collection }} - -## {{ page.slug }} - {{ page.description }} - -Base type: `{{ page.base_type }}`. - +{% capture summary %} The `{{page.slug}}` format represents an integer that can be stored in an IEEE 754 double-precision number without loss of precision. The range of values is -(253)+1 to (253)-1. This format is useful for systems that need to support languages (such as JavaScript) that store all numeric values as IEEE 754 double-precision numbers. +{% endcapture %} -{% if page.issue %} -### GitHub Issue - -* [#{{ page.issue }}](https://github.com/OAI/OpenAPI-Specification/issues/{{ page.issue }}) -{% endif %} - -{% if page.remarks %} -### Remarks - -{{ page.remarks }} -{% endif %} +{% include format-entry.md summary=summary %} diff --git a/registries/_format/double.md b/registries/_format/double.md index 915b515d55..15336c4701 100644 --- a/registries/_format/double.md +++ b/registries/_format/double.md @@ -8,22 +8,8 @@ source: https://spec.openapis.org/oas/latest.html#data-types source_label: OAS --- -# {{ page.collection }} - -## {{ page.slug }} - {{ page.description }} - -Base type: `{{ page.base_type }}`. - +{% capture summary %} The `{{page.slug}}` format represents a double precision (64bit) floating point number as defined by [IEEE Std 754-2019](https://ieeexplore.ieee.org/document/8766229). 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). +{% endcapture %} -{% if page.issue %} -### GitHub Issue - -* [#{{ page.issue }}](https://github.com/OAI/OpenAPI-Specification/issues/{{ page.issue }}) -{% endif %} - -{% if page.remarks %} -### Remarks - -{{ page.remarks }} -{% endif %} \ No newline at end of file +{% include format-entry.md summary=summary %}