Skip to content

Commit 1d6b9f4

Browse files
authored
Merge pull request #4585 from baywet/feat/uint-formats
feat: adds uint16, 32 and 64 formats
2 parents 799dd75 + 73d1c28 commit 1d6b9f4

File tree

3 files changed

+47
-0
lines changed

3 files changed

+47
-0
lines changed

registries/_format/uint16.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
owner: baywet
3+
issue: 4564
4+
description: unsigned 16-bit integer
5+
base_type: number
6+
layout: default
7+
source: https://spec.openapis.org/oas/latest.html#data-types
8+
source_label: OAS
9+
---
10+
11+
{% capture summary %}
12+
The `{{page.slug}}` format represents an unsigned 16-bit integer, with the range 0 to 65535.
13+
{% endcapture %}
14+
15+
{% include format-entry.md summary=summary %}

registries/_format/uint32.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
owner: baywet
3+
issue: 4564
4+
description: unsigned 32-bit integer
5+
base_type: number
6+
layout: default
7+
source: https://spec.openapis.org/oas/latest.html#data-types
8+
source_label: OAS
9+
---
10+
11+
{% capture summary %}
12+
The `{{page.slug}}` format represents an unsigned 32-bit integer, with the range 0 to 4294967295.
13+
{% endcapture %}
14+
15+
{% include format-entry.md summary=summary %}

registries/_format/uint64.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
owner: baywet
3+
issue: 4564
4+
description: unsigned 64-bit integer
5+
base_type: [number, string]
6+
layout: default
7+
source: https://spec.openapis.org/oas/latest.html#data-types
8+
source_label: OAS
9+
---
10+
11+
{% capture summary %}
12+
The `{{page.slug}}` format represents an unsigned 64-bit integer, with the range 0 to 18446744073709551615.
13+
14+
Representation as a JSON string is recommended for values outside the 53-bit range (0 through 9007199254740991) as this avoids problems with recipients that parse JSON numbers into [binary64](https://en.wikipedia.org/wiki/Double-precision_floating-point_format) memory representation.
15+
{% endcapture %}
16+
17+
{% include format-entry.md summary=summary %}

0 commit comments

Comments
 (0)