Skip to content

Commit 46a6a4e

Browse files
authored
Merge pull request OAI#4241 from ralfhandl/gh-pages-overlay-schema-list
gh-pages: show schema iteration list for Overlay
2 parents 64debe6 + d023269 commit 46a6a4e

File tree

2 files changed

+25
-24
lines changed

2 files changed

+25
-24
lines changed

_includes/schema-iteration-list.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{% assign schema_files = site.static_files | where: "extname", "" | sort: "path" | reverse %}
2+
{% assign last_version = "" %}
3+
{% assign last_kind = "" %}
4+
{%- for file in schema_files -%}
5+
{%- assign segments = file.path | split: "/" -%}
6+
{%- if segments[1] == include.specification -%}
7+
{%- if segments[2] != last_version -%}
8+
{%- assign last_version = segments[2] %}
9+
* **v{{ last_version }}**
10+
{%- endif -%}
11+
{%- if segments[3] != last_kind -%}
12+
{%- if segments[4] == "base" -%}
13+
{%- continue -%}
14+
{%- endif -%}
15+
{%- assign last_kind = segments[3] %}
16+
* view [**{{ last_kind }}/{{ segments[4] }}**]({{ site.baseurl }}/{{ include.specification }}/{{ last_version }}/{{ last_kind }}/{{ segments[4] }}.html)
17+
download iteration
18+
{%- assign separator = ": " -%}
19+
{%- endif -%}
20+
{{ separator }} [{{ file.basename | replace: "-", "‑" }}]({{ site.baseurl }}{{ file.path }})
21+
{%- assign separator = ", " -%}
22+
{%- endif -%}
23+
{%- endfor %}

index.md

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -46,30 +46,8 @@ Note that the OAS 3.1 `schema/YYYY-MM-DD` schema does _not_ validate the Schema
4646

4747
See [issue #4147](https://github.com/OAI/OpenAPI-Specification/issues/4147) for discussion of other possible JSON Schema dialect options, [issue #4152](https://github.com/OAI/OpenAPI-Specification/issues/4152) for programmatic access to the latest schemas, and [issue #4141](https://github.com/OAI/OpenAPI-Specification/issues/4141) for discussions on possibly providing linting schemas that could catch likely problems that do not directly violate the specification.
4848

49-
{% assign schema_files = site.static_files | where: "extname", "" | sort: "path" | reverse %}
50-
{% assign last_version = "" %}
51-
{% assign last_kind = "" %}
52-
{%- for file in schema_files -%}
53-
{%- assign segments = file.path | split: "/" -%}
54-
{%- if segments[1] == "oas" -%}
55-
{%- if segments[2] != last_version -%}
56-
{%- assign last_version = segments[2] %}
57-
* **v{{ last_version }}**
58-
{%- endif -%}
59-
{%- if segments[3] != last_kind -%}
60-
{%- if segments[4] == "base" -%}
61-
{%- continue -%}
62-
{%- endif -%}
63-
{%- assign last_kind = segments[3] %}
64-
* view [**{{ last_kind }}/{{ segments[4] }}**]({{ site.baseurl }}/oas/{{ last_version }}/{{ last_kind }}/{{ segments[4] }}.html)
65-
download iteration
66-
{%- assign separator = ": " -%}
67-
{%- endif -%}
68-
{{ separator }} [{{ file.basename | replace: "-", "‑" }}]({{ site.baseurl }}{{ file.path }})
69-
{%- assign separator = ", " -%}
70-
{%- endif -%}
71-
{%- endfor %}
49+
{% include schema-iteration-list.md specification="oas" %}
7250

7351
### Overlay Specification Schemas
7452

75-
_TBD_
53+
{% include schema-iteration-list.md specification="overlay" %}

0 commit comments

Comments
 (0)