From 04b33172d8558b4f90894c11e4e457b073605e2c Mon Sep 17 00:00:00 2001 From: Christian Thiel Date: Mon, 19 Feb 2024 11:26:23 +0100 Subject: [PATCH 1/2] provide separate config properties for version of all web components, update default to newest version --- .../annotation/scanner/AsyncApiHandler.java | 8 ++++++-- .../scanner/config/AsyncApiRuntimeConfig.java | 16 +++++++++++++++- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/quarkus-asyncapi-scanner/runtime/src/main/java/io/quarkiverse/asyncapi/annotation/scanner/AsyncApiHandler.java b/quarkus-asyncapi-scanner/runtime/src/main/java/io/quarkiverse/asyncapi/annotation/scanner/AsyncApiHandler.java index 4cf541e..be06229 100644 --- a/quarkus-asyncapi-scanner/runtime/src/main/java/io/quarkiverse/asyncapi/annotation/scanner/AsyncApiHandler.java +++ b/quarkus-asyncapi-scanner/runtime/src/main/java/io/quarkiverse/asyncapi/annotation/scanner/AsyncApiHandler.java @@ -93,12 +93,16 @@ String readFile(Format aFormat) { } String getHtml(RoutingContext aRoutingContext) { - String version = ConfigProvider.getConfig() + String webComponentVersion = ConfigProvider.getConfig() .getValue("quarkus.asyncapi.annotation.scanner.webcomponentversion", String.class); + String webComponentJsVersion = ConfigProvider.getConfig() + .getValue("quarkus.asyncapi.annotation.scanner.webcomponentjsversion", String.class); + String reactComponentVersion = ConfigProvider.getConfig() + .getValue("quarkus.asyncapi.annotation.scanner.reactcomponentversion", String.class); String rootPath = ConfigProvider.getConfig() .getValue("quarkus.http.root-path", String.class); //TODO logo - return String.format(HTML_PATTERN, version, version, version, rootPath, rootPath); + return String.format(HTML_PATTERN, webComponentJsVersion, webComponentVersion, reactComponentVersion, rootPath); } Format getFormat(RoutingContext aRoutingContext) { diff --git a/quarkus-asyncapi-scanner/runtime/src/main/java/io/quarkiverse/asyncapi/annotation/scanner/config/AsyncApiRuntimeConfig.java b/quarkus-asyncapi-scanner/runtime/src/main/java/io/quarkiverse/asyncapi/annotation/scanner/config/AsyncApiRuntimeConfig.java index 0d67843..8d2907a 100644 --- a/quarkus-asyncapi-scanner/runtime/src/main/java/io/quarkiverse/asyncapi/annotation/scanner/config/AsyncApiRuntimeConfig.java +++ b/quarkus-asyncapi-scanner/runtime/src/main/java/io/quarkiverse/asyncapi/annotation/scanner/config/AsyncApiRuntimeConfig.java @@ -23,8 +23,22 @@ public class AsyncApiRuntimeConfig { * * @see https://www.npmjs.com/package/@asyncapi/react-component */ - @ConfigItem(defaultValue = "1.0.0-next.48") + @ConfigItem(defaultValue = "1.2.25") public String webcomponentversion; + /** + * Version of the ReasComponent to be used in html-view to be found at [HOST]/asyncapi.html + * + * @see https://www.npmjs.com/package/@asyncapi/react-component + */ + @ConfigItem(defaultValue = "1.2.25") + public String reactcomponentversion; + /** + * Version of the WebComponentJS to be used in html-view to be found at [HOST]/asyncapi.html + * + * @see https://www.npmjs.com/package/@webcomponents/webcomponentsjs + */ + @ConfigItem(defaultValue = "2.8.0") + public String webcomponentjsversion; /** * Full qualified name of the implementing AsyncApiFilter From dbac648b172e149dfa20dbac76c191e8777115e8 Mon Sep 17 00:00:00 2001 From: Christian Thiel Date: Mon, 19 Feb 2024 11:26:54 +0100 Subject: [PATCH 2/2] Release 0.3.0 --- .github/project.yml | 2 +- docs/modules/ROOT/pages/includes/attributes.adoc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/project.yml b/.github/project.yml index 2b806ae..9d6eef3 100644 --- a/.github/project.yml +++ b/.github/project.yml @@ -1,4 +1,4 @@ release: - current-version: "0.2.2" + current-version: "0.3.0" next-version: "1.0.0-SNAPSHOT" diff --git a/docs/modules/ROOT/pages/includes/attributes.adoc b/docs/modules/ROOT/pages/includes/attributes.adoc index 555e64d..d724282 100644 --- a/docs/modules/ROOT/pages/includes/attributes.adoc +++ b/docs/modules/ROOT/pages/includes/attributes.adoc @@ -1,3 +1,3 @@ -:project-version: 0.2.2 +:project-version: 0.3.0 :examples-dir: ./../examples/ \ No newline at end of file