Skip to content

Commit c9af53a

Browse files
authored
Merge pull request #3832 from Bellangelo/encapsulate-format-page-layout-part3
Encapsulate page layout for formats - Part 3
2 parents 6782837 + 1fce917 commit c9af53a

10 files changed

+30
-170
lines changed

registries/_format/ipv4.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-ip-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 IPv4 address as defined as dotted-quad by [RFC2673](https://www.rfc-editor.org/info/rfc2673).
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/ipv6.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-ip-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 IPv6 address as defined by [RFC4291](https://www.rfc-editor.org/info/rfc4291).
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/iri-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 Internationalized Resource Identifier as defined in [RFC3987](https://www.rfc-editor.org/info/rfc3987).
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/iri.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 Internationalized Resource Identifier as defined in [RFC3987](https://www.rfc-editor.org/info/rfc3987).
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/json-pointer.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-json-pointers
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 JSON string representation of a JSON Pointer as defined in [RFC6901](https://www.rfc-editor.org/info/rfc6901).
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/media-range.md

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,9 @@ source_label: OpenAPI
88
source: https://www.rfc-editor.org/rfc/rfc9110#field.accept
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 media type as defined by the `media-range` ABNF
1813
production in [RFC9110](https://www.rfc-editor.org/rfc/rfc9110).
14+
{% endcapture %}
1915

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

registries/_format/password.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 is a string that hints to obscure the value.
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/regex.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-regex
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 regular expression as defined in ECMA-262.
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/relative-json-pointer.md

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,10 @@ source_label: JSON Schema
88
source: https://json-schema.org/draft/2020-12/json-schema-validation.html#name-json-pointers
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 JSON string representation of a relative JSON Pointer as defined in draft RFC 01.
1813

1914
[Relative JSON pointers draft RFC 01](https://datatracker.ietf.org/doc/html/draft-handrews-relative-json-pointer-01).
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/sf-binary.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 byte sequence as defined in [RFC8941].
1813

1914
```abnf
@@ -24,18 +19,9 @@ base64 = ALPHA / DIGIT / "+" / "/" / "="
2419
A Byte Sequence is delimited with colons and encoded using base64 ([RFC4648], Section 4).
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-byte-sequences
4127
[RFC4648]: https://www.rfc-editor.org/rfc/rfc4648#section-4

0 commit comments

Comments
 (0)