From 069ae8f085d6f79a2c26f7866ecac8edd557fb41 Mon Sep 17 00:00:00 2001 From: Ralf Handl Date: Fri, 16 Aug 2024 07:49:23 +0200 Subject: [PATCH 1/5] Fix schema links Also work if site is deployed with non-empty base URL --- index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.md b/index.md index 3798a9a22c..6d7730a8c0 100644 --- a/index.md +++ b/index.md @@ -36,7 +36,7 @@ This site contains the OpenAPI Initiative Registry and content for the HTML vers * **v{{ last_version }}** {%- assign separator = ": " -%} {%- endif -%} -{{ separator }}[{{ segments[3] }}]({{ file.path }}) +{{ separator }}[{{ segments[3] }}]({{ site.baseurl }}{{ file.path }}) {%- assign separator = ", " -%} {%- endif -%} {%- endfor -%} From 046402e4221185f064b4fb8e0cf3058221eedf47 Mon Sep 17 00:00:00 2001 From: Ralf Handl Date: Fri, 16 Aug 2024 13:22:08 +0200 Subject: [PATCH 2/5] view link and download link for latest schemas --- index.md | 4 ++-- oas/3.0/schema/latest.json | 1 + oas/3.1/schema-base/latest.json | 1 + oas/3.1/schema/latest.json | 1 + 4 files changed, 5 insertions(+), 2 deletions(-) create mode 120000 oas/3.0/schema/latest.json create mode 120000 oas/3.1/schema-base/latest.json create mode 120000 oas/3.1/schema/latest.json diff --git a/index.md b/index.md index 6d7730a8c0..d0f9074665 100644 --- a/index.md +++ b/index.md @@ -30,13 +30,13 @@ This site contains the OpenAPI Initiative Registry and content for the HTML vers {% assign last_version = "" %} {%- for file in schema_files -%} {%- assign segments = file.path | split: "/" -%} -{%- if segments[1] == "oas" and file.basename contains "lat" -%} +{%- if segments[1] == "oas" and file.basename contains "latest" -%} {%- if segments[2] != last_version -%} {%- assign last_version = segments[2] %} * **v{{ last_version }}** {%- assign separator = ": " -%} {%- endif -%} -{{ separator }}[{{ segments[3] }}]({{ site.baseurl }}{{ file.path }}) +{{ separator }}[{{ segments[3] }}]({{ site.baseurl }}{{ file.path }}.json) ([download]({{ site.baseurl }}{{ file.path }})) {%- assign separator = ", " -%} {%- endif -%} {%- endfor -%} diff --git a/oas/3.0/schema/latest.json b/oas/3.0/schema/latest.json new file mode 120000 index 0000000000..50eb6cd6bc --- /dev/null +++ b/oas/3.0/schema/latest.json @@ -0,0 +1 @@ +2021-09-28 \ No newline at end of file diff --git a/oas/3.1/schema-base/latest.json b/oas/3.1/schema-base/latest.json new file mode 120000 index 0000000000..0855e8794b --- /dev/null +++ b/oas/3.1/schema-base/latest.json @@ -0,0 +1 @@ +2022-10-07 \ No newline at end of file diff --git a/oas/3.1/schema/latest.json b/oas/3.1/schema/latest.json new file mode 120000 index 0000000000..0855e8794b --- /dev/null +++ b/oas/3.1/schema/latest.json @@ -0,0 +1 @@ +2022-10-07 \ No newline at end of file From a1ed84a174bbd4ae4ab0c401002cbf237a8f5dca Mon Sep 17 00:00:00 2001 From: Ralf Handl Date: Wed, 28 Aug 2024 22:10:50 +0200 Subject: [PATCH 3/5] HTML wrappers instead of .json symlinks --- index.md | 4 ++-- oas/3.0/schema/latest.json | 1 - oas/3.0/schema/latest.md | 9 +++++++++ oas/3.1/schema-base/latest.json | 1 - oas/3.1/schema-base/latest.md | 9 +++++++++ oas/3.1/schema/latest.json | 1 - oas/3.1/schema/latest.md | 9 +++++++++ 7 files changed, 29 insertions(+), 5 deletions(-) delete mode 120000 oas/3.0/schema/latest.json create mode 100644 oas/3.0/schema/latest.md delete mode 120000 oas/3.1/schema-base/latest.json create mode 100644 oas/3.1/schema-base/latest.md delete mode 120000 oas/3.1/schema/latest.json create mode 100644 oas/3.1/schema/latest.md diff --git a/index.md b/index.md index d0f9074665..892a2479a7 100644 --- a/index.md +++ b/index.md @@ -36,7 +36,7 @@ This site contains the OpenAPI Initiative Registry and content for the HTML vers * **v{{ last_version }}** {%- assign separator = ": " -%} {%- endif -%} -{{ separator }}[{{ segments[3] }}]({{ site.baseurl }}{{ file.path }}.json) ([download]({{ site.baseurl }}{{ file.path }})) +{{ separator }}[{{ segments[3] }}]({{ site.baseurl }}{{ file.path }}.html) ([download]({{ site.baseurl }}{{ file.path }})) {%- assign separator = ", " -%} {%- endif -%} -{%- endfor -%} +{%- endfor %} diff --git a/oas/3.0/schema/latest.json b/oas/3.0/schema/latest.json deleted file mode 120000 index 50eb6cd6bc..0000000000 --- a/oas/3.0/schema/latest.json +++ /dev/null @@ -1 +0,0 @@ -2021-09-28 \ No newline at end of file diff --git a/oas/3.0/schema/latest.md b/oas/3.0/schema/latest.md new file mode 100644 index 0000000000..b4af544a38 --- /dev/null +++ b/oas/3.0/schema/latest.md @@ -0,0 +1,9 @@ +--- +title: JSON Schema for OpenAPI 3.0 +layout: default +parent: Schemas +--- + +```json +{% include_relative latest %} +``` \ No newline at end of file diff --git a/oas/3.1/schema-base/latest.json b/oas/3.1/schema-base/latest.json deleted file mode 120000 index 0855e8794b..0000000000 --- a/oas/3.1/schema-base/latest.json +++ /dev/null @@ -1 +0,0 @@ -2022-10-07 \ No newline at end of file diff --git a/oas/3.1/schema-base/latest.md b/oas/3.1/schema-base/latest.md new file mode 100644 index 0000000000..b38cc2864d --- /dev/null +++ b/oas/3.1/schema-base/latest.md @@ -0,0 +1,9 @@ +--- +title: JSON Schema for OpenAPI 3.1 - with schema validation +layout: default +parent: Schemas +--- + +```json +{% include_relative latest %} +``` \ No newline at end of file diff --git a/oas/3.1/schema/latest.json b/oas/3.1/schema/latest.json deleted file mode 120000 index 0855e8794b..0000000000 --- a/oas/3.1/schema/latest.json +++ /dev/null @@ -1 +0,0 @@ -2022-10-07 \ No newline at end of file diff --git a/oas/3.1/schema/latest.md b/oas/3.1/schema/latest.md new file mode 100644 index 0000000000..c80f6d0b23 --- /dev/null +++ b/oas/3.1/schema/latest.md @@ -0,0 +1,9 @@ +--- +title: JSON Schema for OpenAPI 3.1 - without schema validation +layout: default +parent: Schemas +--- + +```json +{% include_relative latest %} +``` \ No newline at end of file From 272c1309ac6e76da9cdbb62f6d3419dfbd2d7e4f Mon Sep 17 00:00:00 2001 From: Ralf Handl Date: Wed, 28 Aug 2024 22:55:04 +0200 Subject: [PATCH 4/5] Update README.md --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index d4c84a073b..b73d57f9fe 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,11 @@ This site contains the OpenAPI Initiative Registry and content for the HTML vers ## Development +> [!NOTE] +> As of 2024-08-28 Jekyll version 4.3.2 does _not_ work with Ruby 3.3.x. +> +> Make sure you have Ruby 3.2.x or lower installed. + Install [jekyll](https://jekyllrb.com/docs/installation/) for your platform, install the site ~~~sh bundle install From 831c1e2dbe5a952813b873574a4ccc73def509c8 Mon Sep 17 00:00:00 2001 From: Ralf Handl Date: Thu, 29 Aug 2024 10:23:42 +0200 Subject: [PATCH 5/5] Download links for all versions --- index.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/index.md b/index.md index 892a2479a7..2b80996f5b 100644 --- a/index.md +++ b/index.md @@ -28,15 +28,20 @@ This site contains the OpenAPI Initiative Registry and content for the HTML vers {% assign schema_files = site.static_files | where: "extname", "" | sort: "path" | reverse %} {% assign last_version = "" %} +{% assign last_kind = "" %} {%- for file in schema_files -%} {%- assign segments = file.path | split: "/" -%} -{%- if segments[1] == "oas" and file.basename contains "latest" -%} +{%- if segments[1] == "oas" and file.basename contains "-" -%} {%- if segments[2] != last_version -%} {%- assign last_version = segments[2] %} * **v{{ last_version }}** +{%- endif -%} +{%- if segments[3] != last_kind -%} +{%- assign last_kind = segments[3] %} + * [**{{ last_kind }}**]({{ site.baseurl }}/oas/{{ last_version }}/{{ last_kind }}/latest.html) {%- assign separator = ": " -%} {%- endif -%} -{{ separator }}[{{ segments[3] }}]({{ site.baseurl }}{{ file.path }}.html) ([download]({{ site.baseurl }}{{ file.path }})) +{{ separator }} [{{ file.basename }}]({{ site.baseurl }}{{ file.path }}) {%- assign separator = ", " -%} {%- endif -%} {%- endfor %}