Skip to content

Commit 08a99b0

Browse files
authored
Merge pull request #4034 from ralfhandl/gh-pages-json-schema-view-or-download
gh-pages: view link and download link for latest JSON schemas
2 parents 1b22948 + 831c1e2 commit 08a99b0

File tree

5 files changed

+40
-3
lines changed

5 files changed

+40
-3
lines changed

README.md

+5
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ This site contains the OpenAPI Initiative Registry and content for the HTML vers
1515

1616
## Development
1717

18+
> [!NOTE]
19+
> As of 2024-08-28 Jekyll version 4.3.2 does _not_ work with Ruby 3.3.x.
20+
>
21+
> Make sure you have Ruby 3.2.x or lower installed.
22+
1823
Install [jekyll](https://jekyllrb.com/docs/installation/) for your platform, install the site
1924
~~~sh
2025
bundle install

index.md

+8-3
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,20 @@ This site contains the OpenAPI Initiative Registry and content for the HTML vers
2828

2929
{% assign schema_files = site.static_files | where: "extname", "" | sort: "path" | reverse %}
3030
{% assign last_version = "" %}
31+
{% assign last_kind = "" %}
3132
{%- for file in schema_files -%}
3233
{%- assign segments = file.path | split: "/" -%}
33-
{%- if segments[1] == "oas" and file.basename contains "lat" -%}
34+
{%- if segments[1] == "oas" and file.basename contains "-" -%}
3435
{%- if segments[2] != last_version -%}
3536
{%- assign last_version = segments[2] %}
3637
* **v{{ last_version }}**
38+
{%- endif -%}
39+
{%- if segments[3] != last_kind -%}
40+
{%- assign last_kind = segments[3] %}
41+
* [**{{ last_kind }}**]({{ site.baseurl }}/oas/{{ last_version }}/{{ last_kind }}/latest.html)
3742
{%- assign separator = ": " -%}
3843
{%- endif -%}
39-
{{ separator }}[{{ segments[3] }}]({{ site.baseurl }}{{ file.path }})
44+
{{ separator }} [{{ file.basename }}]({{ site.baseurl }}{{ file.path }})
4045
{%- assign separator = ", " -%}
4146
{%- endif -%}
42-
{%- endfor -%}
47+
{%- endfor %}

oas/3.0/schema/latest.md

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
title: JSON Schema for OpenAPI 3.0
3+
layout: default
4+
parent: Schemas
5+
---
6+
7+
```json
8+
{% include_relative latest %}
9+
```

oas/3.1/schema-base/latest.md

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
title: JSON Schema for OpenAPI 3.1 - with schema validation
3+
layout: default
4+
parent: Schemas
5+
---
6+
7+
```json
8+
{% include_relative latest %}
9+
```

oas/3.1/schema/latest.md

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
title: JSON Schema for OpenAPI 3.1 - without schema validation
3+
layout: default
4+
parent: Schemas
5+
---
6+
7+
```json
8+
{% include_relative latest %}
9+
```

0 commit comments

Comments
 (0)