Skip to content

Commit 6782837

Browse files
authored
Merge pull request #3831 from Bellangelo/encapsulate-format-page-layout-part2
Encapsulate page layout for formats - Part 2
2 parents 81015d9 + 8582ccf commit 6782837

File tree

13 files changed

+37
-204
lines changed

13 files changed

+37
-204
lines changed

_includes/format-entry.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

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

5-
Base type: `{{ page.base_type }}`.
5+
Base type: `{{ page.base_type | join:', ' }}`.
66

77
{{ include.summary }}
88

registries/_format/duration.md

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,9 @@ source_label: JSON Schema
88
source: https://json-schema.org/draft/2020-12/json-schema-validation.html#name-dates-times-and-duration
99
---
1010

11-
# <a href="..">{{ page.collection }}</a>
12-
13-
## {{ page.slug }} - {{ page.description }}
14-
15-
Base type: `{{ page.base_type }}`.
16-
11+
{% capture summary %}
1712
The `{{page.slug}}` format represents a duration as defined by duration - [RFC3339](https://www.rfc-editor.org/rfc/rfc3339.html#appendix-A).
13+
{% endcapture %}
1814

19-
{% if page.issue %}
20-
### GitHub Issue
21-
22-
* [#{{ page.issue }}](https://github.com/OAI/OpenAPI-Specification/issues/{{ page.issue }})
23-
{% endif %}
24-
25-
{% if page.remarks %}
26-
### Remarks
15+
{% include format-entry.md summary=summary %}
2716

28-
{{ page.remarks }}
29-
{% endif %}

registries/_format/email.md

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,8 @@ source_label: JSON Schema
88
source: https://json-schema.org/draft/2020-12/json-schema-validation.html#name-email-addresses
99
---
1010

11-
# <a href="..">{{ page.collection }}</a>
12-
13-
## {{ page.slug }} - {{ page.description }}
14-
15-
Base type: `{{ page.base_type }}`.
16-
11+
{% capture summary %}
1712
The `{{page.slug}}` format is an email address as defined as Mailbox in [RFC5321](https://www.rfc-editor.org/rfc/rfc5321).
13+
{% endcapture %}
1814

19-
{% if page.issue %}
20-
### GitHub Issue
21-
22-
* [#{{ page.issue }}](https://github.com/OAI/OpenAPI-Specification/issues/{{ page.issue }})
23-
{% endif %}
24-
25-
{% if page.remarks %}
26-
### Remarks
27-
28-
{{ page.remarks }}
29-
{% endif %}
15+
{% include format-entry.md summary=summary %}

registries/_format/float.md

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,8 @@ source: https://spec.openapis.org/oas/latest.html#data-types
88
source_label: OAS
99
---
1010

11-
# <a href="..">{{ page.collection }}</a>
12-
13-
## {{ page.slug }} - {{ page.description }}
14-
15-
Base type: `{{ page.base_type }}`.
16-
11+
{% capture summary %}
1712
The `{{page.slug}}` format represents a single precision (32bit) 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).
13+
{% endcapture %}
1814

19-
{% if page.issue %}
20-
### GitHub Issue
21-
22-
* [#{{ page.issue }}](https://github.com/OAI/OpenAPI-Specification/issues/{{ page.issue }})
23-
{% endif %}
24-
25-
{% if page.remarks %}
26-
### Remarks
27-
28-
{{ page.remarks }}
29-
{% endif %}
15+
{% include format-entry.md summary=summary %}

registries/_format/hostname.md

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,8 @@ source_label: JSON Schema
88
source: https://json-schema.org/draft/2020-12/json-schema-validation.html#name-hostnames
99
---
1010

11-
# <a href="..">{{ page.collection }}</a>
12-
13-
## {{ page.slug }} - {{ page.description }}
14-
15-
Base type: `{{ page.base_type }}`.
16-
11+
{% capture summary %}
1712
The `{{page.slug}}` format is a host name as defined by [RFC1123](https://www.rfc-editor.org/info/rfc1123).
13+
{% endcapture %}
1814

19-
{% if page.issue %}
20-
### GitHub Issue
21-
22-
* [#{{ page.issue }}](https://github.com/OAI/OpenAPI-Specification/issues/{{ page.issue }})
23-
{% endif %}
24-
25-
{% if page.remarks %}
26-
### Remarks
27-
28-
{{ page.remarks }}
29-
{% endif %}
15+
{% include format-entry.md summary=summary %}

registries/_format/html.md

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,8 @@ source: https://spec.openapis.org/oas/latest.html#data-types
88
source_label: OAS
99
---
1010

11-
# <a href="..">{{ page.collection }}</a>
12-
13-
## {{ page.slug }} - {{ page.description }}
14-
15-
Base type: `{{ page.base_type}}`.
16-
11+
{% capture summary %}
1712
The `{{page.slug}}` format represents HTML-formatted text.
13+
{% endcapture %}
1814

19-
{% if page.issue %}
20-
### GitHub Issue
21-
22-
* [#{{ page.issue }}](https://github.com/OAI/OpenAPI-Specification/issues/{{ page.issue }})
23-
{% endif %}
24-
25-
{% if page.remarks %}
26-
### Remarks
27-
28-
{{ page.remarks }}
29-
{% endif %}
15+
{% include format-entry.md summary=summary %}

registries/_format/http-date.md

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,12 @@ base_type: string
66
layout: default
77
---
88

9-
# <a href="..">{{ page.collection }}</a>
10-
11-
## {{ page.slug }} - {{ page.description }}
12-
13-
Base type: `{{ page.base_type }}`.
14-
9+
{% capture summary %}
1510
The `{{page.slug}}` format represents a date and time as defined by HTTP-date - [RFC7231](https://datatracker.ietf.org/doc/html/rfc7231#section-7.1.1.1).
1611

1712
Example: "Sun, 06 Nov 1994 08:49:37 GMT"
1813

1914
This is the format for dates passed in HTTP headers.
15+
{% endcapture %}
2016

21-
{% if page.issue %}
22-
### GitHub Issue
23-
24-
* [#{{ page.issue }}](https://github.com/OAI/OpenAPI-Specification/issues/{{ page.issue }})
25-
{% endif %}
26-
27-
{% if page.remarks %}
28-
### Remarks
29-
30-
{{ page.remarks }}
31-
{% endif %}
17+
{% include format-entry.md summary=summary %}

registries/_format/idn-email.md

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,8 @@ source_label: JSON Schema
88
source: https://json-schema.org/draft/2020-12/json-schema-validation.html#name-email-addresses
99
---
1010

11-
# <a href="..">{{ page.collection }}</a>
12-
13-
## {{ page.slug }} - {{ page.description }}
14-
15-
Base type: `{{ page.base_type }}`.
16-
11+
{% capture summary %}
1712
The `{{page.slug}}` format is an email address as defined as Mailbox in [RFC6531](https://www.rfc-editor.org/rfc/rfc6531).
13+
{% endcapture %}
1814

19-
{% if page.issue %}
20-
### GitHub Issue
21-
22-
* [#{{ page.issue }}](https://github.com/OAI/OpenAPI-Specification/issues/{{ page.issue }})
23-
{% endif %}
24-
25-
{% if page.remarks %}
26-
### Remarks
27-
28-
{{ page.remarks }}
29-
{% endif %}
15+
{% include format-entry.md summary=summary %}

registries/_format/idn-hostname.md

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,8 @@ source_label: JSON Schema
88
source: https://json-schema.org/draft/2020-12/json-schema-validation.html#name-hostnames
99
---
1010

11-
# <a href="..">{{ page.collection }}</a>
12-
13-
## {{ page.slug }} - {{ page.description }}
14-
15-
Base type: `{{ page.base_type }}`.
16-
11+
{% capture summary %}
1712
The `{{page.slug}}` format is an internationalized host name as defined by [RFC5890](https://www.rfc-editor.org/rfc/rfc5890.html).
13+
{% endcapture %}
1814

19-
{% if page.issue %}
20-
### GitHub Issue
21-
22-
* [#{{ page.issue }}](https://github.com/OAI/OpenAPI-Specification/issues/{{ page.issue }})
23-
{% endif %}
24-
25-
{% if page.remarks %}
26-
### Remarks
27-
28-
{{ page.remarks }}
29-
{% endif %}
15+
{% include format-entry.md summary=summary %}

registries/_format/int16.md

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,8 @@ base_type: number
66
layout: default
77
---
88

9-
# <a href="..">{{ page.collection }}</a>
10-
11-
## {{ page.slug }} - {{ page.description }}
12-
13-
Base type: `{{ page.base_type }}`.
14-
9+
{% capture summary %}
1510
The `{{page.slug}}` format represents a signed 16-bit integer, with the range -32768 through +32767.
11+
{% endcapture %}
1612

17-
{% if page.issue %}
18-
### GitHub Issue
19-
20-
* [#{{ page.issue }}](https://github.com/OAI/OpenAPI-Specification/issues/{{ page.issue }})
21-
{% endif %}
22-
23-
{% if page.remarks %}
24-
### Remarks
25-
26-
{{ page.remarks }}
27-
{% endif %}
13+
{% include format-entry.md summary=summary %}

0 commit comments

Comments
 (0)