Skip to content

Commit 33e0aba

Browse files
authored
Merge pull request #3833 from Bellangelo/encapsulate-format-page-layout-part4
Encapsulate page layout for formats - Part 4
2 parents c9af53a + 2cb5fae commit 33e0aba

File tree

11 files changed

+34
-188
lines changed

11 files changed

+34
-188
lines changed

registries/_format/sf-boolean.md

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,7 @@ base_type: string
88
layout: default
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 structured fields boolean as defined in [RFC8941].
1813

1914
```abnf
@@ -24,17 +19,8 @@ boolean = "0" / "1"
2419
A Boolean is indicated with a leading "?" character followed by a "1" for a true value or "0" for false.
2520

2621
This format is appropriate for a header value that must conform to the {{page.slug}} structured field definition.
22+
{% endcapture %}
2723

28-
{% if page.issue %}
29-
### GitHub Issue
30-
31-
* [#{{ page.issue }}](https://github.com/OAI/OpenAPI-Specification/issues/{{ page.issue }})
32-
{% endif %}
33-
34-
{% if page.remarks %}
35-
### Remarks
36-
37-
{{ page.remarks }}
38-
{% endif %}
24+
{% include format-entry.md summary=summary %}
3925

4026
[RFC8941]: https://www.rfc-editor.org/rfc/rfc8941#name-booleans

registries/_format/sf-decimal.md

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,7 @@ base_type: number
88
layout: default
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 structured fields decimal as defined in [RFC8941].
1813

1914
```abnf
@@ -24,17 +19,8 @@ Decimals are numbers with an integer and a fractional component.
2419
The integer component has at most 12 digits; the fractional component has at most three digits.
2520

2621
This format is appropriate for a header value that must conform to the {{page.slug}} structured field definition.
22+
{% endcapture %}
2723

28-
{% if page.issue %}
29-
### GitHub Issue
30-
31-
* [#{{ page.issue }}](https://github.com/OAI/OpenAPI-Specification/issues/{{ page.issue }})
32-
{% endif %}
33-
34-
{% if page.remarks %}
35-
### Remarks
36-
37-
{{ page.remarks }}
38-
{% endif %}
24+
{% include format-entry.md summary=summary %}
3925

4026
[RFC8941]: https://www.rfc-editor.org/rfc/rfc8941#name-decimals

registries/_format/sf-integer.md

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,7 @@ base_type: [integer, number]
88
layout: default
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 structured fields integer as defined in [RFC8941].
1813

1914
```abnf
@@ -24,18 +19,9 @@ Integers have a range of -999,999,999,999,999 to 999,999,999,999,999 inclusive (
2419
for IEEE 754 compatibility [IEEE754].
2520

2621
This format is appropriate for a header value that must conform to the {{page.slug}} structured field definition.
22+
{% endcapture %}
2723

28-
{% if page.issue %}
29-
### GitHub Issue
30-
31-
* [#{{ page.issue }}](https://github.com/OAI/OpenAPI-Specification/issues/{{ page.issue }})
32-
{% endif %}
33-
34-
{% if page.remarks %}
35-
### Remarks
36-
37-
{{ page.remarks }}
38-
{% endif %}
24+
{% include format-entry.md summary=summary %}
3925

4026
[RFC8941]: https://www.rfc-editor.org/rfc/rfc8941#name-integers
41-
[IEEE754]: https://ieeexplore.ieee.org/document/8766229
27+
[IEEE754]: https://ieeexplore.ieee.org/document/8766229

registries/_format/sf-string.md

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,7 @@ base_type: string
88
layout: default
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 structured fields string as defined in [RFC8941].
1813

1914
```abnf
@@ -29,17 +24,8 @@ Note that this excludes tabs, newlines, carriage returns, etc.
2924
Strings are delimited with double quotes, using a backslash ("\") to escape double quotes and backslashes.
3025

3126
This format is appropriate for a header value that must conform to the {{page.slug}} structured field definition.
27+
{% endcapture %}
3228

33-
{% if page.issue %}
34-
### GitHub Issue
35-
36-
* [#{{ page.issue }}](https://github.com/OAI/OpenAPI-Specification/issues/{{ page.issue }})
37-
{% endif %}
38-
39-
{% if page.remarks %}
40-
### Remarks
41-
42-
{{ page.remarks }}
43-
{% endif %}
29+
{% include format-entry.md summary=summary %}
4430

4531
[RFC8941]: https://www.rfc-editor.org/rfc/rfc8941#name-strings

registries/_format/sf-token.md

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,7 @@ base_type: string
88
layout: default
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 structured fields token as defined in [RFC8941].
1813

1914
```abnf
@@ -23,17 +18,8 @@ sf-token = ( ALPHA / "*" ) *( tchar / ":" / "/" )
2318
Tokens are short textual words; their abstract model is identical to their expression in the HTTP field value serialization.
2419

2520
This format is appropriate for a header value that must conform to the {{page.slug}} structured field definition.
21+
{% endcapture %}
2622

27-
{% if page.issue %}
28-
### GitHub Issue
29-
30-
* [#{{ page.issue }}](https://github.com/OAI/OpenAPI-Specification/issues/{{ page.issue }})
31-
{% endif %}
32-
33-
{% if page.remarks %}
34-
### Remarks
35-
36-
{{ page.remarks }}
37-
{% endif %}
23+
{% include format-entry.md summary=summary %}
3824

3925
[RFC8941]: https://www.rfc-editor.org/rfc/rfc8941#name-tokens

registries/_format/time.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-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 time as defined by full-time - [RFC3339](https://www.rfc-editor.org/rfc/rfc3339.html#section-5.6).
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/uint8.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 an unsigned 8-bit integer, with the range 0 to 255.
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/uri-reference.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-resource-identifiers
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 URI reference as defined in RFC3986.
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/uri-template.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-uri-template
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 URI Template as defined in [RFC6570](https://www.rfc-editor.org/rfc/rfc6570).
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/uri.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-resource-identifiers
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 Uniform Resource Identifier as defined in [RFC3986](https://www.rfc-editor.org/rfc/rfc3986.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 %}

0 commit comments

Comments
 (0)