diff --git a/packages/camel-catalog/.gitignore b/packages/camel-catalog/.gitignore deleted file mode 100644 index 96ef862d5..000000000 --- a/packages/camel-catalog/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -target/ -.idea/ diff --git a/packages/camel-catalog/.mvn/wrapper/maven-wrapper.jar b/packages/camel-catalog/.mvn/wrapper/maven-wrapper.jar deleted file mode 100644 index cb28b0e37..000000000 Binary files a/packages/camel-catalog/.mvn/wrapper/maven-wrapper.jar and /dev/null differ diff --git a/packages/camel-catalog/.mvn/wrapper/maven-wrapper.properties b/packages/camel-catalog/.mvn/wrapper/maven-wrapper.properties deleted file mode 100644 index 4d624fa9c..000000000 --- a/packages/camel-catalog/.mvn/wrapper/maven-wrapper.properties +++ /dev/null @@ -1,17 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip diff --git a/packages/camel-catalog/CHANGELOG.md b/packages/camel-catalog/CHANGELOG.md deleted file mode 100644 index e28f8763a..000000000 --- a/packages/camel-catalog/CHANGELOG.md +++ /dev/null @@ -1,266 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -# 0.7.0 (2023-12-18) - -### Bug Fixes - -* **deps:** update dependency org.apache.maven:maven-plugin-api to v3.9.6 ([77207bd](https://github.com/KaotoIO/kaoto-next/commit/77207bd77d9f94227e88ef20e4950e2123961298)) -* Make sure type in the propertiesSchema is of primitive type if it's enum ([11bcbfd](https://github.com/KaotoIO/kaoto-next/commit/11bcbfd10b2843848ce6f0ebd725bb52bed0ddbc)), closes [#528](https://github.com/KaotoIO/kaoto-next/issues/528) -* Refactor component schema generation ([2c92564](https://github.com/KaotoIO/kaoto-next/commit/2c9256479df3381d2c148eab41114acdc56c6b2b)), closes [#448](https://github.com/KaotoIO/kaoto-next/issues/448) [#449](https://github.com/KaotoIO/kaoto-next/issues/449) [#470](https://github.com/KaotoIO/kaoto-next/issues/470) -* Refactor kamelet schema generation ([#448](https://github.com/KaotoIO/kaoto-next/issues/448)) ([0c0f66f](https://github.com/KaotoIO/kaoto-next/commit/0c0f66f64930b413ac93c20a2bc3dfc560c63982)), closes [#449](https://github.com/KaotoIO/kaoto-next/issues/449) -* Refactor processors schema ([#531](https://github.com/KaotoIO/kaoto-next/issues/531)) ([e9d71c6](https://github.com/KaotoIO/kaoto-next/commit/e9d71c655bd209fb4d4017367b532d525a29462f)), closes [#448](https://github.com/KaotoIO/kaoto-next/issues/448) [#449](https://github.com/KaotoIO/kaoto-next/issues/449) - -# 0.6.0 (2023-11-29) - -# 0.5.0 (2023-11-28) - -### Bug Fixes - -* Add kamelet:source and kamelet:sink to the catalog ([#429](https://github.com/KaotoIO/kaoto-next/issues/429)) ([69925af](https://github.com/KaotoIO/kaoto-next/commit/69925af7c4677e625f2e90760e98d0be740c5c88)), closes [#425](https://github.com/KaotoIO/kaoto-next/issues/425) - -# 0.4.0 (2023-11-24) - -# 0.3.0 (2023-11-22) - -### Bug Fixes - -* **deps:** update dependency io.fabric8:kubernetes-model to v6.9.0 ([1923d4d](https://github.com/KaotoIO/kaoto-next/commit/1923d4d09a1d4122eb0455f937221205a27b4cd1)) -* **deps:** update dependency io.fabric8:kubernetes-model to v6.9.1 ([f812b71](https://github.com/KaotoIO/kaoto-next/commit/f812b7180688769308c7551085fccc714f1034ac)) -* **deps:** update dependency io.fabric8:kubernetes-model to v6.9.2 ([419c60f](https://github.com/KaotoIO/kaoto-next/commit/419c60fffa034a0eae01624d1e891ea525224407)) -* **deps:** update dependency org.apache.maven.plugin-tools:maven-plugin-annotations to v3.10.1 ([4157faa](https://github.com/KaotoIO/kaoto-next/commit/4157faa8426cdf7a6346cc9558f3674a73b0836e)) -* **deps:** update dependency org.apache.maven.plugin-tools:maven-plugin-annotations to v3.10.2 ([df62ce2](https://github.com/KaotoIO/kaoto-next/commit/df62ce2848e6beeafc5254f4e2acfc89ae65bf8c)) -* **deps:** update version.jackson to v2.15.3 ([c56e2a6](https://github.com/KaotoIO/kaoto-next/commit/c56e2a66db78c026d7707eded2e0c3d4439837a3)) -* **deps:** update version.jackson to v2.16.0 ([6f1910b](https://github.com/KaotoIO/kaoto-next/commit/6f1910ba6cc241d0fa932c1a3b1119ec80cb2b49)) -* Refactor @kaoto-next/camel-catalog ([e4796d2](https://github.com/KaotoIO/kaoto-next/commit/e4796d270a61d41615d7cdf5ea7dc2f396f6640a)), closes [#311](https://github.com/KaotoIO/kaoto-next/issues/311) [#316](https://github.com/KaotoIO/kaoto-next/issues/316) [#335](https://github.com/KaotoIO/kaoto-next/issues/335) [#311](https://github.com/KaotoIO/kaoto-next/issues/311) -* Support using camel catalog and schema in Jest tests ([365f7a0](https://github.com/KaotoIO/kaoto-next/commit/365f7a0172f3cbfeb9ea2f5c6b7c4074003bf75c)), closes [#310](https://github.com/KaotoIO/kaoto-next/issues/310) - -### Features - -* **catalog:** Minify Camel Catalog ([5c17105](https://github.com/KaotoIO/kaoto-next/commit/5c1710544af50f4f040ef7dcf94d69f801af2170)) -* Support configuring /PipeSpec/ErrorHandler ([1cd996f](https://github.com/KaotoIO/kaoto-next/commit/1cd996fb53a89ef41b23ba4b84c7b2e27095516f)), closes [#188](https://github.com/KaotoIO/kaoto-next/issues/188) -* Support configuring Camel K CR metadata ([#181](https://github.com/KaotoIO/kaoto-next/issues/181)) ([#226](https://github.com/KaotoIO/kaoto-next/issues/226)) ([31aba1a](https://github.com/KaotoIO/kaoto-next/commit/31aba1a9d2395665d2735f2f3740d300f638e98f)) -* Support configuring dataformat in Canvas form ([2a62d04](https://github.com/KaotoIO/kaoto-next/commit/2a62d04d070826f18bb7c5a01a3fd9ab2dd83534)), closes [#273](https://github.com/KaotoIO/kaoto-next/issues/273) - -# 0.2.0 (2023-10-05) - -### Bug Fixes - -* **build:** Build errors with node v20 ([1cdc56f](https://github.com/KaotoIO/kaoto-next/commit/1cdc56fe96e3e46a1ac84e3423193c6d5c6406dd)) -* **build:** Windows build ([b8d962e](https://github.com/KaotoIO/kaoto-next/commit/b8d962e0b86e4854277d354c53185a23e2ff9ed9)) -* Camel K CRD file extraction fails ([c633b07](https://github.com/KaotoIO/kaoto-next/commit/c633b07c419fad48f0e4b65b3f4a0687819aa4ba)), closes [#106](https://github.com/KaotoIO/kaoto-next/issues/106) -* Create sub schemas for each top properties ([#144](https://github.com/KaotoIO/kaoto-next/issues/144)) ([40efd4a](https://github.com/KaotoIO/kaoto-next/commit/40efd4a18af9e4da20394943979f5c2a58fe8e8f)), closes [#138](https://github.com/KaotoIO/kaoto-next/issues/138) -* **deps:** update dependency io.fabric8:kubernetes-model to v6.8.1 ([#32](https://github.com/KaotoIO/kaoto-next/issues/32)) ([e38f7ab](https://github.com/KaotoIO/kaoto-next/commit/e38f7abaca83504927ac5e5bee16f9a80f5a27f4)) -* **deps:** update dependency org.apache.maven:maven-plugin-api to v3.9.5 ([#191](https://github.com/KaotoIO/kaoto-next/issues/191)) ([598fd26](https://github.com/KaotoIO/kaoto-next/commit/598fd26665b08cba3692685dd5ac158245fc2fde)) -* Let UI use maven generated YAML DSL sub schema ([66bdd77](https://github.com/KaotoIO/kaoto-next/commit/66bdd7704c87d2d29c602d36557f10d5ddba5ba5)), closes [#147](https://github.com/KaotoIO/kaoto-next/issues/147) [#8](https://github.com/KaotoIO/kaoto-next/issues/8) -* Put schema files into a Map to allow direct access with a schema name ([9cf8c4d](https://github.com/KaotoIO/kaoto-next/commit/9cf8c4d538908732b23198d394e0dcfa95f283ff)), closes [#148](https://github.com/KaotoIO/kaoto-next/issues/148) -* Remove kebab-case YAML schema in favor of camelCase one ([96b21e4](https://github.com/KaotoIO/kaoto-next/commit/96b21e48d1b483ce0dae46d6b28a53c02d1ebdad)), closes [#70](https://github.com/KaotoIO/kaoto-next/issues/70) -* Replace rm with rimraf to clean dist folder ([8133563](https://github.com/KaotoIO/kaoto-next/commit/81335630d329ea6b0e7c21a1d3c045ed89ff4e00)) - -### Features - -* Add camel catalog and schema ([bb8f3ad](https://github.com/KaotoIO/kaoto-next/commit/bb8f3ad9dadfe6fe71f22fe8dbb1986d23830986)) -* **camel-catalog:** export Typescript definitions from Camel Schemas ([a76985c](https://github.com/KaotoIO/kaoto-next/commit/a76985c78871f70ff8a15af97afe53970c26fc78)) -* **versioning:** Version and publish workflow ([98f9587](https://github.com/KaotoIO/kaoto-next/commit/98f95879076cd066d1e0cb83d9556468c1277e7a)) - -# 0.6.0 (2023-11-29) - -# 0.5.0 (2023-11-28) - -### Bug Fixes - -* Add kamelet:source and kamelet:sink to the catalog ([#429](https://github.com/KaotoIO/kaoto-next/issues/429)) ([69925af](https://github.com/KaotoIO/kaoto-next/commit/69925af7c4677e625f2e90760e98d0be740c5c88)), closes [#425](https://github.com/KaotoIO/kaoto-next/issues/425) - -# 0.4.0 (2023-11-24) - -# 0.3.0 (2023-11-22) - -### Bug Fixes - -* **deps:** update dependency io.fabric8:kubernetes-model to v6.9.0 ([1923d4d](https://github.com/KaotoIO/kaoto-next/commit/1923d4d09a1d4122eb0455f937221205a27b4cd1)) -* **deps:** update dependency io.fabric8:kubernetes-model to v6.9.1 ([f812b71](https://github.com/KaotoIO/kaoto-next/commit/f812b7180688769308c7551085fccc714f1034ac)) -* **deps:** update dependency io.fabric8:kubernetes-model to v6.9.2 ([419c60f](https://github.com/KaotoIO/kaoto-next/commit/419c60fffa034a0eae01624d1e891ea525224407)) -* **deps:** update dependency org.apache.maven.plugin-tools:maven-plugin-annotations to v3.10.1 ([4157faa](https://github.com/KaotoIO/kaoto-next/commit/4157faa8426cdf7a6346cc9558f3674a73b0836e)) -* **deps:** update dependency org.apache.maven.plugin-tools:maven-plugin-annotations to v3.10.2 ([df62ce2](https://github.com/KaotoIO/kaoto-next/commit/df62ce2848e6beeafc5254f4e2acfc89ae65bf8c)) -* **deps:** update version.jackson to v2.15.3 ([c56e2a6](https://github.com/KaotoIO/kaoto-next/commit/c56e2a66db78c026d7707eded2e0c3d4439837a3)) -* **deps:** update version.jackson to v2.16.0 ([6f1910b](https://github.com/KaotoIO/kaoto-next/commit/6f1910ba6cc241d0fa932c1a3b1119ec80cb2b49)) -* Refactor @kaoto-next/camel-catalog ([e4796d2](https://github.com/KaotoIO/kaoto-next/commit/e4796d270a61d41615d7cdf5ea7dc2f396f6640a)), closes [#311](https://github.com/KaotoIO/kaoto-next/issues/311) [#316](https://github.com/KaotoIO/kaoto-next/issues/316) [#335](https://github.com/KaotoIO/kaoto-next/issues/335) [#311](https://github.com/KaotoIO/kaoto-next/issues/311) -* Support using camel catalog and schema in Jest tests ([365f7a0](https://github.com/KaotoIO/kaoto-next/commit/365f7a0172f3cbfeb9ea2f5c6b7c4074003bf75c)), closes [#310](https://github.com/KaotoIO/kaoto-next/issues/310) - -### Features - -* **catalog:** Minify Camel Catalog ([5c17105](https://github.com/KaotoIO/kaoto-next/commit/5c1710544af50f4f040ef7dcf94d69f801af2170)) -* Support configuring /PipeSpec/ErrorHandler ([1cd996f](https://github.com/KaotoIO/kaoto-next/commit/1cd996fb53a89ef41b23ba4b84c7b2e27095516f)), closes [#188](https://github.com/KaotoIO/kaoto-next/issues/188) -* Support configuring Camel K CR metadata ([#181](https://github.com/KaotoIO/kaoto-next/issues/181)) ([#226](https://github.com/KaotoIO/kaoto-next/issues/226)) ([31aba1a](https://github.com/KaotoIO/kaoto-next/commit/31aba1a9d2395665d2735f2f3740d300f638e98f)) -* Support configuring dataformat in Canvas form ([2a62d04](https://github.com/KaotoIO/kaoto-next/commit/2a62d04d070826f18bb7c5a01a3fd9ab2dd83534)), closes [#273](https://github.com/KaotoIO/kaoto-next/issues/273) - -# 0.2.0 (2023-10-05) - -### Bug Fixes - -* **build:** Build errors with node v20 ([1cdc56f](https://github.com/KaotoIO/kaoto-next/commit/1cdc56fe96e3e46a1ac84e3423193c6d5c6406dd)) -* **build:** Windows build ([b8d962e](https://github.com/KaotoIO/kaoto-next/commit/b8d962e0b86e4854277d354c53185a23e2ff9ed9)) -* Camel K CRD file extraction fails ([c633b07](https://github.com/KaotoIO/kaoto-next/commit/c633b07c419fad48f0e4b65b3f4a0687819aa4ba)), closes [#106](https://github.com/KaotoIO/kaoto-next/issues/106) -* Create sub schemas for each top properties ([#144](https://github.com/KaotoIO/kaoto-next/issues/144)) ([40efd4a](https://github.com/KaotoIO/kaoto-next/commit/40efd4a18af9e4da20394943979f5c2a58fe8e8f)), closes [#138](https://github.com/KaotoIO/kaoto-next/issues/138) -* **deps:** update dependency io.fabric8:kubernetes-model to v6.8.1 ([#32](https://github.com/KaotoIO/kaoto-next/issues/32)) ([e38f7ab](https://github.com/KaotoIO/kaoto-next/commit/e38f7abaca83504927ac5e5bee16f9a80f5a27f4)) -* **deps:** update dependency org.apache.maven:maven-plugin-api to v3.9.5 ([#191](https://github.com/KaotoIO/kaoto-next/issues/191)) ([598fd26](https://github.com/KaotoIO/kaoto-next/commit/598fd26665b08cba3692685dd5ac158245fc2fde)) -* Let UI use maven generated YAML DSL sub schema ([66bdd77](https://github.com/KaotoIO/kaoto-next/commit/66bdd7704c87d2d29c602d36557f10d5ddba5ba5)), closes [#147](https://github.com/KaotoIO/kaoto-next/issues/147) [#8](https://github.com/KaotoIO/kaoto-next/issues/8) -* Put schema files into a Map to allow direct access with a schema name ([9cf8c4d](https://github.com/KaotoIO/kaoto-next/commit/9cf8c4d538908732b23198d394e0dcfa95f283ff)), closes [#148](https://github.com/KaotoIO/kaoto-next/issues/148) -* Remove kebab-case YAML schema in favor of camelCase one ([96b21e4](https://github.com/KaotoIO/kaoto-next/commit/96b21e48d1b483ce0dae46d6b28a53c02d1ebdad)), closes [#70](https://github.com/KaotoIO/kaoto-next/issues/70) -* Replace rm with rimraf to clean dist folder ([8133563](https://github.com/KaotoIO/kaoto-next/commit/81335630d329ea6b0e7c21a1d3c045ed89ff4e00)) - -### Features - -* Add camel catalog and schema ([bb8f3ad](https://github.com/KaotoIO/kaoto-next/commit/bb8f3ad9dadfe6fe71f22fe8dbb1986d23830986)) -* **camel-catalog:** export Typescript definitions from Camel Schemas ([a76985c](https://github.com/KaotoIO/kaoto-next/commit/a76985c78871f70ff8a15af97afe53970c26fc78)) -* **versioning:** Version and publish workflow ([98f9587](https://github.com/KaotoIO/kaoto-next/commit/98f95879076cd066d1e0cb83d9556468c1277e7a)) - -# 0.5.0 (2023-11-28) - -### Bug Fixes - -* Add kamelet:source and kamelet:sink to the catalog ([#429](https://github.com/KaotoIO/kaoto-next/issues/429)) ([69925af](https://github.com/KaotoIO/kaoto-next/commit/69925af7c4677e625f2e90760e98d0be740c5c88)), closes [#425](https://github.com/KaotoIO/kaoto-next/issues/425) -* **deps:** update dependency io.fabric8:kubernetes-model to v6.9.0 ([1923d4d](https://github.com/KaotoIO/kaoto-next/commit/1923d4d09a1d4122eb0455f937221205a27b4cd1)) -* **deps:** update dependency io.fabric8:kubernetes-model to v6.9.1 ([f812b71](https://github.com/KaotoIO/kaoto-next/commit/f812b7180688769308c7551085fccc714f1034ac)) -* **deps:** update dependency io.fabric8:kubernetes-model to v6.9.2 ([419c60f](https://github.com/KaotoIO/kaoto-next/commit/419c60fffa034a0eae01624d1e891ea525224407)) -* **deps:** update dependency org.apache.maven.plugin-tools:maven-plugin-annotations to v3.10.1 ([4157faa](https://github.com/KaotoIO/kaoto-next/commit/4157faa8426cdf7a6346cc9558f3674a73b0836e)) -* **deps:** update dependency org.apache.maven.plugin-tools:maven-plugin-annotations to v3.10.2 ([df62ce2](https://github.com/KaotoIO/kaoto-next/commit/df62ce2848e6beeafc5254f4e2acfc89ae65bf8c)) -* **deps:** update version.jackson to v2.15.3 ([c56e2a6](https://github.com/KaotoIO/kaoto-next/commit/c56e2a66db78c026d7707eded2e0c3d4439837a3)) -* **deps:** update version.jackson to v2.16.0 ([6f1910b](https://github.com/KaotoIO/kaoto-next/commit/6f1910ba6cc241d0fa932c1a3b1119ec80cb2b49)) -* Refactor @kaoto-next/camel-catalog ([e4796d2](https://github.com/KaotoIO/kaoto-next/commit/e4796d270a61d41615d7cdf5ea7dc2f396f6640a)), closes [#311](https://github.com/KaotoIO/kaoto-next/issues/311) [#316](https://github.com/KaotoIO/kaoto-next/issues/316) [#335](https://github.com/KaotoIO/kaoto-next/issues/335) [#311](https://github.com/KaotoIO/kaoto-next/issues/311) -* Support using camel catalog and schema in Jest tests ([365f7a0](https://github.com/KaotoIO/kaoto-next/commit/365f7a0172f3cbfeb9ea2f5c6b7c4074003bf75c)), closes [#310](https://github.com/KaotoIO/kaoto-next/issues/310) - -### Features - -* **catalog:** Minify Camel Catalog ([5c17105](https://github.com/KaotoIO/kaoto-next/commit/5c1710544af50f4f040ef7dcf94d69f801af2170)) -* Support configuring /PipeSpec/ErrorHandler ([1cd996f](https://github.com/KaotoIO/kaoto-next/commit/1cd996fb53a89ef41b23ba4b84c7b2e27095516f)), closes [#188](https://github.com/KaotoIO/kaoto-next/issues/188) -* Support configuring Camel K CR metadata ([#181](https://github.com/KaotoIO/kaoto-next/issues/181)) ([#226](https://github.com/KaotoIO/kaoto-next/issues/226)) ([31aba1a](https://github.com/KaotoIO/kaoto-next/commit/31aba1a9d2395665d2735f2f3740d300f638e98f)) -* Support configuring dataformat in Canvas form ([2a62d04](https://github.com/KaotoIO/kaoto-next/commit/2a62d04d070826f18bb7c5a01a3fd9ab2dd83534)), closes [#273](https://github.com/KaotoIO/kaoto-next/issues/273) - -# 0.2.0 (2023-10-05) - -### Bug Fixes - -* **build:** Build errors with node v20 ([1cdc56f](https://github.com/KaotoIO/kaoto-next/commit/1cdc56fe96e3e46a1ac84e3423193c6d5c6406dd)) -* **build:** Windows build ([b8d962e](https://github.com/KaotoIO/kaoto-next/commit/b8d962e0b86e4854277d354c53185a23e2ff9ed9)) -* Camel K CRD file extraction fails ([c633b07](https://github.com/KaotoIO/kaoto-next/commit/c633b07c419fad48f0e4b65b3f4a0687819aa4ba)), closes [#106](https://github.com/KaotoIO/kaoto-next/issues/106) -* Create sub schemas for each top properties ([#144](https://github.com/KaotoIO/kaoto-next/issues/144)) ([40efd4a](https://github.com/KaotoIO/kaoto-next/commit/40efd4a18af9e4da20394943979f5c2a58fe8e8f)), closes [#138](https://github.com/KaotoIO/kaoto-next/issues/138) -* **deps:** update dependency io.fabric8:kubernetes-model to v6.8.1 ([#32](https://github.com/KaotoIO/kaoto-next/issues/32)) ([e38f7ab](https://github.com/KaotoIO/kaoto-next/commit/e38f7abaca83504927ac5e5bee16f9a80f5a27f4)) -* **deps:** update dependency org.apache.maven:maven-plugin-api to v3.9.5 ([#191](https://github.com/KaotoIO/kaoto-next/issues/191)) ([598fd26](https://github.com/KaotoIO/kaoto-next/commit/598fd26665b08cba3692685dd5ac158245fc2fde)) -* Let UI use maven generated YAML DSL sub schema ([66bdd77](https://github.com/KaotoIO/kaoto-next/commit/66bdd7704c87d2d29c602d36557f10d5ddba5ba5)), closes [#147](https://github.com/KaotoIO/kaoto-next/issues/147) [#8](https://github.com/KaotoIO/kaoto-next/issues/8) -* Put schema files into a Map to allow direct access with a schema name ([9cf8c4d](https://github.com/KaotoIO/kaoto-next/commit/9cf8c4d538908732b23198d394e0dcfa95f283ff)), closes [#148](https://github.com/KaotoIO/kaoto-next/issues/148) -* Remove kebab-case YAML schema in favor of camelCase one ([96b21e4](https://github.com/KaotoIO/kaoto-next/commit/96b21e48d1b483ce0dae46d6b28a53c02d1ebdad)), closes [#70](https://github.com/KaotoIO/kaoto-next/issues/70) -* Replace rm with rimraf to clean dist folder ([8133563](https://github.com/KaotoIO/kaoto-next/commit/81335630d329ea6b0e7c21a1d3c045ed89ff4e00)) - -### Features - -* Add camel catalog and schema ([bb8f3ad](https://github.com/KaotoIO/kaoto-next/commit/bb8f3ad9dadfe6fe71f22fe8dbb1986d23830986)) -* **camel-catalog:** export Typescript definitions from Camel Schemas ([a76985c](https://github.com/KaotoIO/kaoto-next/commit/a76985c78871f70ff8a15af97afe53970c26fc78)) -* **versioning:** Version and publish workflow ([98f9587](https://github.com/KaotoIO/kaoto-next/commit/98f95879076cd066d1e0cb83d9556468c1277e7a)) - -# 0.4.0 (2023-11-24) - -### Bug Fixes - -* **deps:** update dependency io.fabric8:kubernetes-model to v6.9.0 ([1923d4d](https://github.com/KaotoIO/kaoto-next/commit/1923d4d09a1d4122eb0455f937221205a27b4cd1)) -* **deps:** update dependency io.fabric8:kubernetes-model to v6.9.1 ([f812b71](https://github.com/KaotoIO/kaoto-next/commit/f812b7180688769308c7551085fccc714f1034ac)) -* **deps:** update dependency io.fabric8:kubernetes-model to v6.9.2 ([419c60f](https://github.com/KaotoIO/kaoto-next/commit/419c60fffa034a0eae01624d1e891ea525224407)) -* **deps:** update dependency org.apache.maven.plugin-tools:maven-plugin-annotations to v3.10.1 ([4157faa](https://github.com/KaotoIO/kaoto-next/commit/4157faa8426cdf7a6346cc9558f3674a73b0836e)) -* **deps:** update dependency org.apache.maven.plugin-tools:maven-plugin-annotations to v3.10.2 ([df62ce2](https://github.com/KaotoIO/kaoto-next/commit/df62ce2848e6beeafc5254f4e2acfc89ae65bf8c)) -* **deps:** update version.jackson to v2.15.3 ([c56e2a6](https://github.com/KaotoIO/kaoto-next/commit/c56e2a66db78c026d7707eded2e0c3d4439837a3)) -* **deps:** update version.jackson to v2.16.0 ([6f1910b](https://github.com/KaotoIO/kaoto-next/commit/6f1910ba6cc241d0fa932c1a3b1119ec80cb2b49)) -* Refactor @kaoto-next/camel-catalog ([e4796d2](https://github.com/KaotoIO/kaoto-next/commit/e4796d270a61d41615d7cdf5ea7dc2f396f6640a)), closes [#311](https://github.com/KaotoIO/kaoto-next/issues/311) [#316](https://github.com/KaotoIO/kaoto-next/issues/316) [#335](https://github.com/KaotoIO/kaoto-next/issues/335) [#311](https://github.com/KaotoIO/kaoto-next/issues/311) -* Support using camel catalog and schema in Jest tests ([365f7a0](https://github.com/KaotoIO/kaoto-next/commit/365f7a0172f3cbfeb9ea2f5c6b7c4074003bf75c)), closes [#310](https://github.com/KaotoIO/kaoto-next/issues/310) - -### Features - -* **catalog:** Minify Camel Catalog ([5c17105](https://github.com/KaotoIO/kaoto-next/commit/5c1710544af50f4f040ef7dcf94d69f801af2170)) -* Support configuring /PipeSpec/ErrorHandler ([1cd996f](https://github.com/KaotoIO/kaoto-next/commit/1cd996fb53a89ef41b23ba4b84c7b2e27095516f)), closes [#188](https://github.com/KaotoIO/kaoto-next/issues/188) -* Support configuring Camel K CR metadata ([#181](https://github.com/KaotoIO/kaoto-next/issues/181)) ([#226](https://github.com/KaotoIO/kaoto-next/issues/226)) ([31aba1a](https://github.com/KaotoIO/kaoto-next/commit/31aba1a9d2395665d2735f2f3740d300f638e98f)) -* Support configuring dataformat in Canvas form ([2a62d04](https://github.com/KaotoIO/kaoto-next/commit/2a62d04d070826f18bb7c5a01a3fd9ab2dd83534)), closes [#273](https://github.com/KaotoIO/kaoto-next/issues/273) - -# 0.2.0 (2023-10-05) - -### Bug Fixes - -* **build:** Build errors with node v20 ([1cdc56f](https://github.com/KaotoIO/kaoto-next/commit/1cdc56fe96e3e46a1ac84e3423193c6d5c6406dd)) -* **build:** Windows build ([b8d962e](https://github.com/KaotoIO/kaoto-next/commit/b8d962e0b86e4854277d354c53185a23e2ff9ed9)) -* Camel K CRD file extraction fails ([c633b07](https://github.com/KaotoIO/kaoto-next/commit/c633b07c419fad48f0e4b65b3f4a0687819aa4ba)), closes [#106](https://github.com/KaotoIO/kaoto-next/issues/106) -* Create sub schemas for each top properties ([#144](https://github.com/KaotoIO/kaoto-next/issues/144)) ([40efd4a](https://github.com/KaotoIO/kaoto-next/commit/40efd4a18af9e4da20394943979f5c2a58fe8e8f)), closes [#138](https://github.com/KaotoIO/kaoto-next/issues/138) -* **deps:** update dependency io.fabric8:kubernetes-model to v6.8.1 ([#32](https://github.com/KaotoIO/kaoto-next/issues/32)) ([e38f7ab](https://github.com/KaotoIO/kaoto-next/commit/e38f7abaca83504927ac5e5bee16f9a80f5a27f4)) -* **deps:** update dependency org.apache.maven:maven-plugin-api to v3.9.5 ([#191](https://github.com/KaotoIO/kaoto-next/issues/191)) ([598fd26](https://github.com/KaotoIO/kaoto-next/commit/598fd26665b08cba3692685dd5ac158245fc2fde)) -* Let UI use maven generated YAML DSL sub schema ([66bdd77](https://github.com/KaotoIO/kaoto-next/commit/66bdd7704c87d2d29c602d36557f10d5ddba5ba5)), closes [#147](https://github.com/KaotoIO/kaoto-next/issues/147) [#8](https://github.com/KaotoIO/kaoto-next/issues/8) -* Put schema files into a Map to allow direct access with a schema name ([9cf8c4d](https://github.com/KaotoIO/kaoto-next/commit/9cf8c4d538908732b23198d394e0dcfa95f283ff)), closes [#148](https://github.com/KaotoIO/kaoto-next/issues/148) -* Remove kebab-case YAML schema in favor of camelCase one ([96b21e4](https://github.com/KaotoIO/kaoto-next/commit/96b21e48d1b483ce0dae46d6b28a53c02d1ebdad)), closes [#70](https://github.com/KaotoIO/kaoto-next/issues/70) -* Replace rm with rimraf to clean dist folder ([8133563](https://github.com/KaotoIO/kaoto-next/commit/81335630d329ea6b0e7c21a1d3c045ed89ff4e00)) - -### Features - -* Add camel catalog and schema ([bb8f3ad](https://github.com/KaotoIO/kaoto-next/commit/bb8f3ad9dadfe6fe71f22fe8dbb1986d23830986)) -* **camel-catalog:** export Typescript definitions from Camel Schemas ([a76985c](https://github.com/KaotoIO/kaoto-next/commit/a76985c78871f70ff8a15af97afe53970c26fc78)) -* **versioning:** Version and publish workflow ([98f9587](https://github.com/KaotoIO/kaoto-next/commit/98f95879076cd066d1e0cb83d9556468c1277e7a)) - -# 0.3.0 (2023-11-22) - -### Bug Fixes - -* **deps:** update dependency io.fabric8:kubernetes-model to v6.9.0 ([1923d4d](https://github.com/KaotoIO/kaoto-next/commit/1923d4d09a1d4122eb0455f937221205a27b4cd1)) -* **deps:** update dependency io.fabric8:kubernetes-model to v6.9.1 ([f812b71](https://github.com/KaotoIO/kaoto-next/commit/f812b7180688769308c7551085fccc714f1034ac)) -* **deps:** update dependency io.fabric8:kubernetes-model to v6.9.2 ([419c60f](https://github.com/KaotoIO/kaoto-next/commit/419c60fffa034a0eae01624d1e891ea525224407)) -* **deps:** update dependency org.apache.maven.plugin-tools:maven-plugin-annotations to v3.10.1 ([4157faa](https://github.com/KaotoIO/kaoto-next/commit/4157faa8426cdf7a6346cc9558f3674a73b0836e)) -* **deps:** update dependency org.apache.maven.plugin-tools:maven-plugin-annotations to v3.10.2 ([df62ce2](https://github.com/KaotoIO/kaoto-next/commit/df62ce2848e6beeafc5254f4e2acfc89ae65bf8c)) -* **deps:** update version.jackson to v2.15.3 ([c56e2a6](https://github.com/KaotoIO/kaoto-next/commit/c56e2a66db78c026d7707eded2e0c3d4439837a3)) -* **deps:** update version.jackson to v2.16.0 ([6f1910b](https://github.com/KaotoIO/kaoto-next/commit/6f1910ba6cc241d0fa932c1a3b1119ec80cb2b49)) -* Refactor @kaoto-next/camel-catalog ([e4796d2](https://github.com/KaotoIO/kaoto-next/commit/e4796d270a61d41615d7cdf5ea7dc2f396f6640a)), closes [#311](https://github.com/KaotoIO/kaoto-next/issues/311) [#316](https://github.com/KaotoIO/kaoto-next/issues/316) [#335](https://github.com/KaotoIO/kaoto-next/issues/335) [#311](https://github.com/KaotoIO/kaoto-next/issues/311) -* Support using camel catalog and schema in Jest tests ([365f7a0](https://github.com/KaotoIO/kaoto-next/commit/365f7a0172f3cbfeb9ea2f5c6b7c4074003bf75c)), closes [#310](https://github.com/KaotoIO/kaoto-next/issues/310) - -### Features - -* **catalog:** Minify Camel Catalog ([5c17105](https://github.com/KaotoIO/kaoto-next/commit/5c1710544af50f4f040ef7dcf94d69f801af2170)) -* Support configuring /PipeSpec/ErrorHandler ([1cd996f](https://github.com/KaotoIO/kaoto-next/commit/1cd996fb53a89ef41b23ba4b84c7b2e27095516f)), closes [#188](https://github.com/KaotoIO/kaoto-next/issues/188) -* Support configuring Camel K CR metadata ([#181](https://github.com/KaotoIO/kaoto-next/issues/181)) ([#226](https://github.com/KaotoIO/kaoto-next/issues/226)) ([31aba1a](https://github.com/KaotoIO/kaoto-next/commit/31aba1a9d2395665d2735f2f3740d300f638e98f)) -* Support configuring dataformat in Canvas form ([2a62d04](https://github.com/KaotoIO/kaoto-next/commit/2a62d04d070826f18bb7c5a01a3fd9ab2dd83534)), closes [#273](https://github.com/KaotoIO/kaoto-next/issues/273) - -# 0.2.0 (2023-10-05) - -### Bug Fixes - -* **build:** Build errors with node v20 ([1cdc56f](https://github.com/KaotoIO/kaoto-next/commit/1cdc56fe96e3e46a1ac84e3423193c6d5c6406dd)) -* **build:** Windows build ([b8d962e](https://github.com/KaotoIO/kaoto-next/commit/b8d962e0b86e4854277d354c53185a23e2ff9ed9)) -* Camel K CRD file extraction fails ([c633b07](https://github.com/KaotoIO/kaoto-next/commit/c633b07c419fad48f0e4b65b3f4a0687819aa4ba)), closes [#106](https://github.com/KaotoIO/kaoto-next/issues/106) -* Create sub schemas for each top properties ([#144](https://github.com/KaotoIO/kaoto-next/issues/144)) ([40efd4a](https://github.com/KaotoIO/kaoto-next/commit/40efd4a18af9e4da20394943979f5c2a58fe8e8f)), closes [#138](https://github.com/KaotoIO/kaoto-next/issues/138) -* **deps:** update dependency io.fabric8:kubernetes-model to v6.8.1 ([#32](https://github.com/KaotoIO/kaoto-next/issues/32)) ([e38f7ab](https://github.com/KaotoIO/kaoto-next/commit/e38f7abaca83504927ac5e5bee16f9a80f5a27f4)) -* **deps:** update dependency org.apache.maven:maven-plugin-api to v3.9.5 ([#191](https://github.com/KaotoIO/kaoto-next/issues/191)) ([598fd26](https://github.com/KaotoIO/kaoto-next/commit/598fd26665b08cba3692685dd5ac158245fc2fde)) -* Let UI use maven generated YAML DSL sub schema ([66bdd77](https://github.com/KaotoIO/kaoto-next/commit/66bdd7704c87d2d29c602d36557f10d5ddba5ba5)), closes [#147](https://github.com/KaotoIO/kaoto-next/issues/147) [#8](https://github.com/KaotoIO/kaoto-next/issues/8) -* Put schema files into a Map to allow direct access with a schema name ([9cf8c4d](https://github.com/KaotoIO/kaoto-next/commit/9cf8c4d538908732b23198d394e0dcfa95f283ff)), closes [#148](https://github.com/KaotoIO/kaoto-next/issues/148) -* Remove kebab-case YAML schema in favor of camelCase one ([96b21e4](https://github.com/KaotoIO/kaoto-next/commit/96b21e48d1b483ce0dae46d6b28a53c02d1ebdad)), closes [#70](https://github.com/KaotoIO/kaoto-next/issues/70) -* Replace rm with rimraf to clean dist folder ([8133563](https://github.com/KaotoIO/kaoto-next/commit/81335630d329ea6b0e7c21a1d3c045ed89ff4e00)) - -### Features - -* Add camel catalog and schema ([bb8f3ad](https://github.com/KaotoIO/kaoto-next/commit/bb8f3ad9dadfe6fe71f22fe8dbb1986d23830986)) -* **camel-catalog:** export Typescript definitions from Camel Schemas ([a76985c](https://github.com/KaotoIO/kaoto-next/commit/a76985c78871f70ff8a15af97afe53970c26fc78)) -* **versioning:** Version and publish workflow ([98f9587](https://github.com/KaotoIO/kaoto-next/commit/98f95879076cd066d1e0cb83d9556468c1277e7a)) - -# 0.1.0 (2023-10-05) - -### Bug Fixes - -* **build:** Build errors with node v20 ([1cdc56f](https://github.com/KaotoIO/kaoto-next/commit/1cdc56fe96e3e46a1ac84e3423193c6d5c6406dd)) -* **build:** Windows build ([b8d962e](https://github.com/KaotoIO/kaoto-next/commit/b8d962e0b86e4854277d354c53185a23e2ff9ed9)) -* Camel K CRD file extraction fails ([c633b07](https://github.com/KaotoIO/kaoto-next/commit/c633b07c419fad48f0e4b65b3f4a0687819aa4ba)), closes [#106](https://github.com/KaotoIO/kaoto-next/issues/106) -* Create sub schemas for each top properties ([#144](https://github.com/KaotoIO/kaoto-next/issues/144)) ([40efd4a](https://github.com/KaotoIO/kaoto-next/commit/40efd4a18af9e4da20394943979f5c2a58fe8e8f)), closes [#138](https://github.com/KaotoIO/kaoto-next/issues/138) -* **deps:** update dependency io.fabric8:kubernetes-model to v6.8.1 ([#32](https://github.com/KaotoIO/kaoto-next/issues/32)) ([e38f7ab](https://github.com/KaotoIO/kaoto-next/commit/e38f7abaca83504927ac5e5bee16f9a80f5a27f4)) -* **deps:** update dependency org.apache.maven:maven-plugin-api to v3.9.5 ([#191](https://github.com/KaotoIO/kaoto-next/issues/191)) ([598fd26](https://github.com/KaotoIO/kaoto-next/commit/598fd26665b08cba3692685dd5ac158245fc2fde)) -* Let UI use maven generated YAML DSL sub schema ([66bdd77](https://github.com/KaotoIO/kaoto-next/commit/66bdd7704c87d2d29c602d36557f10d5ddba5ba5)), closes [#147](https://github.com/KaotoIO/kaoto-next/issues/147) [#8](https://github.com/KaotoIO/kaoto-next/issues/8) -* Put schema files into a Map to allow direct access with a schema name ([9cf8c4d](https://github.com/KaotoIO/kaoto-next/commit/9cf8c4d538908732b23198d394e0dcfa95f283ff)), closes [#148](https://github.com/KaotoIO/kaoto-next/issues/148) -* Remove kebab-case YAML schema in favor of camelCase one ([96b21e4](https://github.com/KaotoIO/kaoto-next/commit/96b21e48d1b483ce0dae46d6b28a53c02d1ebdad)), closes [#70](https://github.com/KaotoIO/kaoto-next/issues/70) -* Replace rm with rimraf to clean dist folder ([8133563](https://github.com/KaotoIO/kaoto-next/commit/81335630d329ea6b0e7c21a1d3c045ed89ff4e00)) - -### Features - -* Add camel catalog and schema ([bb8f3ad](https://github.com/KaotoIO/kaoto-next/commit/bb8f3ad9dadfe6fe71f22fe8dbb1986d23830986)) -* **camel-catalog:** export Typescript definitions from Camel Schemas ([a76985c](https://github.com/KaotoIO/kaoto-next/commit/a76985c78871f70ff8a15af97afe53970c26fc78)) -* **versioning:** Version and publish workflow ([98f9587](https://github.com/KaotoIO/kaoto-next/commit/98f95879076cd066d1e0cb83d9556468c1277e7a)) diff --git a/packages/camel-catalog/assembly/pom.xml b/packages/camel-catalog/assembly/pom.xml deleted file mode 100644 index 54b83504e..000000000 --- a/packages/camel-catalog/assembly/pom.xml +++ /dev/null @@ -1,223 +0,0 @@ - - 4.0.0 - - io.kaoto - kaoto-camel-catalog-parent - 0.0.1-SNAPSHOT - ../pom.xml - - kaoto-camel-catalog - pom - kaoto-camel-catalog - - The Kaoto catalog collection generated from the Apache Camel catalog and YAML DSL schema. - - https://kaoto.io - - - ${project.build.directory}/camel - ${project.build.directory}/../../dist - - - - - org.apache.camel - camel-yaml-dsl-deserializers - - - org.junit.jupiter - junit-jupiter-api - test - - - org.junit.jupiter - junit-jupiter-engine - test - - - com.fasterxml.jackson.core - jackson-databind - test - - - com.fasterxml.jackson.dataformat - jackson-dataformat-yaml - test - - - - - - - maven-dependency-plugin - ${version.maven-dependency-plugin} - - - Unpack Camel Artifacts - process-sources - - unpack - - - - - - - org.apache.camel.kamelets - camel-kamelets - ${version.camel-kamelets} - ${inputDirectory} - kamelets/* - - - org.apache.camel.k - camel-k-crds - ${version.camel-k-crds} - ${inputDirectory}/crds - - camel.apache.org_integrations.yaml, - camel.apache.org_kameletbindings.yaml, - camel.apache.org_kamelets.yaml, - camel.apache.org_pipes.yaml - - - - - - - maven-antrun-plugin - - - Download Kubernetes API OpenAPI v3 Specification - process-sources - - run - - - - - - - - - - - org.apache.camel - camel-yaml-dsl-maven-plugin - - - - generate-yaml-schema-camelCase - generate-sources - - generate-yaml-schema - - - false - false - ${inputDirectory}/schema/camelYamlDsl.json - - - - - - maven-resources-plugin - - - Copy additional schema files - process-sources - - copy-resources - - - ${inputDirectory}/schema - - - ${basedir}/src/main/resources/schemas - - - - - - Copy additional kamelet files - process-sources - - copy-resources - - - ${inputDirectory}/kamelets - - - ${basedir}/src/main/resources/kamelets - - - - - - - - io.kaoto - kaoto-camel-catalog-maven-plugin - - - Tailor Camel catalog and schema files for Kaoto - process-sources - - generate-kaoto-camel-catalog - - - ${inputDirectory} - ${outputDirectory} - ${version.camel} - ${version.camel-k-crds} - ${version.camel-kamelets} - true - - io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - io.k8s.api.core.v1.ObjectReference - - - - ${inputDirectory}/schema/PipeErrorHandler.json - ${inputDirectory}/schema/KameletConfiguration.json - ${inputDirectory}/schema/PipeConfiguration.json - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - - - testCompile - - testCompile - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - - test - - test - - - - - - - diff --git a/packages/camel-catalog/assembly/src/main/resources/kamelets/boundaries/sink.json b/packages/camel-catalog/assembly/src/main/resources/kamelets/boundaries/sink.json deleted file mode 100644 index defa757ee..000000000 --- a/packages/camel-catalog/assembly/src/main/resources/kamelets/boundaries/sink.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "apiVersion": "camel.apache.org/v1", - "kind": "Kamelet", - "metadata": { - "name": "sink", - "annotations": { - "camel.apache.org/kamelet.support.level": "Stable", - "camel.apache.org/catalog.version": "0.0.0", - "camel.apache.org/kamelet.icon": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTI4IiBoZWlnaHQ9IjEyOCI+PGRlZnM+PHJhZGlhbEdyYWRpZW50IGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIiByPSIxMTYuNzgxIiBjeT0iMTIyLjY4NiIgY3g9IjgwLjY3MSIgaWQ9ImQiPjxzdG9wIHN0b3AtY29sb3I9IiNmZmU5Y2EiIG9mZnNldD0iMCIvPjxzdG9wIHN0b3AtY29sb3I9IiNmZjk2MDAiIG9mZnNldD0iMSIvPjwvcmFkaWFsR3JhZGllbnQ+PGxpbmVhckdyYWRpZW50IGlkPSJhIj48c3RvcCBzdG9wLWNvbG9yPSIjYzc3NTAwIiBvZmZzZXQ9IjAiLz48c3Rvc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Nzc5djgyLjY0Mkg1LjgzNXoiLz48cGF0aCBkPSJNOTEuNjYgODguODczSDIuNzg5VjBoODguODczeiIgZmlsbD0ibm9uZSIvPjwvc3ZnPg==", - "camel.apache.org/provider": "Kaoto", - "camel.apache.org/kamelet.group": "Sink", - "camel.apache.org/kamelet.namespace": "" - }, - "labels": { - "camel.apache.org/kamelet.type": "sink" - } - }, - "spec": { - "definition": { - "title": "Kamelet Sink", - "description": "All source kamelets must end with this sink step.", - "required": [], - "type": "object", - "properties": {} - }, - "dependencies": ["camel:core"], - "template": { - "from": { - "uri": "kamelet:sink", - "steps": [] - } - } - } -} diff --git a/packages/camel-catalog/assembly/src/main/resources/kamelets/boundaries/source.json b/packages/camel-catalog/assembly/src/main/resources/kamelets/boundaries/source.json deleted file mode 100644 index 9a883b449..000000000 --- a/packages/camel-catalog/assembly/src/main/resources/kamelets/boundaries/source.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "apiVersion": "camel.apache.org/v1", - "kind": "Kamelet", - "metadata": { - "name": "source", - "annotations": { - "camel.apache.org/kamelet.support.level": "Stable", - "camel.apache.org/catalog.version": "0.0.0", - "camel.apache.org/kamelet.icon": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTI4IiBoZWlnaHQ9IjEyOCI+PGRlZnM+PHJhZGlhbEdyYWRpZW50IGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIiByPSIxMTYuNzgxIiBjeT0iMTIyLjY4NiIgY3g9IjgwLjY3MSIgaWQ9ImQiPjxzdG9wIHN0b3AtY29sb3I9IiNmZmU5Y2EiIG9mZnNldD0iMCIvPjxzdG9wIHN0b3AtY29sb3I9IiNmZjk2MDAiIG9mZnNldD0iMSIvPjwvcmFkaWFsR3JhZGllbnQ+PGxpbmVhckdyYWRpZW50I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pbGw9Im5vbmUiLz48cGF0aCBmaWxsPSJ1cmwoI0IpIiBkPSJNNS44MzUgMy4xMTVoODIuNzc5djgyLjY0Mkg1LjgzNXoiLz48cGF0aCBkPSJNOTEuNjYgODguODczSDIuNzg5VjBoODguODczeiIgZmlsbD0ibm9uZSIvPjwvc3ZnPg==", - "camel.apache.org/provider": "Kaoto", - "camel.apache.org/kamelet.group": "Source", - "camel.apache.org/kamelet.namespace": "" - }, - "labels": { - "camel.apache.org/kamelet.type": "source" - } - }, - "spec": { - "definition": { - "title": "Kamelet Source", - "description": "All sink kamelets must start with this source step.", - "required": [], - "type": "object", - "properties": {} - }, - "dependencies": ["camel:core"], - "template": { - "from": { - "uri": "kamelet:source", - "steps": [] - } - } - } -} diff --git a/packages/camel-catalog/assembly/src/main/resources/schemas/KameletConfiguration.json b/packages/camel-catalog/assembly/src/main/resources/schemas/KameletConfiguration.json deleted file mode 100644 index 4e747bae9..000000000 --- a/packages/camel-catalog/assembly/src/main/resources/schemas/KameletConfiguration.json +++ /dev/null @@ -1,138 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-04/schema#", - "type": "object", - "additionalProperties": false, - "description": "Schema for Kamelet configuration", - "properties": { - "name": { - "title": "Name", - "description": "Name of the kamelet", - "type": "string" - }, - "title": { - "title": "Title", - "description": "Title of the kamelet", - "type": "string" - }, - "description": { - "title": "Description", - "description": "Formal description of the kamelet", - "type": "string" - }, - "type": { - "title": "Kamelet Type", - "description": "Select the Kamelet type from the available options", - "type": "string", - "enum": [ - "source", - "action", - "sink" - ] - }, - "icon": { - "title": "Kamelet Icon", - "description": "Choose icon for the kamelet", - "type": "string" - }, - "supportLevel": { - "title": "Support Level", - "description": "Support Level of the kamelet", - "type": "string" - }, - "catalogVersion": { - "title": "Catalog Version", - "description": "Catalog Version of the kamelet", - "type": "string" - }, - "provider": { - "title": "Provider", - "description": "Provider of the kamelet", - "type": "string" - }, - "group": { - "title": "Group", - "description": "Group of the kamelet", - "type": "string" - }, - "namespace": { - "title": "Namespace", - "description": "Namespace of the kamelet", - "type": "string" - }, - "labels": { - "additionalProperties": { - "default": "", - "type": "string" - }, - "title": "Additional Labels", - "description": "Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels", - "type": "object" - }, - "annotations": { - "additionalProperties": { - "default": "", - "type": "string" - }, - "title": "Additional Annotations", - "description": "Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations", - "type": "object" - }, - "kameletProperties": { - "title": "Properties", - "type": "array", - "description": "Configure properties on the Kamelet", - "items": { - "type": "object", - "properties": { - "name": { - "title": "Property name", - "description": "Name of the property", - "type": "string" - }, - "title": { - "title": "Title", - "description": "Display name of the property", - "type": "string" - }, - "description": { - "title": "Description", - "description": "Simple text description of the property", - "type": "string" - }, - "type": { - "title": "Property type", - "description": "Set the expected type for this property", - "type": "string", - "enum": [ - "string", - "number", - "boolean" - ], - "default": "string" - }, - "default": { - "title": "Default", - "description": "Default value for the property", - "type": "string" - }, - "x-descriptors": { - "title": "X-descriptors", - "description": "Specific aids for the visual tools", - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "name", - "type" - ] - } - } - }, - "required": [ - "name", - "type" - ] -} diff --git a/packages/camel-catalog/assembly/src/main/resources/schemas/PipeConfiguration.json b/packages/camel-catalog/assembly/src/main/resources/schemas/PipeConfiguration.json deleted file mode 100644 index 0c349559c..000000000 --- a/packages/camel-catalog/assembly/src/main/resources/schemas/PipeConfiguration.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-04/schema#", - "type": "object", - "additionalProperties": false, - "description": "Schema for Pipe configuration", - "properties": { - "name": { - "title": "Name", - "description": "Name of the Pipe", - "type": "string" - }, - "labels": { - "additionalProperties": { - "default": "", - "type": "string" - }, - "title": "Labels", - "description": "Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels", - "type": "object" - }, - "annotations": { - "additionalProperties": { - "default": "", - "type": "string" - }, - "title": "Annotations", - "description": "Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations", - "type": "object" - } - }, - "required": [ - "name" - ] -} diff --git a/packages/camel-catalog/assembly/src/main/resources/schemas/PipeErrorHandler.json b/packages/camel-catalog/assembly/src/main/resources/schemas/PipeErrorHandler.json deleted file mode 100644 index 711ede51d..000000000 --- a/packages/camel-catalog/assembly/src/main/resources/schemas/PipeErrorHandler.json +++ /dev/null @@ -1,110 +0,0 @@ -{ - "$schema" : "http://json-schema.org/draft-07/schema#", - "type" : "object", - "additionalProperties" : false, - "description": "Camel K Pipe ErrorHandler. See https://camel.apache.org/camel-k/latest/pipe-step.html#_error_handler for more details.", - "oneOf" : [ { - "title": "No Pipe ErrorHandler", - "type": "object", - "properties" : { - "none" : { - "type" : "object" - } - }, - "required" : [ "none" ] - }, { - "title": "Log Pipe ErrorHandler", - "type": "object", - "properties" : { - "log": { - "type": "object", - "additionalProperties": false, - "properties": { - "parameters": { - "type": "object", - "properties": { - "maximumRedeliveries": { - "type": "number", - "description" : "Sets the maximum redeliveries x = redeliver at most x times 0 = no redeliveries -1 = redeliver forever" - }, - "redeliveryDelay": { - "type": "number", - "description" : "Sets the maximum delay between redelivery" - } - }, - "additionalProperties": { - "type": "string" - } - } - } - } - }, - "required" : [ "log" ] - }, { - "title": "Sink Pipe ErrorHandler", - "type": "object", - "properties" : { - "sink": { - "type": "object", - "additionalProperties": false, - "properties": { - "endpoint": { - "type": "object", - "additionalProperties": false, - "properties": { - "ref": { - "type": "object", - "additionalProperties": false, - "properties": { - "kind": { - "type": "string" - }, - "apiVersion": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "required": [ "kind", "apiVersion", "name" ] - }, - "properties": { - "type": "object", - "properties": { - "message": { - "type": "string" - }, - "additionalProperties": { - "type": "string" - } - } - } - } - }, - "parameters": { - "type": "object", - "properties": { - "maximumRedeliveries": { - "type": "number", - "description" : "Sets the maximum redeliveries x = redeliver at most x times 0 = no redeliveries -1 = redeliver forever" - }, - "redeliveryDelay": { - "type": "number", - "description" : "Sets the maximum delay between redelivery" - } - }, - "additionalProperties": { - "type": "string" - } - } - } - } - }, - "required" : [ "sink" ] - }], - "properties": { - "none": {}, - "log": {}, - "sink": {} - } -} diff --git a/packages/camel-catalog/assembly/src/test/java/io/kaoto/camelcatalog/CamelCatalogTestSupport.java b/packages/camel-catalog/assembly/src/test/java/io/kaoto/camelcatalog/CamelCatalogTestSupport.java deleted file mode 100644 index 3ae6e83b0..000000000 --- a/packages/camel-catalog/assembly/src/test/java/io/kaoto/camelcatalog/CamelCatalogTestSupport.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (C) 2023 Red Hat, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package io.kaoto.camelcatalog; - -import com.fasterxml.jackson.core.JsonFactory; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.node.ObjectNode; -import com.fasterxml.jackson.dataformat.yaml.YAMLFactory; - -import java.nio.file.Paths; - -public abstract class CamelCatalogTestSupport { - protected static final ObjectMapper jsonMapper = new ObjectMapper(); - protected static final ObjectMapper yamlMapper = new ObjectMapper(new YAMLFactory()); - protected static final JsonFactory jsonFactory = new JsonFactory(); - - private static ObjectNode index = null; - - protected ObjectNode getIndex() throws Exception { - if (CamelCatalogTestSupport.index == null) { - var path = Paths.get("..").resolve("dist").resolve("index.json"); - CamelCatalogTestSupport.index = (ObjectNode) jsonMapper.readTree(path.toFile()); - } - return CamelCatalogTestSupport.index; - } - - protected ObjectNode getSchema(String name) throws Exception { - var schema = getIndex().withObject("/schemas").withObject("/" + name); - return (ObjectNode) jsonMapper.readTree( - Paths.get("..").resolve("dist").resolve(schema.get("file").asText()).toFile()); - } - - protected ObjectNode getCatalog(String name) throws Exception { - var catalog = getIndex().withObject("/catalogs").withObject("/" + name); - return (ObjectNode) jsonMapper.readTree( - Paths.get("..").resolve("dist").resolve(catalog.get("file").asText()).toFile()); - } -} diff --git a/packages/camel-catalog/assembly/src/test/java/io/kaoto/camelcatalog/CamelYamlDslSchemaTest.java b/packages/camel-catalog/assembly/src/test/java/io/kaoto/camelcatalog/CamelYamlDslSchemaTest.java deleted file mode 100644 index 928bc7568..000000000 --- a/packages/camel-catalog/assembly/src/test/java/io/kaoto/camelcatalog/CamelYamlDslSchemaTest.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (C) 2023 Red Hat, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package io.kaoto.camelcatalog; - -import org.junit.jupiter.api.Test; - -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertTrue; - -public class CamelYamlDslSchemaTest extends CamelCatalogTestSupport { - - @Test - public void testRootSchema() throws Exception { - var rootSchema = getSchema("camelYamlDsl"); - assertEquals(rootSchema.get("type").asText(), "array"); - var definitions = rootSchema.withObject("/items").withObject("/definitions"); - assertTrue(definitions.has("org.apache.camel.model.ProcessorDefinition")); - } - - @Test - public void testBeans() throws Exception { - var beansSchema = getSchema("beans"); - assertEquals(beansSchema.get("type").asText(), "array"); - var definitions = beansSchema.withObject("/definitions"); - assertEquals(1, definitions.size()); - assertTrue(definitions.has("org.apache.camel.model.BeanFactoryDefinition")); - } -} diff --git a/packages/camel-catalog/assembly/src/test/java/io/kaoto/camelcatalog/IndexTest.java b/packages/camel-catalog/assembly/src/test/java/io/kaoto/camelcatalog/IndexTest.java deleted file mode 100644 index 170137d82..000000000 --- a/packages/camel-catalog/assembly/src/test/java/io/kaoto/camelcatalog/IndexTest.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (C) 2023 Red Hat, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package io.kaoto.camelcatalog; - -import org.junit.jupiter.api.Test; - -import static org.junit.jupiter.api.Assertions.assertTrue; - -public class IndexTest extends CamelCatalogTestSupport { - - @Test - public void test() throws Exception { - var index = getIndex(); - assertTrue(index.has("catalogs")); - var catalogs = index.withObject("/catalogs"); - assertTrue(catalogs.has("models")); - assertTrue(catalogs.has("components")); - assertTrue(catalogs.has("languages")); - assertTrue(catalogs.has("kamelets")); - assertTrue(catalogs.has("kameletBoundaries")); - assertTrue(catalogs.has("dataformats")); - assertTrue(index.has("schemas")); - var schemas = index.withObject("/schemas"); - assertTrue(schemas.has("camelYamlDsl")); - assertTrue(schemas.has("beans")); - assertTrue(schemas.has("errorHandler")); - assertTrue(schemas.has("from")); - assertTrue(schemas.has("intercept")); - assertTrue(schemas.has("interceptFrom")); - assertTrue(schemas.has("interceptSendToEndpoint")); - assertTrue(schemas.has("onCompletion")); - assertTrue(schemas.has("onException")); - assertTrue(schemas.has("rest")); - assertTrue(schemas.has("restConfiguration")); - assertTrue(schemas.has("route")); - assertTrue(schemas.has("routeConfiguration")); - assertTrue(schemas.has("routeTemplate")); - assertTrue(schemas.has("templatedRoute")); - assertTrue(schemas.has("Integration")); - assertTrue(schemas.has("Kamelet")); - assertTrue(schemas.has("KameletBinding")); - assertTrue(schemas.has("Pipe")); - } -} diff --git a/packages/camel-catalog/assembly/src/test/java/io/kaoto/camelcatalog/KameletCatalogTest.java b/packages/camel-catalog/assembly/src/test/java/io/kaoto/camelcatalog/KameletCatalogTest.java deleted file mode 100644 index c47512868..000000000 --- a/packages/camel-catalog/assembly/src/test/java/io/kaoto/camelcatalog/KameletCatalogTest.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (C) 2023 Red Hat, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package io.kaoto.camelcatalog; - -import org.junit.jupiter.api.Test; - -import static org.junit.jupiter.api.Assertions.*; - -public class KameletCatalogTest extends CamelCatalogTestSupport { - - @Test - public void testKameletCatalog() throws Exception { - var kameletsCatalog = getCatalog("kamelets"); - assertTrue(kameletsCatalog.has("kafka-source")); - assertFalse(kameletsCatalog.has("source")); - assertFalse(kameletsCatalog.has("sink")); - } - - @Test - public void testKameletBoundariesCatalog() throws Exception { - var kameletsBoundariesCatalog = getCatalog("kameletBoundaries"); - assertFalse(kameletsBoundariesCatalog.has("kafka-source")); - assertTrue(kameletsBoundariesCatalog.has("source")); - assertTrue(kameletsBoundariesCatalog.has("sink")); - } -} diff --git a/packages/camel-catalog/eslint.config.mjs b/packages/camel-catalog/eslint.config.mjs deleted file mode 100644 index 9bcfc2b36..000000000 --- a/packages/camel-catalog/eslint.config.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// @ts-check -import rootConfig from '../../eslint.config.mjs'; - -export default [...rootConfig]; diff --git a/packages/camel-catalog/kaoto-camel-catalog-maven-plugin/pom.xml b/packages/camel-catalog/kaoto-camel-catalog-maven-plugin/pom.xml deleted file mode 100644 index d33792477..000000000 --- a/packages/camel-catalog/kaoto-camel-catalog-maven-plugin/pom.xml +++ /dev/null @@ -1,108 +0,0 @@ - - 4.0.0 - - io.kaoto - kaoto-camel-catalog-parent - 0.0.1-SNAPSHOT - ../pom.xml - - - kaoto-camel-catalog-maven-plugin - maven-plugin - kaoto-camel-catalog-maven-plugin - - The maven plugin to generate a set of Camel catalog and schema files to be used in Kaoto. - - https://kaoto.io - - - - org.apache.maven - maven-plugin-api - provided - - - org.apache.maven.plugin-tools - maven-plugin-annotations - - - com.fasterxml.jackson.core - jackson-databind - - - com.fasterxml.jackson.dataformat - jackson-dataformat-yaml - - - io.fabric8 - kubernetes-model - - - org.apache.camel - camel-catalog - - - - org.apache.camel - camel-yaml-dsl - test - - - org.apache.camel.kamelets - camel-kamelets - test - - - org.junit.jupiter - junit-jupiter-api - test - - - org.junit.jupiter - junit-jupiter-engine - test - - - - - - - maven-plugin-plugin - - - org.apache.maven:maven-plugin-api - - - - - cz.habarta.typescript-generator - typescript-generator-maven-plugin - 3.2.1263 - - - generate - process-classes - - generate - - - - - jackson2 - false - module - declarationFile - true - true - perResource - - ../dist/types/catalog-index.d.ts - - io.kaoto.camelcatalog.Index - - - - - - diff --git a/packages/camel-catalog/kaoto-camel-catalog-maven-plugin/src/main/java/io/kaoto/camelcatalog/CamelCatalogProcessor.java b/packages/camel-catalog/kaoto-camel-catalog-maven-plugin/src/main/java/io/kaoto/camelcatalog/CamelCatalogProcessor.java deleted file mode 100644 index 55fb2c788..000000000 --- a/packages/camel-catalog/kaoto-camel-catalog-maven-plugin/src/main/java/io/kaoto/camelcatalog/CamelCatalogProcessor.java +++ /dev/null @@ -1,585 +0,0 @@ -/* - * Copyright (C) 2023 Red Hat, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package io.kaoto.camelcatalog; - -import com.fasterxml.jackson.core.JsonFactory; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.node.ObjectNode; -import org.apache.camel.catalog.DefaultCamelCatalog; -import org.apache.camel.tooling.model.ComponentModel; -import org.apache.camel.tooling.model.EipModel; -import org.apache.camel.tooling.model.JsonMapper; -import org.apache.camel.tooling.model.Kind; - -import java.io.InputStream; -import java.io.StringWriter; -import java.util.*; - -/** - * Customize Camel Catalog for Kaoto. - */ -public class CamelCatalogProcessor { - private static final String TO_DYNAMIC_DEFINITION = "org.apache.camel.model.ToDynamicDefinition"; - private static final String SET_HEADERS_DEFINITION = "org.apache.camel.model.SetHeadersDefinition"; - private static final String SET_VARIABLES_DEFINITION = "org.apache.camel.model.SetVariablesDefinition"; - private final ObjectMapper jsonMapper; - private final DefaultCamelCatalog api; - private final CamelYamlDslSchemaProcessor schemaProcessor; - - public CamelCatalogProcessor(ObjectMapper jsonMapper, CamelYamlDslSchemaProcessor schemaProcessor) { - this.jsonMapper = jsonMapper; - this.api = new DefaultCamelCatalog(); - this.schemaProcessor = schemaProcessor; - } - - /** - * Create Camel catalogs customized for Kaoto usage. - * @return - */ - public Map processCatalog() throws Exception { - var answer = new LinkedHashMap(); - var componentCatalog = getComponentCatalog(); - var dataFormatCatalog = getDataFormatCatalog(); - var languageCatalog = getLanguageCatalog(); - var modelCatalog = getModelCatalog(); - var patternCatalog = getPatternCatalog(); - var entityCatalog = getEntityCatalog(); - var loadBalancerCatalog = getLoadBalancerCatalog(); - answer.put("components", componentCatalog); - answer.put("dataformats", dataFormatCatalog); - answer.put("languages", languageCatalog); - answer.put("models", modelCatalog); - answer.put("patterns", patternCatalog); - answer.put("entities", entityCatalog); - answer.put("loadbalancers", loadBalancerCatalog); - return answer; - } - - /** - * Get aggregated Camel component Catalog. - * @return - * @throws Exception - */ - public String getComponentCatalog() throws Exception { - var answer = jsonMapper.createObjectNode(); - api.findComponentNames().stream().sorted().forEach((name) -> { - try { - var model = (ComponentModel) api.model(Kind.component, name); - var json = JsonMapper.asJsonObject(model).toJson(); - var catalogNode = (ObjectNode) jsonMapper.readTree(json); - generatePropertiesSchema(catalogNode); - answer.set(name, catalogNode); - } catch (Exception e) { - throw new RuntimeException(e); - } - }); - StringWriter writer = new StringWriter(); - var jsonGenerator = new JsonFactory().createGenerator(writer).useDefaultPrettyPrinter(); - jsonMapper.writeTree(jsonGenerator, answer); - return writer.toString(); - } - - private void generatePropertiesSchema(ObjectNode parent) throws Exception { - var answer = parent.withObject("/propertiesSchema"); - answer.put("$schema", "http://json-schema.org/draft-07/schema#"); - answer.put("type", "object"); - - var properties = parent.withObject("/properties"); - var answerProperties = answer.withObject("/properties"); - var required = new LinkedHashSet(); - for (var propertyEntry : properties.properties()) { - var propertyName = propertyEntry.getKey(); - var property = (ObjectNode) propertyEntry.getValue(); - var propertySchema = answerProperties.withObject("/" + propertyName); - if (property.has("displayName")) propertySchema.put("title", property.get("displayName").asText()); - if (property.has("group")) propertySchema.put("group", property.get("group").asText()); - if (property.has("description")) propertySchema.put("description", property.get("description").asText()); - var propertyType = "string"; - if (property.has("type")) { - propertyType = property.get("type").asText(); - if ("duration".equals(propertyType)) { - propertyType = "string"; - propertySchema.put("format", "duration"); - } - propertySchema.put("type", propertyType); - } - if (property.has("deprecated")) propertySchema.put("deprecated", property.get("deprecated").asBoolean()); - if (property.has("secret") && property.get("secret").asBoolean()) { - propertySchema.put("format", "password"); - } - if (property.has("required") && property.get("required").asBoolean()) { - required.add(propertyName); - } - if (property.has("defaultValue")) { - if ("array".equals(propertyType)) { - propertySchema.withArray("/default").add(property.get("defaultValue")); - } else { - propertySchema.set("default", property.get("defaultValue")); - } - } - - if (property.has("enum")) { - property.withArray("/enum") - .forEach(e -> propertySchema.withArray("/enum").add(e)); - if (!propertySchema.has("type") || "object".equals(propertySchema.get("type").asText())) { - propertySchema.put("type", "string"); - } - } else if ("array".equals(propertyType)) { - propertySchema.withObject("/items").put("type", "string"); - } else if ("object".equals(propertyType) && property.has("javaType") && !property.get("javaType").asText().startsWith("java.util.Map")) { - // Put "string" as a type and javaType as a schema $comment to indicate - // that the UI should handle this as a bean reference field - propertySchema.put("type", "string"); - propertySchema.put("$comment", "class:" + property.get("javaType").asText()); - } - } - required.forEach(req -> answer.withArray("/required").add(req)); - } - - /** - * Get aggregated Camel DataFormat catalog with a custom dataformat added. - * @return - * @throws Exception - */ - public String getDataFormatCatalog() throws Exception { - var answer = jsonMapper.createObjectNode(); - var dataFormatSchemaMap = schemaProcessor.getDataFormats(); - for (var entry : dataFormatSchemaMap.entrySet()) { - var dataFormatName = entry.getKey(); - var dataFormatSchema = entry.getValue(); - var dataFormatCatalog = (EipModel) api.model(Kind.eip, dataFormatName); - if (dataFormatCatalog == null) { - throw new Exception("DataFormat " + dataFormatName + " is not found in Camel model catalog."); - } - var json = JsonMapper.asJsonObject(dataFormatCatalog).toJson(); - var catalogTree = (ObjectNode) jsonMapper.readTree(json); - catalogTree.set("propertiesSchema", dataFormatSchema); - answer.set(dataFormatName, catalogTree); - } - StringWriter writer = new StringWriter(); - var jsonGenerator = new JsonFactory().createGenerator(writer).useDefaultPrettyPrinter(); - jsonMapper.writeTree(jsonGenerator, answer); - return writer.toString(); - } - - /** - * Get Camel language catalog with a custom language added. - * @return - * @throws Exception - */ - public String getLanguageCatalog() throws Exception { - var answer = jsonMapper.createObjectNode(); - var languageSchemaMap = schemaProcessor.getLanguages(); - for (var entry : languageSchemaMap.entrySet()) { - var languageName = entry.getKey(); - var languageSchema = entry.getValue(); - var languageCatalog = (EipModel) api.model(Kind.eip, languageName); - if (languageCatalog == null) { - throw new Exception("Language " + languageName + " is not found in Camel model catalog."); - } - var json = JsonMapper.asJsonObject(languageCatalog).toJson(); - var catalogTree = (ObjectNode) jsonMapper.readTree(json); - catalogTree.set("propertiesSchema", languageSchema); - answer.set(languageName, catalogTree); - } - StringWriter writer = new StringWriter(); - var jsonGenerator = new JsonFactory().createGenerator(writer).useDefaultPrettyPrinter(); - jsonMapper.writeTree(jsonGenerator, answer); - return writer.toString(); - } - - public String getModelCatalog() throws Exception { - var answer = jsonMapper.createObjectNode(); - api.findModelNames().stream().sorted().forEach((name) -> { - try { - var model = (EipModel) api.model(Kind.eip, name); - var json = JsonMapper.asJsonObject(model).toJson(); - var catalogNode = (ObjectNode) jsonMapper.readTree(json); - if ("from".equals(name)) { - // "from" is an exception that is not a processor, therefore it's not in the - // pattern catalog - put the propertiesSchema here - generatePropertiesSchema(catalogNode); - } - answer.set(name, catalogNode); - } catch (Exception e) { - throw new RuntimeException(e); - } - }); - StringWriter writer = new StringWriter(); - var jsonGenerator = new JsonFactory().createGenerator(writer).useDefaultPrettyPrinter(); - jsonMapper.writeTree(jsonGenerator, answer); - return writer.toString(); - } - - /** - * Get a Camel processor model catalog filtered from model catalog by comparing with YAML DSL schema. - * @return - * @throws Exception - */ - public String getPatternCatalog() throws Exception { - var answer = jsonMapper.createObjectNode(); - var processors = schemaProcessor.getProcessors(); - var catalogMap = new LinkedHashMap(); - for (var name : api.findModelNames()) { - var modelCatalog = (EipModel) api.model(Kind.eip, name); - catalogMap.put(modelCatalog.getJavaType(), modelCatalog); - } - - for (var entry : processors.entrySet()) { - var sortedSchemaProperties = jsonMapper.createObjectNode(); - var processorFQCN = entry.getKey(); - var processorSchema = entry.getValue(); - var processorCatalog = catalogMap.get(processorFQCN); - List required = new ArrayList<>(); - - var camelYamlDslProperties = processorSchema.withObject("/properties").properties().stream().map(Map.Entry::getKey).sorted( - new CamelYamlDSLKeysComparator(processorCatalog.getOptions()) - ).toList(); - - for (var propertyName : camelYamlDslProperties) { - var propertySchema = processorSchema.withObject("/properties").withObject("/" + propertyName); - if (TO_DYNAMIC_DEFINITION.equals(processorFQCN) && "parameters".equals(propertyName)) { - // "parameters" as a common property is omitted in the catalog, but we need this for "toD" - propertySchema.put("title", "Parameters"); - propertySchema.put("description", "URI parameters"); - sortedSchemaProperties.set(propertyName, propertySchema); - continue; - } - if (SET_HEADERS_DEFINITION.equals((processorFQCN)) && "headers".equals(propertyName)) { - propertySchema.put("title", "Headers"); - propertySchema.put("description", "Headers to set"); - sortedSchemaProperties.set(propertyName, propertySchema); - continue; - } - if (SET_VARIABLES_DEFINITION.equals((processorFQCN)) && "variables".equals(propertyName)) { - propertySchema.put("title", "Variables"); - propertySchema.put("description", "Variables to set"); - sortedSchemaProperties.set(propertyName, propertySchema); - continue; - } - - var catalogOpOptional = processorCatalog.getOptions().stream().filter(op -> op.getName().equals(propertyName)).findFirst(); - if (catalogOpOptional.isEmpty()) { - throw new Exception(String.format("Option '%s' not found for processor '%s'", propertyName, processorFQCN)); - } - var catalogOp = catalogOpOptional.get(); - if ("object".equals(catalogOp.getType()) && !catalogOp.getJavaType().startsWith("java.util.Map") - && !propertySchema.has("$comment")) { - propertySchema.put("$comment", "class:" + catalogOp.getJavaType()); - } - if (catalogOp.isRequired()) { - required.add(propertyName); - } - - propertySchema.put("group", catalogOp.getGroup()); - sortedSchemaProperties.set(propertyName, propertySchema); - } - - var json = JsonMapper.asJsonObject(processorCatalog).toJson(); - var catalogTree = (ObjectNode) jsonMapper.readTree(json); - catalogTree.set("propertiesSchema", processorSchema); - catalogTree.withObject("/propertiesSchema").set("required", jsonMapper.valueToTree(required)); - processorSchema.set("properties", sortedSchemaProperties); - answer.set(processorCatalog.getName(), catalogTree); - } - - StringWriter writer = new StringWriter(); - var jsonGenerator = new JsonFactory().createGenerator(writer).useDefaultPrettyPrinter(); - jsonMapper.writeTree(jsonGenerator, answer); - return writer.toString(); - } - - /** - * Get a Camel entity catalog filtered from model catalog, then combine the corresponding part of - * Camel YAML DSL JSON schema as a `propertiesSchema` in the usable format for uniforms to render - * the configuration form. "entity" here means the top level properties in Camel YAML DSL, such as - * "route", "rest", "beans", "routeConfiguration", etc. They are marked with "@YamlIn" annotation - * in the Camel codebase. - * This also adds `routeTemplateBean` and `templatedRouteBean` separately. `routeTemplateBean` is - * also used for Kamelet. - * @return - * @throws Exception - */ - public String getEntityCatalog() throws Exception { - var answer = jsonMapper.createObjectNode(); - var entities = schemaProcessor.getEntities(); - var catalogMap = new LinkedHashMap(); - for (var name : api.findModelNames()) { - var modelCatalog = (EipModel) api.model(Kind.eip, name); - catalogMap.put(name, modelCatalog); - } - InputStream is = api.getClass().getClassLoader().getResourceAsStream("org/apache/camel/catalog/models-app/bean.json"); - var beanJsonObj = JsonMapper.deserialize(new String(is.readAllBytes())); - var beanModel = JsonMapper.generateEipModel(beanJsonObj); - catalogMap.put("beans", beanModel); - for (var entry : entities.entrySet()) { - var entityName = entry.getKey(); - var entitySchema = entry.getValue(); - var entityCatalog = catalogMap.get(entityName); - switch (entityName) { - case "beans" -> processBeansParameters(entitySchema, entityCatalog); - case "from" -> processFromParameters(entitySchema, entityCatalog); - case "route" -> processRouteParameters(entitySchema, entityCatalog); - case "routeTemplate" -> processRouteTemplateParameters(entitySchema, entityCatalog); - case "templatedRoute" -> processTemplatedRouteParameters(entitySchema, entityCatalog); - case "restConfiguration" -> processRestConfigurationParameters(entitySchema, entityCatalog); - case "rest" -> processRestParameters(entitySchema, entityCatalog); - case null, default -> processEntityParameters(entityName, entitySchema, entityCatalog); - } - - sortPropertiesAccordingToCamelCatalog(entitySchema, entityCatalog); - - var json = JsonMapper.asJsonObject(entityCatalog).toJson(); - var catalogTree = (ObjectNode) jsonMapper.readTree(json); - catalogTree.set("propertiesSchema", entitySchema); - answer.set(entityName, catalogTree); - } - addMoreBeans(answer, catalogMap); - - StringWriter writer = new StringWriter(); - var jsonGenerator = new JsonFactory().createGenerator(writer).useDefaultPrettyPrinter(); - jsonMapper.writeTree(jsonGenerator, answer); - return writer.toString(); - } - - private void doProcessParameter(EipModel entityCatalog, String propertyName, ObjectNode propertySchema) throws Exception { - var catalogOp = entityCatalog.getOptions().stream().filter(op -> op.getName().equals(propertyName)).findFirst(); - if (catalogOp.isEmpty()) { - throw new Exception(String.format("Option '%s' not found for '%s'", propertyName, entityCatalog.getName())); - } - var catalogOption = catalogOp.get(); - if (catalogOption.getDisplayName() != null) propertySchema.put("title", catalogOption.getDisplayName()); - if (catalogOption.getDescription() != null) propertySchema.put("description", catalogOption.getDescription()); - var propertyType = propertySchema.has("type") ? propertySchema.get("type").asText() : null; - if (catalogOption.getDefaultValue() != null) { - if ("array".equals(propertyType)) { - propertySchema.withArray("/default").add(catalogOption.getDefaultValue().toString()); - } else if ("boolean".equals(propertyType)) { - propertySchema.put("default", Boolean.valueOf(catalogOption.getDefaultValue().toString())); - } else { - propertySchema.put("default", catalogOption.getDefaultValue().toString()); - } - } - // if the enum is defined in YAML DSL schema, honor that, otherwise copy from the catalog. - if (catalogOption.getEnums() != null && !propertySchema.has("enum")) { - catalogOption.getEnums() - .forEach(e -> propertySchema.withArray("/enum").add(e)); - if (!propertySchema.has("type") || "object".equals(propertySchema.get("type").asText())) { - propertySchema.put("type", "string"); - } - } - } - - private void processBeansParameters(ObjectNode entitySchema, EipModel entityCatalog) throws Exception { - var beanDef = entitySchema.withObject("/definitions").withObject("/org.apache.camel.model.BeanFactoryDefinition"); - for (var property : beanDef.withObject("/properties").properties()) { - var propertyName = property.getKey(); - var propertySchema = (ObjectNode) property.getValue(); - doProcessParameter(entityCatalog, propertyName, propertySchema); - } - } - - private void processFromParameters(ObjectNode entitySchema, EipModel entityCatalog) throws Exception { - for (var property : entitySchema.withObject("/properties").properties()) { - var propertyName = property.getKey(); - var propertySchema = (ObjectNode) property.getValue(); - if ("parameters".equals(propertyName)) { - // "parameters" as a common property is omitted in the catalog, but we need this for "from" - propertySchema.put("title", "Parameters"); - propertySchema.put("description", "URI parameters"); - continue; - } - doProcessParameter(entityCatalog, propertyName, propertySchema); - } - } - - private void processRouteParameters(ObjectNode entitySchema, EipModel entityCatalog) throws Exception { - for (var op : entityCatalog.getOptions()) { - // parameter name mismatch between schema and catalog - if ("routePolicyRef".equals(op.getName())) { - op.setName("routePolicy"); - } - } - for (var property : entitySchema.withObject("/properties").properties()) { - var propertyName = property.getKey(); - var propertySchema = (ObjectNode) property.getValue(); - if ("from".equals(propertyName)) { - // no "from" in the catalog - propertySchema.put("title", "From"); - propertySchema.put("description", "From"); - continue; - } else if (List.of("inputType", "outputType").contains(propertyName)) { - // no "inputType" and "outputType" in the catalog, just keep it as-is - continue; - } else if ("streamCaching".equals(propertyName)) { - entityCatalog.getOptions().stream().filter(op -> "streamCache".equals(op.getName())).findFirst().ifPresent(op -> { - op.setName("streamCaching"); - }); - } - doProcessParameter(entityCatalog, propertyName, propertySchema); - } - } - - private void processRouteTemplateParameters(ObjectNode entitySchema, EipModel entityCatalog) throws Exception { - for (var op : entityCatalog.getOptions()) { - // parameter name mismatch between schema and catalog - if ("templateBean".equals(op.getName())) { - op.setName("beans"); - } - } - for (var property : entitySchema.withObject("/properties").properties()) { - var propertyName = property.getKey(); - var propertySchema = (ObjectNode) property.getValue(); - if ("from".equals(propertyName)) { - // no "from" in the catalog - propertySchema.put("title", "From"); - propertySchema.put("description", "From"); - continue; - } else if ("parameters".equals(propertyName)) { - // "parameters" as a common property is omitted in the catalog, but we need this for "from" - propertySchema.put("title", "Parameters"); - propertySchema.put("description", "URI parameters"); - continue; - } - doProcessParameter(entityCatalog, propertyName, propertySchema); - } - } - - private void processTemplatedRouteParameters(ObjectNode entitySchema, EipModel entityCatalog) throws Exception { - for (var op : entityCatalog.getOptions()) { - // parameter name mismatch between schema and catalog - if ("bean".equals(op.getName())) { - op.setName("beans"); - } - } - for (var property : entitySchema.withObject("/properties").properties()) { - var propertyName = property.getKey(); - var propertySchema = (ObjectNode) property.getValue(); - if ("from".equals(propertyName)) { - // no "from" in the catalog - propertySchema.put("title", "From"); - propertySchema.put("description", "From"); - continue; - } else if ("parameters".equals(propertyName)) { - // "parameters" as a common property is omitted in the catalog, but we need this for "from" - propertySchema.put("title", "Parameters"); - propertySchema.put("description", "URI parameters"); - continue; - } - doProcessParameter(entityCatalog, propertyName, propertySchema); - } - } - - private void processRestConfigurationParameters(ObjectNode entitySchema, EipModel entityCatalog) throws Exception { - for (var property : entitySchema.withObject("/properties").properties()) { - var propertyName = property.getKey(); - var propertySchema = (ObjectNode) property.getValue(); - if ("enableCors".equals(propertyName)) { - // no "from" in the catalog - propertySchema.put("title", "Enable CORS"); - propertySchema.put("description", "Enable CORS"); - continue; - } - doProcessParameter(entityCatalog, propertyName, propertySchema); - } - } - - private void processRestParameters(ObjectNode entitySchema, EipModel entityCatalog) throws Exception { - for (var property : entitySchema.withObject("/properties").properties()) { - var propertyName = property.getKey(); - var propertySchema = (ObjectNode) property.getValue(); - if ("enableCors".equals(propertyName)) { - // no "from" in the catalog - propertySchema.put("title", "Enable CORS"); - propertySchema.put("description", "Enable CORS"); - continue; - } else if (List.of("get", "post", "put", "patch", "delete", "head").contains(propertyName)) { - continue; - } - doProcessParameter(entityCatalog, propertyName, propertySchema); - } - } - - private void processEntityParameters(String entityName, ObjectNode entitySchema, EipModel entityCatalog) throws Exception { - for (var property : entitySchema.withObject("/properties").properties()) { - var propertyName = property.getKey(); - var propertySchema = (ObjectNode) property.getValue(); - if ("from".equals(entityName) && "parameters".equals(propertyName)) { - // "parameters" as a common property is omitted in the catalog, but we need this for "from" - propertySchema.put("title", "Parameters"); - propertySchema.put("description", "URI parameters"); - continue; - } - doProcessParameter(entityCatalog, propertyName, propertySchema); - } - } - - private void sortPropertiesAccordingToCamelCatalog(ObjectNode entitySchema, EipModel entityCatalog) { - var sortedSchemaProperties = jsonMapper.createObjectNode(); - var camelYamlDslProperties = entitySchema.withObject("/properties").properties().stream().map(Map.Entry::getKey).sorted( - new CamelYamlDSLKeysComparator(entityCatalog.getOptions()) - ).toList(); - - for (var propertyName : camelYamlDslProperties) { - var propertySchema = entitySchema.withObject("/properties").withObject("/" + propertyName); - sortedSchemaProperties.set(propertyName, propertySchema); - } - - entitySchema.set("properties", sortedSchemaProperties); - } - - private void addMoreBeans(ObjectNode answer, Map catalogMap) throws Exception { - var beansCatalog = catalogMap.get("beans"); - var json = JsonMapper.asJsonObject(beansCatalog).toJson(); - var catalogTree = (ObjectNode) jsonMapper.readTree(json); - var beanDefinition = answer.withObject("/beans") - .withObject("/propertiesSchema") - .withObject("/definitions") - .withObject("/org.apache.camel.model.BeanFactoryDefinition"); - catalogTree.set("propertiesSchema", beanDefinition); - answer.set("bean", catalogTree); - - // routeTemplateBean is used for kamelet beans in UI. Let BeanFactoryDefinition pretend to be routeTemplateBean - // definition in order to distinguish kamelet beans from plain YAML beans without making bigger UI change. - answer.set("routeTemplateBean", catalogTree); - } - - /** - * Get Camel LoadBalancer catalog with a custom loadbalancer added. - * @return - * @throws Exception - */ - public String getLoadBalancerCatalog() throws Exception { - var answer = jsonMapper.createObjectNode(); - var loadBalancerSchemaMap = schemaProcessor.getLoadBalancers(); - for (var entry : loadBalancerSchemaMap.entrySet()) { - var loadBalancerName = entry.getKey(); - var loadBalancerSchema = entry.getValue(); - var loadBalancerCatalog = (EipModel) api.model(Kind.eip, loadBalancerName); - if (loadBalancerCatalog == null) { - throw new Exception("LoadBalancer " + loadBalancerName + " is not found in Camel model catalog."); - } - var json = JsonMapper.asJsonObject(loadBalancerCatalog).toJson(); - var catalogTree = (ObjectNode) jsonMapper.readTree(json); - catalogTree.set("propertiesSchema", loadBalancerSchema); - answer.set(loadBalancerName, catalogTree); - } - StringWriter writer = new StringWriter(); - var jsonGenerator = new JsonFactory().createGenerator(writer).useDefaultPrettyPrinter(); - jsonMapper.writeTree(jsonGenerator, answer); - return writer.toString(); - } -} diff --git a/packages/camel-catalog/kaoto-camel-catalog-maven-plugin/src/main/java/io/kaoto/camelcatalog/CamelYamlDSLKeysComparator.java b/packages/camel-catalog/kaoto-camel-catalog-maven-plugin/src/main/java/io/kaoto/camelcatalog/CamelYamlDSLKeysComparator.java deleted file mode 100644 index b09fcf45b..000000000 --- a/packages/camel-catalog/kaoto-camel-catalog-maven-plugin/src/main/java/io/kaoto/camelcatalog/CamelYamlDSLKeysComparator.java +++ /dev/null @@ -1,27 +0,0 @@ -package io.kaoto.camelcatalog; - -import java.util.Comparator; -import java.util.List; -import java.util.Optional; - -import org.apache.camel.tooling.model.EipModel.EipOptionModel; - -public class CamelYamlDSLKeysComparator implements Comparator { - - private final List eipOptions; - - CamelYamlDSLKeysComparator(List eipOptions) { - this.eipOptions = eipOptions; - } - - @Override - public int compare(String firstKey, String secondKey) { - Optional firstOption = eipOptions.stream().filter(e -> e.getName().equals(firstKey)).findFirst(); - Optional secondOption = eipOptions.stream().filter(e -> e.getName().equals(secondKey)).findFirst(); - - var firstIndex = firstOption.isPresent() ? firstOption.get().getIndex() : Integer.MAX_VALUE; - var secondIndex = secondOption.isPresent() ? secondOption.get().getIndex() : Integer.MAX_VALUE; - - return Integer.compare(firstIndex, secondIndex); - } -} diff --git a/packages/camel-catalog/kaoto-camel-catalog-maven-plugin/src/main/java/io/kaoto/camelcatalog/CamelYamlDslSchemaProcessor.java b/packages/camel-catalog/kaoto-camel-catalog-maven-plugin/src/main/java/io/kaoto/camelcatalog/CamelYamlDslSchemaProcessor.java deleted file mode 100644 index 3f4fd02b5..000000000 --- a/packages/camel-catalog/kaoto-camel-catalog-maven-plugin/src/main/java/io/kaoto/camelcatalog/CamelYamlDslSchemaProcessor.java +++ /dev/null @@ -1,613 +0,0 @@ -/* - * Copyright (C) 2023 Red Hat, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package io.kaoto.camelcatalog; - -import com.fasterxml.jackson.core.JsonFactory; -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.node.ObjectNode; - -import java.io.StringWriter; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; -import java.util.Set; - -/** - * Process camelYamlDsl.json file, aka Camel YAML DSL JSON schema. - */ -public class CamelYamlDslSchemaProcessor { - private static final String PROCESSOR_DEFINITION = "org.apache.camel.model.ProcessorDefinition"; - private static final String ROUTE_CONFIGURATION_DEFINITION = "org.apache.camel.model.RouteConfigurationDefinition"; - private static final String LOAD_BALANCE_DEFINITION = "org.apache.camel.model.LoadBalanceDefinition"; - private static final String EXPRESSION_SUB_ELEMENT_DEFINITION = "org.apache.camel.model.ExpressionSubElementDefinition"; - private static final String SAGA_DEFINITION = "org.apache.camel.model.SagaDefinition"; - private static final String PROPERTY_EXPRESSION_DEFINITION = "org.apache.camel.model.PropertyExpressionDefinition"; - private static final String ERROR_HANDLER_DEFINITION = "org.apache.camel.model.ErrorHandlerDefinition"; - private static final String ERROR_HANDLER_DESERIALIZER = "org.apache.camel.dsl.yaml.deserializers.ErrorHandlerBuilderDeserializer"; - private final ObjectMapper jsonMapper; - private final ObjectNode yamlDslSchema; - private final List processorBlocklist = List.of( - "org.apache.camel.model.KameletDefinition" - // reactivate entries once we have a better handling of how to add WHEN and OTHERWISE without Catalog - // "Otherwise", - // "when", - // "doCatch", - // ""doFinally" - ); - /** The processor properties those should be handled separately, i.e. remove from the properties schema, - * such as branching node and parameters reflected from the underlying components. */ - private final Map> processorPropertyBlockList = Map.of( - "org.apache.camel.model.ChoiceDefinition", - List.of("when", "otherwise"), - "org.apache.camel.model.TryDefinition", - List.of("doCatch", "doFinally"), - "org.apache.camel.model.ToDefinition", - List.of("uri", "parameters"), - "org.apache.camel.model.WireTapDefinition", - List.of("uri", "parameters") - ); - private final List processorReferenceBlockList = List.of( - PROCESSOR_DEFINITION - ); - - public CamelYamlDslSchemaProcessor(ObjectMapper mapper, ObjectNode yamlDslSchema) throws Exception { - this.jsonMapper = mapper; - this.yamlDslSchema = yamlDslSchema; - } - - public Map processSubSchema() throws Exception { - var answer = new LinkedHashMap(); - var items = yamlDslSchema.withObject("/items"); - var properties = items.withObject("/properties"); - var definitions = items.withObject("/definitions"); - var relocatedDefinitions = relocateToRootDefinitions(definitions); - properties.properties().forEach(p -> { - var subSchema = doProcessSubSchema(p, relocatedDefinitions, yamlDslSchema); - answer.put(p.getKey(), subSchema); - }); - return answer; - } - - private ObjectNode relocateToRootDefinitions(ObjectNode definitions) { - var relocatedDefinitions = definitions.deepCopy(); - relocatedDefinitions.findParents("$ref").stream() - .map(ObjectNode.class::cast) - .forEach(n -> n.put("$ref", getRelocatedRef(n))); - return relocatedDefinitions; - } - - private String getRelocatedRef(ObjectNode parent) { - return parent.get("$ref").asText().replace("#/items/definitions/", "#/definitions/"); - } - - private String doProcessSubSchema( - java.util.Map.Entry prop, - ObjectNode definitions, - ObjectNode rootSchema - ) { - var answer = (ObjectNode) prop.getValue().deepCopy(); - if (answer.has("$ref") && definitions.has(getNameFromRef(answer))) { - answer = definitions.withObject("/" + getNameFromRef(answer)).deepCopy(); - - } - extractSingleOneOfFromAnyOf(answer); - answer.set("$schema", rootSchema.get("$schema")); - populateDefinitions(answer, definitions); - var writer = new StringWriter(); - try { - JsonGenerator gen = new JsonFactory().createGenerator(writer).useDefaultPrettyPrinter(); - jsonMapper.writeTree(gen, answer); - return writer.toString(); - } catch (Exception e) { - throw new RuntimeException(e); - } - } - - private String getNameFromRef(ObjectNode parent) { - var ref = parent.get("$ref").asText(); - return ref.contains("items") ? ref.replace("#/items/definitions/", "") - : ref.replace("#/definitions/", ""); - } - - private void populateDefinitions(ObjectNode schema, ObjectNode definitions) { - boolean added = true; - while(added) { - added = false; - for (JsonNode refParent : schema.findParents("$ref")) { - var name = getNameFromRef((ObjectNode) refParent); - if (processorReferenceBlockList.contains(name)) { - continue; - } - if (!schema.has("definitions") || !schema.withObject("/definitions").has(name)) { - var schemaDefinitions = schema.withObject("/definitions"); - schemaDefinitions.set(name, definitions.withObject("/" + name)); - added = true; - break; - } - } - } - } - - /** - * Extract single OneOf definition from AnyOf definition and put it into the root definitions. - * It's a workaround for the current Camel YAML DSL JSON schema, where some AnyOf definition - * contains only one OneOf definition. This can be removed once https://github.com/KaotoIO/kaoto/issues/948 - * is resolved. - * This is done mostly for the errorHandler definition, f.i. - * ``` - * { - * anyOf: [ - * { - * oneOf: [ - * { type: "object", ... }, - * { type: "object", ... }, - * ] - * }, - * ] - * } - * ``` - * will be transformed into - * ``` - * { - * oneOf: [ - * { type: "object", ... }, - * { type: "object", ... }, - * ] - * } - */ - private void extractSingleOneOfFromAnyOf(ObjectNode definition) { - if (!definition.has("anyOf")) { - return; - } - var anyOfArray = definition.withArray("/anyOf"); - if (anyOfArray.size() != 1) { - return; - } - - var anyOfOneOf = anyOfArray.get(0).withArray("/oneOf"); - definition.set("oneOf", anyOfOneOf); - definition.remove("anyOf"); - } - - /** - * Extract the processor definitions from the main Camel YAML DSL JSON schema in the usable - * format for uniforms to render the configuration form. It does a couple of things: - *
    - *
  • Remove "oneOf" and "anyOf"
  • - *
  • Remove properties those are supposed to be handled separately: - *
      - *
    • "steps": branching steps
    • - *
    • "parameters": component parameters
    • - *
    • expression languages
    • - *
    • dataformats
    • - *
  • - *
  • If the processor is expression aware, it puts "expression" as a "$comment" in the schema
  • - *
  • If the processor is dataformat aware, it puts "dataformat" as a "$comment" in the schema
  • - *
  • If the processor property is expression aware, it puts "expression" as a "$comment" in the property schema
  • - *
- * @return - */ - public Map getProcessors() throws Exception { - var definitions = yamlDslSchema - .withObject("/items") - .withObject("/definitions"); - var relocatedDefinitions = relocateToRootDefinitions(definitions); - var processors = relocatedDefinitions - .withObject(PROCESSOR_DEFINITION) - .withObject("/properties"); - addRouteConfigurationProcessors(relocatedDefinitions, processors); - - var answer = new LinkedHashMap(); - for (var processorEntry : processors) { - var processorFQCN = getNameFromRef((ObjectNode)processorEntry); - if (processorBlocklist.contains(processorFQCN)) { - continue; - } - var processor = relocatedDefinitions.withObject("/" + processorFQCN); - processor = extractFromOneOf(processorFQCN, processor); - processor.remove("oneOf"); - processor = extractFromAnyOfOneOf(processorFQCN, processor); - processor.remove("anyOf"); - var processorProperties = processor.withObject("/properties"); - Set propToRemove = new HashSet<>(); - var propertyBlockList = processorPropertyBlockList.get(processorFQCN); - for (var propEntry : processorProperties.properties()) { - var propName = propEntry.getKey(); - if (propertyBlockList != null && propertyBlockList.contains(propName)) { - propToRemove.add(propName); - continue; - } - - var property = (ObjectNode) propEntry.getValue(); - var refParent = property.findParent("$ref"); - if (refParent != null) { - var ref = getNameFromRef(refParent); - if (processorReferenceBlockList.contains(ref)) { - if (processor.has("$comment")) { - processor.put("$comment", processor.get("$comment").asText() + ",steps"); - } else { - processor.put("$comment", "steps"); - } - propToRemove.add(propName); - } - if (EXPRESSION_SUB_ELEMENT_DEFINITION.equals(ref)) { - refParent.remove("$ref"); - refParent.put("type", "object"); - refParent.put("$comment", "expression"); - } - continue; - } - if (!property.has("type")) { - // inherited properties, such as for expression - supposed to be handled separately - propToRemove.add(propName); - } - } - propToRemove.forEach(processorProperties::remove); - populateDefinitions(processor, relocatedDefinitions); - sanitizeDefinitions(processorFQCN, processor); - answer.put(processorFQCN, processor); - } - return answer; - } - - private void addRouteConfigurationProcessors(ObjectNode relocatedDefinitions, ObjectNode processors) { - var routeConfigurationProcessor = relocatedDefinitions - .withObject(ROUTE_CONFIGURATION_DEFINITION) - .withObject("/properties"); - var interceptProcessor = routeConfigurationProcessor.withObject("intercept").withObject("items").withObject("properties"); - var interceptFromProcessor = routeConfigurationProcessor.withObject("interceptFrom").withObject("items").withObject("properties"); - var interceptSendToEndpointProcessor = routeConfigurationProcessor.withObject("interceptSendToEndpoint").withObject("items").withObject("properties"); - var onExceptionProcessor = routeConfigurationProcessor.withObject("onException").withObject("items").withObject("properties"); - var onCompletionProcessor = routeConfigurationProcessor.withObject("onCompletion").withObject("items").withObject("properties"); - processors.setAll(interceptProcessor); - processors.setAll(interceptFromProcessor); - processors.setAll(interceptSendToEndpointProcessor); - processors.setAll(onExceptionProcessor); - processors.setAll(onCompletionProcessor); - } - - private ObjectNode extractFromOneOf(String name, ObjectNode definition) throws Exception { - if (!definition.has("oneOf")) { - return definition; - } - var oneOf = definition.withArray("/oneOf"); - if (oneOf.size() != 2) { - throw new Exception(String.format( - "Definition '%s' has '%s' entries in oneOf unexpectedly, look it closer", - name, - oneOf.size())); - } - for (var def : oneOf) { - if (def.get("type").asText().equals("object")) { - var objectDef = (ObjectNode) def; - if (definition.has("title")) objectDef.set("title", definition.get("title")); - if (definition.has("description")) objectDef.set("description", definition.get("description")); - return objectDef; - } - } - throw new Exception(String.format( - "Definition '%s' oneOf doesn't have object entry unexpectedly, look it closer", - name)); - } - - private ObjectNode extractFromAnyOfOneOf(String name, ObjectNode definition) throws Exception { - if (!definition.has("anyOf")) { - return definition; - } - var anyOfOneOf = definition.withArray("/anyOf").get(0).withArray("/oneOf"); - for (var def : anyOfOneOf) { - if (def.has("$ref") && def.get("$ref").asText().equals("#/definitions/org.apache.camel.model.language.ExpressionDefinition")) { - definition.put("$comment", "expression"); - break; - } - var refParent = def.findParent("$ref"); - if (refParent != null && refParent.get("$ref").asText().startsWith("#/definitions/org.apache.camel.model.dataformat")) { - definition.put("$comment", "dataformat"); - break; - } - if (LOAD_BALANCE_DEFINITION.equals(name)) { - definition.put("$comment", "loadbalance"); - break; - } - if (List.of(ERROR_HANDLER_DEFINITION, ERROR_HANDLER_DESERIALIZER).contains(name)) { - definition.put("$comment", "errorhandler"); - break; - } - } - definition.remove("anyOf"); - return definition; - } - - private void sanitizeDefinitions(String processorFQCN, ObjectNode processor) throws Exception { - if (!processor.has("definitions")) { - return; - } - var definitions = processor.withObject("/definitions"); - var defToRemove = new HashSet(); - for (var entry : definitions.properties()) { - var definitionName = entry.getKey(); - if (SAGA_DEFINITION.equals(processorFQCN) && definitionName.startsWith("org.apache.camel.language")) { - defToRemove.add(definitionName); - continue; - } - - var definition = (ObjectNode) entry.getValue(); - definition = extractFromOneOf(definitionName, definition); - definition = extractFromAnyOfOneOf(definitionName, definition); - var definitionProperties = definition.withObject("/properties"); - var propToRemove = new HashSet(); - for (var property : definitionProperties.properties()) { - var propName = property.getKey(); - var propValue = property.getValue(); - if (!propValue.has("$ref") && !propValue.has("type")) { - // inherited properties, such as for expression - supposed to be handled separately - propToRemove.add(propName); - } - - } - propToRemove.forEach(definitionProperties::remove); - if (PROPERTY_EXPRESSION_DEFINITION.equals(definitionName)) { - var expression = definition.withObject("/properties").withObject("/expression"); - expression.put("title", "Expression"); - expression.put("type", "object"); - expression.put("$comment", "expression"); - } - definitions.set(definitionName, definition); - } - defToRemove.forEach(definitions::remove); - } - public Map getDataFormats() throws Exception { - var definitions = yamlDslSchema - .withObject("/items") - .withObject("/definitions"); - var relocatedDefinitions = relocateToRootDefinitions(definitions); - var fromMarshal = relocatedDefinitions - .withObject("/org.apache.camel.model.MarshalDefinition") - .withArray("/anyOf") - .get(0).withArray("/oneOf"); - var fromUnmarshal = relocatedDefinitions - .withObject("/org.apache.camel.model.UnmarshalDefinition") - .withArray("/anyOf") - .get(0).withArray("/oneOf"); - if (fromMarshal.size() != fromUnmarshal.size()) { - // Could this happen in the future? If so, we need to prepare separate sets for marshal and unmarshal - throw new Exception("Marshal and Unmarshal dataformats are not the same size"); - }; - - var answer = new LinkedHashMap(); - for( var entry : fromMarshal) { - if (!entry.has("required")) { - // assuming "not" entry - continue; - } - var entryName = entry.withArray("/required").get(0).asText(); - var property = entry - .withObject("/properties") - .withObject("/" + entryName); - var entryDefinitionName = getNameFromRef(property); - var dataformat = relocatedDefinitions.withObject("/" + entryDefinitionName); - if (!dataformat.has("oneOf")) { - populateDefinitions(dataformat, relocatedDefinitions); - answer.put(entryName, dataformat); - continue; - } - - var dfOneOf = dataformat.withArray("/oneOf"); - if (dfOneOf.size() != 2) { - throw new Exception(String.format( - "DataFormat '%s' has '%s' entries in oneOf unexpectedly, look it closer", - entryDefinitionName, - dfOneOf.size())); - } - for (var def : dfOneOf) { - if (def.get("type").asText().equals("object")) { - var objectDef = (ObjectNode) def; - objectDef.set("title", dataformat.get("title")); - objectDef.set("description", dataformat.get("description")); - populateDefinitions(objectDef, relocatedDefinitions); - answer.put(entryName, objectDef); - break; - } - } - } - return answer; - } - - public Map getLanguages() throws Exception { - var definitions = yamlDslSchema - .withObject("/items") - .withObject("/definitions"); - var relocatedDefinitions = relocateToRootDefinitions(definitions); - var languages = relocatedDefinitions - .withObject("/org.apache.camel.model.language.ExpressionDefinition") - .withArray("/anyOf").get(0) - .withArray("/oneOf"); - - var answer = new LinkedHashMap(); - for( var entry : languages) { - if (!"object".equals(entry.get("type").asText()) || !entry.has("required")) { - throw new Exception("Unexpected language entry " + entry.asText()); - } - var entryName = entry.withArray("/required").get(0).asText(); - var property = entry - .withObject("/properties") - .withObject("/" + entryName); - var entryDefinitionName = getNameFromRef(property); - var language = relocatedDefinitions.withObject("/" + entryDefinitionName); - if (!language.has("oneOf")) { - populateDefinitions(language, relocatedDefinitions); - answer.put(entryName, language); - continue; - } - - var langOneOf = language.withArray("/oneOf"); - if (langOneOf.size() != 2) { - throw new Exception(String.format( - "Language '%s' has '%s' entries in oneOf unexpectedly, look it closer", - entryDefinitionName, - langOneOf.size())); - } - for (var def : langOneOf) { - if (def.get("type").asText().equals("object")) { - var objectDef = (ObjectNode) def; - objectDef.set("title", language.get("title")); - objectDef.set("description", language.get("description")); - populateDefinitions(objectDef, relocatedDefinitions); - answer.put(entryName, (ObjectNode) def); - break; - } - } - } - return answer; - } - - /** - * Extract the entity definitions from the main Camel YAML DSL JSON schema in the usable - * format for uniforms to render the configuration form. "entity" here means the top level - * properties in Camel YAML DSL, such as "route", "rest", "beans", "routeConfiguration", etc. - * They are marked with "@YamlIn" annotation in the Camel codebase. - * It does a couple of things: - *
  • Remove "oneOf" and "anyOf"
  • - *
  • Remove properties those are supposed to be handled separately: - *
      - *
    • "steps": branching steps
    • - *
    • "parameters": component parameters
    • - *
    • expression languages
    • - *
    • dataformats
    • - *
  • - *
  • If the processor is expression aware, it puts "expression" as a "$comment" in the schema
  • - *
  • If the processor is dataformat aware, it puts "dataformat" as a "$comment" in the schema
  • - *
  • If the processor property is expression aware, it puts "expression" as a "$comment" in the property schema
  • - * @return - */ - public Map getEntities() throws Exception { - var definitions = yamlDslSchema - .withObject("/items") - .withObject("/definitions"); - var relocatedDefinitions = relocateToRootDefinitions(definitions); - var yamlIn = yamlDslSchema - .withObject("/items") - .withObject("/properties"); - - var answer = new LinkedHashMap(); - for (var yamlInRef : yamlIn.properties()) { - var yamlInName = yamlInRef.getKey(); - var yamlInRefValue = (ObjectNode) yamlInRef.getValue(); - var yamlInFQCN = getNameFromRef((ObjectNode)yamlInRefValue); - var yamlInDefinition = relocatedDefinitions.withObject("/" + yamlInFQCN); - yamlInDefinition = extractFromOneOf(yamlInFQCN, yamlInDefinition); - yamlInDefinition.remove("oneOf"); - yamlInDefinition = extractFromAnyOfOneOf(yamlInFQCN, yamlInDefinition); - yamlInDefinition.remove("anyOf"); - Set propToRemove = new HashSet<>(); - var yamlInProperties = yamlInDefinition.withObject("/properties"); - for (var yamlInPropertyEntry : yamlInProperties.properties()) { - var propertyName = yamlInPropertyEntry.getKey(); - var property = (ObjectNode) yamlInPropertyEntry.getValue(); - var refParent = property.findParent("$ref"); - if (refParent != null) { - var ref = getNameFromRef(refParent); - if (processorReferenceBlockList.contains(ref)) { - if (yamlInDefinition.has("$comment")) { - yamlInDefinition.put("$comment", yamlInDefinition.get("$comment").asText() + ",steps"); - } else { - yamlInDefinition.put("$comment", "steps"); - } - propToRemove.add(propertyName); - } - if (EXPRESSION_SUB_ELEMENT_DEFINITION.equals(ref)) { - refParent.remove("$ref"); - refParent.put("type", "object"); - refParent.put("$comment", "expression"); - } - continue; - } - if (!property.has("type")) { - // inherited properties, such as for expression - supposed to be handled separately - propToRemove.add(propertyName); - } - } - propToRemove.forEach(yamlInProperties::remove); - populateDefinitions(yamlInDefinition, relocatedDefinitions); - sanitizeDefinitions(yamlInFQCN, yamlInDefinition); - answer.put(yamlInName, yamlInDefinition); - } - return answer; - } - - public Map getLoadBalancers() throws Exception { - var definitions = yamlDslSchema - .withObject("/items") - .withObject("/definitions"); - var relocatedDefinitions = relocateToRootDefinitions(definitions); - var loadBalancerAnyOfOneOf = relocatedDefinitions - .withObject("/" + LOAD_BALANCE_DEFINITION) - .withArray("/anyOf").get(0) - .withArray("/oneOf"); - - var answer = new LinkedHashMap(); - for( var entry : loadBalancerAnyOfOneOf) { - if (entry.has("not")) { - continue; - } - if (!"object".equals(entry.get("type").asText()) || !entry.has("required")) { - throw new Exception("Unexpected loadbalancer entry " + entry.asText()); - } - var entryName = entry.withArray("/required").get(0).asText(); - var property = entry - .withObject("/properties") - .withObject("/" + entryName); - var entryDefinitionName = getNameFromRef(property); - var loadBalancer = relocatedDefinitions.withObject("/" + entryDefinitionName); - if (loadBalancer.has("oneOf")) { - var lbOneOf = loadBalancer.withArray("/oneOf"); - if (lbOneOf.size() != 2) { - throw new Exception(String.format( - "LoadBalancer '%s' has '%s' entries in oneOf unexpectedly, look it closer", - entryDefinitionName, - lbOneOf.size())); - } - for (var def : lbOneOf) { - if (def.get("type").asText().equals("object")) { - var objectDef = (ObjectNode) def; - objectDef.set("title", loadBalancer.get("title")); - objectDef.set("description", loadBalancer.get("description")); - loadBalancer = objectDef; - break; - } - } - } - populateDefinitions(loadBalancer, relocatedDefinitions); - for (var prop : loadBalancer.withObject("/properties").properties()) { - var propertyDef = (ObjectNode) prop.getValue(); - var refParent = propertyDef.findParent("$ref"); - if (refParent != null) { - var ref = getNameFromRef(refParent); - if (EXPRESSION_SUB_ELEMENT_DEFINITION.equals(ref)) { - refParent.remove("$ref"); - refParent.put("type", "object"); - refParent.put("$comment", "expression"); - } - } - } - answer.put(entryName, loadBalancer); - } - return answer; - } -} diff --git a/packages/camel-catalog/kaoto-camel-catalog-maven-plugin/src/main/java/io/kaoto/camelcatalog/Index.java b/packages/camel-catalog/kaoto-camel-catalog-maven-plugin/src/main/java/io/kaoto/camelcatalog/Index.java deleted file mode 100644 index 9852336b9..000000000 --- a/packages/camel-catalog/kaoto-camel-catalog-maven-plugin/src/main/java/io/kaoto/camelcatalog/Index.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (C) 2023 Red Hat, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package io.kaoto.camelcatalog; - -import java.util.HashMap; -import java.util.Map; - -record Entry(String name, String description, String version, String file) {} - -public class Index { - public static final String COMPONENTS = "components"; - public static final String DATAFORMATS = "dataformats"; - public static final String LANGUAGES = "languages"; - public static final String MODELS = "models"; - - private Map catalogs = new HashMap<>(); - - private Map schemas = new HashMap<>(); - - public Map getCatalogs() { - return catalogs; - } - public Map getSchemas() { - return schemas; - } -} diff --git a/packages/camel-catalog/kaoto-camel-catalog-maven-plugin/src/main/java/io/kaoto/camelcatalog/K8sSchemaProcessor.java b/packages/camel-catalog/kaoto-camel-catalog-maven-plugin/src/main/java/io/kaoto/camelcatalog/K8sSchemaProcessor.java deleted file mode 100644 index a55c52350..000000000 --- a/packages/camel-catalog/kaoto-camel-catalog-maven-plugin/src/main/java/io/kaoto/camelcatalog/K8sSchemaProcessor.java +++ /dev/null @@ -1,121 +0,0 @@ -/* - * Copyright (C) 2023 Red Hat, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package io.kaoto.camelcatalog; - -import com.fasterxml.jackson.core.JsonFactory; -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.node.ArrayNode; -import com.fasterxml.jackson.databind.node.ObjectNode; - -import java.io.StringWriter; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; - -/** - * Process Kubernetes OpenAPI specification JSON. - */ -public class K8sSchemaProcessor { - private final ObjectMapper jsonMapper; - private final ObjectNode openApiSpec; - - public K8sSchemaProcessor(ObjectMapper mapper, ObjectNode k8sOpenApiSpec) { - this.jsonMapper = mapper; - this.openApiSpec = k8sOpenApiSpec; - } - - /** - * Get k8s definitions schema from its OpenAPI spec. - * @param definitions - * @return - * @throws Exception - */ - public Map processK8sDefinitions(List definitions) throws Exception { - var answer = new LinkedHashMap(); - var k8sSchemas = openApiSpec.withObject("/components/schemas"); - if (definitions == null) { - return answer; - } - for (String name : definitions) { - var definition = jsonMapper.createObjectNode(); - definition.put("$schema", "http://json-schema.org/draft-07/schema#"); - definition.put("additionalProperties", false); - definition.setAll(k8sSchemas.withObject("/" + name)); - populateReferences(definition, k8sSchemas); - definition = removeKubernetesCustomKeywords(definition); - var nameSplit = name.split("\\."); - var displayName = nameSplit[nameSplit.length - 1]; - // ATM we use only few of k8s schemas, so use the short name until we see a conflict - var writer = new StringWriter(); - JsonGenerator jsonGenerator = new JsonFactory().createGenerator(writer).useDefaultPrettyPrinter(); - jsonMapper.writeTree(jsonGenerator, definition); - answer.put(displayName, writer.toString()); - } - return answer; - } - - private void populateReferences(ObjectNode definition, ObjectNode k8sSchemas) { - var added = true; - while (added) { - added = false; - for (JsonNode refParent : definition.findParents("$ref")) { - var ref = refParent.get("$ref").asText(); - if (ref.startsWith("#/components")) { - ((ObjectNode)refParent).put("$ref", ref.replace("#/components/schemas", "#/definitions")); - ref = refParent.get("$ref").asText(); - } - var name = ref.replace("#/definitions/", ""); - if (!definition.has("definitions") || !definition.withObject("/definitions").has(name)) { - var additionalDefinitions = definition.withObject("/definitions"); - additionalDefinitions.set(name, k8sSchemas.withObject("/" + name)); - added = true; - break; - } - } - } - } - - private ObjectNode removeKubernetesCustomKeywords(ObjectNode definition) { - var modified = jsonMapper.createObjectNode(); - definition.fields().forEachRemaining(node -> { - if (!node.getKey().startsWith("x-kubernetes")) { - var value = node.getValue(); - if (value.isObject()) { - value = removeKubernetesCustomKeywords((ObjectNode)value); - } else if (value.isArray()) { - value = removeKubernetesCustomKeywordsFromArrayNode((ArrayNode)value); - } - modified.set(node.getKey(), value); - } - }); - return modified; - } - - private ArrayNode removeKubernetesCustomKeywordsFromArrayNode(ArrayNode definition) { - var modified = jsonMapper.createArrayNode(); - definition.forEach(node -> { - if (node.isObject()) { - node = removeKubernetesCustomKeywords((ObjectNode)node); - } else if (node.isArray()) { - node = removeKubernetesCustomKeywordsFromArrayNode((ArrayNode)node); - } - modified.add(node); - }); - return modified; - } -} diff --git a/packages/camel-catalog/kaoto-camel-catalog-maven-plugin/src/main/java/io/kaoto/camelcatalog/KameletProcessor.java b/packages/camel-catalog/kaoto-camel-catalog-maven-plugin/src/main/java/io/kaoto/camelcatalog/KameletProcessor.java deleted file mode 100644 index 0d7694f35..000000000 --- a/packages/camel-catalog/kaoto-camel-catalog-maven-plugin/src/main/java/io/kaoto/camelcatalog/KameletProcessor.java +++ /dev/null @@ -1,39 +0,0 @@ -package io.kaoto.camelcatalog; - -import com.fasterxml.jackson.databind.node.ObjectNode; - -import java.util.List; - -public class KameletProcessor { - private static final List TO_STRING_TYPES = List.of("binary"); - - public static void process(ObjectNode kamelet) { - var schema = kamelet.withObject("/propertiesSchema"); - var kameletDef = kamelet.withObject("/spec") - .withObject("/definition"); - schema.put("$schema", "http://json-schema.org/draft-07/schema#"); - schema.put("type", "object"); - if (kameletDef.has("title")) schema.set("title", kameletDef.get("title")); - if (kameletDef.has("description")) schema.set("description", kameletDef.get("description")); - if (kameletDef.has("required")) schema.set("required", kameletDef.get("required")); - if (kameletDef.has("properties") && !kameletDef.withObject("/properties").isEmpty()) { - var kameletProperties = kameletDef.withObject("/properties"); - var schemaProperties = schema.withObject("/properties"); - for (var entry : kameletProperties.properties()) { - var name = entry.getKey(); - var property = entry.getValue(); - var schemaProperty = schemaProperties.withObject("/" + name); - if (property.has("type")) schemaProperty.set("type", property.get("type")); - if (TO_STRING_TYPES.contains(property.get("type").asText())) { - schemaProperty.put("$comment", "type:" + property.get("type").asText()); - schemaProperty.put("type", "string"); - } - if (property.has("title")) schemaProperty.set("title", property.get("title")); - if (property.has("description")) schemaProperty.set("description", property.get("description")); - if (property.has("enum")) schemaProperty.set("enum", property.get("enum")); - if (property.has("default")) schemaProperty.set("default", property.get("default")); - if (property.has("format")) schemaProperty.set("format", property.get("format")); - } - } - } -} diff --git a/packages/camel-catalog/kaoto-camel-catalog-maven-plugin/src/main/java/io/kaoto/camelcatalog/KaotoCamelCatalogMojo.java b/packages/camel-catalog/kaoto-camel-catalog-maven-plugin/src/main/java/io/kaoto/camelcatalog/KaotoCamelCatalogMojo.java deleted file mode 100644 index ada11a0ce..000000000 --- a/packages/camel-catalog/kaoto-camel-catalog-maven-plugin/src/main/java/io/kaoto/camelcatalog/KaotoCamelCatalogMojo.java +++ /dev/null @@ -1,433 +0,0 @@ -/* - * Copyright (C) 2023 Red Hat, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package io.kaoto.camelcatalog; - -import java.io.ByteArrayOutputStream; -import java.io.File; -import java.io.OutputStreamWriter; -import java.io.StringWriter; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.Paths; -import java.nio.file.StandardCopyOption; -import java.util.List; - -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.SerializationFeature; -import org.apache.maven.plugin.AbstractMojo; -import org.apache.maven.plugins.annotations.LifecyclePhase; -import org.apache.maven.plugins.annotations.Mojo; -import org.apache.maven.plugins.annotations.Parameter; -import org.apache.maven.plugins.annotations.ResolutionScope; - -import com.fasterxml.jackson.core.JsonFactory; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.node.ObjectNode; -import com.fasterxml.jackson.dataformat.yaml.YAMLFactory; - -import io.fabric8.kubernetes.api.model.apiextensions.v1.CustomResourceDefinition; - -/** - * Collects the camel metadata files such as catalog and schema and - * tailors them to fit with Kaoto needs. - * This plugin expects the following directory structure under inputDirectory: - *
      - *
    • catalog/ - The root directory of extracted camel-catalog
    • - *
    • crds/ - Holds Camel K CRD YAML files
    • - *
    • kamelets/ - Holds Kamelet definition YAML files
    • - *
    • schema/ - Holds Camel YAML DSL JSON schema files
    • - *
    - * In addition to what is generated from above input files, this plugin - * generates index.json file that holds the list of all the generated. - */ -@Mojo( - name = "generate-kaoto-camel-catalog", - defaultPhase = LifecyclePhase.GENERATE_SOURCES, - requiresDependencyResolution = ResolutionScope.COMPILE, - threadSafe = true, - requiresProject = false) -public class KaotoCamelCatalogMojo extends AbstractMojo { - - private static final String SCHEMA = "schema"; - public static final String CAMEL_YAML_DSL = "camelYamlDsl"; - private static final String K8S_V1_OPENAPI = "kubernetes-api-v1-openapi"; - private static final String CAMEL_CATALOG_AGGREGATE = "camel-catalog-aggregate"; - private static final String CRDS = "crds"; - private static final String CRD_SCHEMA = "crd-schema"; - private static final String KAMELET = "kamelet"; - private static final String KAMELETS = "kamelets"; - private static final String KAMELETS_AGGREGATE = "kamelets-aggregate"; - - private static final ObjectMapper jsonMapper = new ObjectMapper() - .configure(SerializationFeature.ORDER_MAP_ENTRIES_BY_KEYS, true); - private static final ObjectMapper yamlMapper = new ObjectMapper(new YAMLFactory()); - - @Parameter(required = true) - private File inputDirectory; - - @Parameter(required = true) - private File outputDirectory; - - @Parameter(required = true) - private String camelVersion; - - @Parameter(required = true) - private String camelKCRDVersion; - - @Parameter(required = true) - private String kameletsVersion; - - @Parameter - private List kubernetesDefinitions; - - @Parameter - private List additionalSchemas; - - @Parameter - private boolean generateSubSchema = true; - - - public void execute() { - if (!inputDirectory.exists()) { - getLog().error(new IllegalArgumentException(String.format( - "inputDirectory '%s' does not exist", inputDirectory.getName()))); - return; - } - outputDirectory.mkdirs(); - var path = inputDirectory.toPath(); - var index = new Index(); - var yamlDslSchemaProcessor = processCamelSchema(path, index); - processK8sSchema(path, index); - processCatalog(yamlDslSchemaProcessor, path, index); - processCRDs(path, index); - processKamelets(path, index); - processAdditionalSchemas(path, index); - try { - var indexFile = outputDirectory.toPath().resolve("index.json").toFile(); - jsonMapper.writerWithDefaultPrettyPrinter().writeValue(indexFile, index); - } catch (Exception e) { - getLog().error(e); - } - } - - private CamelYamlDslSchemaProcessor processCamelSchema(Path inputDir, Index index) { - var schema = inputDir.resolve(SCHEMA).resolve(CAMEL_YAML_DSL + ".json"); - if (!schema.toFile().exists()) { - getLog().error(new IllegalArgumentException(String.format( - "Camel YAML DSL JSON Schema file not found: %s", - schema - ))); - return null; - } - try { - var outputFileName = String.format("%s-%s.json", CAMEL_YAML_DSL, Util.generateHash(schema)); - var output = outputDirectory.toPath().resolve(outputFileName); - output.getParent().toFile().mkdirs(); - Files.copy(schema, output, StandardCopyOption.REPLACE_EXISTING); - var indexEntry = new Entry( - "camelYamlDsl", - "Camel YAML DSL JSON schema", - camelVersion, - outputFileName); - index.getSchemas().put("camelYamlDsl", indexEntry); - } catch (Exception e) { - getLog().error(e); - return null; - } - - try { - var yamlDslSchema = (ObjectNode) jsonMapper.readTree(schema.toFile()); - var schemaProcessor = new CamelYamlDslSchemaProcessor(jsonMapper, yamlDslSchema); - if (generateSubSchema) { - var schemaMap = schemaProcessor.processSubSchema(); - schemaMap.forEach((name, subSchema) -> { - try { - var subSchemaFileName = String.format( - "%s-%s-%s.json", - KaotoCamelCatalogMojo.CAMEL_YAML_DSL, - name, - Util.generateHash(subSchema)); - var subSchemaPath = outputDirectory.toPath().resolve(subSchemaFileName); - subSchemaPath.getParent().toFile().mkdirs(); - Files.writeString(subSchemaPath, subSchema); - var subSchemaIndexEntry = new Entry( - name, - "Camel YAML DSL JSON schema: " + name, - camelVersion, - subSchemaFileName); - index.getSchemas().put(name, subSchemaIndexEntry); - } catch (Exception e) { - getLog().error(e); - } - }); - } - return schemaProcessor; - } catch (Exception e) { - getLog().error(e); - return null; - } - } - - private void processK8sSchema(Path inputDir, Index index) { - var openapiSpecPath = inputDir.resolve(SCHEMA).resolve(K8S_V1_OPENAPI + ".json"); - if (!openapiSpecPath.toFile().exists()) { - getLog().error(new IllegalArgumentException(String.format( - "Kubernetes OpenAPI JSON Schema file not found: %s", - openapiSpecPath - ))); - return; - } - - try { - var openapiSpec = (ObjectNode) jsonMapper.readTree(openapiSpecPath.toFile()); - var processor = new K8sSchemaProcessor(jsonMapper, openapiSpec); - var schemaMap = processor.processK8sDefinitions(kubernetesDefinitions); - for (var entry : schemaMap.entrySet()) { - var name = entry.getKey(); - var schema = entry.getValue(); - var outputFileName = String.format("%s-%s-%s.json", K8S_V1_OPENAPI, name, Util.generateHash(schema)); - var output = outputDirectory.toPath().resolve(outputFileName); - Files.writeString(output, schema); - var indexEntry = new Entry( - name, - "Kubernetes OpenAPI JSON schema: " + name, - "v1", - outputFileName); - index.getSchemas().put(name, indexEntry); - } - } catch (Exception e) { - getLog().error(e); - } - } - - private void processCatalog(CamelYamlDslSchemaProcessor schemaProcessor, Path inputDir, Index index) { - var catalogProcessor = new CamelCatalogProcessor(jsonMapper, schemaProcessor); - try { - var catalogMap = catalogProcessor.processCatalog(); - catalogMap.forEach((name, catalog) -> { - try { - // Adding Kamelet & Pipe Configuration Schema to the Entities Catalog - if (name.equals("entities")) { - var catalogNode = jsonMapper.readTree(catalog); - String files[] = {"KameletConfiguration.json", "PipeConfiguration.json"}; - for (String file : files) { - var schema = inputDir.resolve("schema").resolve(file); - ((ObjectNode) catalogNode).putObject(file.split("\\.")[0]).putObject("propertiesSchema"); - ((ObjectNode) catalogNode.path(file.split("\\.")[0]).path("propertiesSchema")) - .setAll((ObjectNode) jsonMapper.readTree(schema.toFile())); - } - - StringWriter writer = new StringWriter(); - var jsonGenerator = new JsonFactory().createGenerator(writer).useDefaultPrettyPrinter(); - jsonMapper.writeTree(jsonGenerator, catalogNode); - catalog = writer.toString(); - } - - var outputFileName = String.format( - "%s-%s-%s.json", CAMEL_CATALOG_AGGREGATE, name, Util.generateHash(catalog)); - var output = outputDirectory.toPath().resolve(outputFileName); - Files.writeString(output, catalog); - var indexEntry = new Entry( - name, - "Aggregated Camel catalog for " + name, - camelVersion, - outputFileName); - index.getCatalogs().put(name, indexEntry); - } catch (Exception e) { - getLog().error(e); - } - }); - } catch (Exception e) { - getLog().error(e); - } - } - - private void processCRDs(Path inputDir, Index index) { - var crdDir = inputDir.resolve(CRDS); - if (!crdDir.toFile().exists()) { - getLog().error(new IllegalArgumentException(String.format( - "Camel K CRD directory is not valid: %s", - crdDir))); - return; - } - try { - Files.list(crdDir) - .sorted() - .forEach(f -> processCRDFile(f, index)); - } catch (Exception e) { - getLog().error(e); - } - } - - private void processCRDFile(Path file, Index index) { - var dotSplitted = file.getFileName().toString().split("\\."); - if (dotSplitted.length < 4 - || !"camel".equalsIgnoreCase(dotSplitted[0]) - || !"apache".equalsIgnoreCase(dotSplitted[1]) - || !"yaml".equalsIgnoreCase(dotSplitted[3])) { - getLog().error(new Exception( - "Invalid Camel K CRD file name, it is expected to be" - + "'camel.apache.org_.yaml', but it was: " - + file.getFileName())); - return; - } - var underscoreSplitted = dotSplitted[2].split("_"); - if (underscoreSplitted.length < 2 || !"org".equals(underscoreSplitted[0])) { - getLog().error(new Exception( - "Invalid Camel K CRD file name, it is expected to be" - + "'camel.apache.org_.yaml', but it was: " - + file.getFileName())); - return; - } - try { - var crd = yamlMapper.readValue(file.toFile(), CustomResourceDefinition.class); - var schema = crd.getSpec().getVersions().get(0).getSchema().getOpenAPIV3Schema(); - var bytes = jsonMapper.writerWithDefaultPrettyPrinter().writeValueAsBytes(schema); - var outputFileName = String.format( - "%s-%s-%s.json", CRD_SCHEMA, underscoreSplitted[1], Util.generateHash(bytes)); - var output = outputDirectory.toPath().resolve(outputFileName); - Files.write(output, bytes); - var name = crd.getSpec().getNames().getKind(); - var description = name; - var indexEntry = new Entry( - name, - description, - camelKCRDVersion, - outputFileName); - index.getSchemas().put(name, indexEntry); - } catch (Exception e) { - getLog().error(e); - } - } - - private void processKamelets(Path inputDir, Index index) { - var kameletsDir = inputDir.resolve(KAMELETS); - if (!kameletsDir.toFile().exists()) { - getLog().error(new IllegalArgumentException(String.format( - "Kamelets directory is not valid: %s", - kameletsDir))); - return; - } - var root = jsonMapper.createObjectNode(); - try { - Files.list(kameletsDir).sorted().forEach(f -> { - if (f.toFile().isDirectory()) { - processKameletCategory(f, index); - } else { - processKameletFile(f, root); - } - } - ); - JsonFactory jsonFactory = new JsonFactory(); - var outputStream = new ByteArrayOutputStream(); - var writer = new OutputStreamWriter(outputStream); - var jsonGenerator = jsonFactory.createGenerator(writer).useDefaultPrettyPrinter(); - jsonMapper.writeTree(jsonGenerator, root); - var rootBytes = outputStream.toByteArray(); - var outputFileName = String.format("%s-%s.json", KAMELETS_AGGREGATE, Util.generateHash(rootBytes)); - var output = outputDirectory.toPath().resolve(outputFileName); - Files.write(output, rootBytes); - var indexEntry = new Entry( - KAMELETS, - "Aggregated Kamelet definitions in JSON", - kameletsVersion, - outputFileName); - index.getCatalogs().put(KAMELETS, indexEntry); - } catch (Exception e) { - getLog().error(e); - } - } - - private void processKameletCategory(Path dir, Index index) { - var categoryName = dir.getFileName(); - try { - if (Files.list(dir).count() == 0) { - return; - } - var category = jsonMapper.createObjectNode(); - Files.list(dir).sorted().forEach(f -> processKameletFile(f, category)); - - JsonFactory jsonFactory = new JsonFactory(); - var outputStream = new ByteArrayOutputStream(); - var writer = new OutputStreamWriter(outputStream); - var jsonGenerator = jsonFactory.createGenerator(writer).useDefaultPrettyPrinter(); - jsonMapper.writeTree(jsonGenerator, category); - var categoryBytes = outputStream.toByteArray(); - var outputFileName = String.format("%s-%s-%s.json", KAMELET, categoryName, Util.generateHash(categoryBytes)); - var output = outputDirectory.toPath().resolve(outputFileName); - Files.write(output, categoryBytes); - var capitalizedCategoryName = categoryName.toString().substring(0, 1).toUpperCase() - + categoryName.toString().substring(1); - var indexEntryName = String.format("%s%s", KAMELET, capitalizedCategoryName); - var indexEntry = new Entry( - indexEntryName, - String.format("Kamelet definitions of category '%s' in JSON", categoryName), - kameletsVersion, - outputFileName); - index.getCatalogs().put(indexEntryName, indexEntry); - } catch (Exception e) { - getLog().error(e); - } - } - - private void processKameletFile(Path kamelet, ObjectNode targetObject) { - var splitted = kamelet.getFileName().toString().split("\\."); - if (splitted.length < 2) { - getLog().error(new Exception("Invalid file name: " + kamelet.getFileName())); - return; - } - try { - String lowerFileName = kamelet.getFileName().toString().toLowerCase(); - JsonNode kameletNode; - if (lowerFileName.endsWith(".yaml") || lowerFileName.endsWith(".yml")) { - kameletNode = yamlMapper.readTree(kamelet.toFile()); - } else if (lowerFileName.endsWith(".json")) { - // Try JSON as a fallback - kameletNode = jsonMapper.readTree(kamelet.toFile()); - } else { - return; - } - KameletProcessor.process((ObjectNode) kameletNode); - targetObject.putIfAbsent(splitted[0], kameletNode); - } catch (Exception e) { - getLog().error(e); - } - - } - - private void processAdditionalSchemas(Path inputDir, Index index) { - if (additionalSchemas == null) { - return; - } - for (String schema : additionalSchemas) { - try { - var input = Paths.get(schema); - var fileNameSegments = input.getFileName().toString().split("\\."); - var outputFileName = String.format("%s-%s.%s", fileNameSegments[0], Util.generateHash(input), fileNameSegments[1]); - var output = outputDirectory.toPath().resolve(outputFileName); - Files.copy(input, output, StandardCopyOption.REPLACE_EXISTING); - var indexEntry = new Entry( - fileNameSegments[0], - "Camel K Pipe ErrorHandler JSON schema", - "1", - outputFileName); - index.getSchemas().put(fileNameSegments[0], indexEntry); - } catch (Exception e) { - getLog().error(e); - } - } - } -} diff --git a/packages/camel-catalog/kaoto-camel-catalog-maven-plugin/src/main/java/io/kaoto/camelcatalog/Util.java b/packages/camel-catalog/kaoto-camel-catalog-maven-plugin/src/main/java/io/kaoto/camelcatalog/Util.java deleted file mode 100644 index 49adcee38..000000000 --- a/packages/camel-catalog/kaoto-camel-catalog-maven-plugin/src/main/java/io/kaoto/camelcatalog/Util.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (C) 2024 Red Hat, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package io.kaoto.camelcatalog; - -import java.nio.file.Files; -import java.nio.file.Path; - -public class Util { - public static String generateHash(byte[] content) throws Exception { - if (content == null) return null; - var digest = java.security.MessageDigest.getInstance("MD5"); - var hash = digest.digest(content); - return new java.math.BigInteger(1, hash).toString(16); - } - - public static String generateHash(Path path) throws Exception { - return path == null ? null : generateHash(Files.readAllBytes(path)); - } - - public static String generateHash(String content) throws Exception { - return content == null ? null : generateHash(content.getBytes()); - } -} diff --git a/packages/camel-catalog/mvnw b/packages/camel-catalog/mvnw deleted file mode 100755 index 08303327c..000000000 --- a/packages/camel-catalog/mvnw +++ /dev/null @@ -1,250 +0,0 @@ -#!/bin/sh -# ---------------------------------------------------------------------------- -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# ---------------------------------------------------------------------------- - -# ---------------------------------------------------------------------------- -# Apache Maven Wrapper startup batch script, version 3.3.0 -# -# Optional ENV vars -# ----------------- -# JAVA_HOME - location of a JDK home dir, required when download maven via java source -# MVNW_REPOURL - repo url base for downloading maven distribution -# MVNW_USERNAME/MVNW_PASSWORD - user and password for downloading maven -# MVNW_VERBOSE - true: enable verbose log; debug: trace the mvnw script; others: silence the output -# ---------------------------------------------------------------------------- - -set -euf -[ "${MVNW_VERBOSE-}" != debug ] || set -x - -# OS specific support. -native_path() { printf %s\\n "$1"; } -case "$(uname)" in -CYGWIN* | MINGW*) - [ -z "${JAVA_HOME-}" ] || JAVA_HOME="$(cygpath --unix "$JAVA_HOME")" - native_path() { cygpath --path --windows "$1"; } - ;; -esac - -# set JAVACMD and JAVACCMD -set_java_home() { - # For Cygwin and MinGW, ensure paths are in Unix format before anything is touched - if [ -n "${JAVA_HOME-}" ]; then - if [ -x "$JAVA_HOME/jre/sh/java" ]; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - JAVACCMD="$JAVA_HOME/jre/sh/javac" - else - JAVACMD="$JAVA_HOME/bin/java" - JAVACCMD="$JAVA_HOME/bin/javac" - - if [ ! -x "$JAVACMD" ] || [ ! -x "$JAVACCMD" ]; then - echo "The JAVA_HOME environment variable is not defined correctly, so mvnw cannot run." >&2 - echo "JAVA_HOME is set to \"$JAVA_HOME\", but \"\$JAVA_HOME/bin/java\" or \"\$JAVA_HOME/bin/javac\" does not exist." >&2 - return 1 - fi - fi - else - JAVACMD="$( - 'set' +e - 'unset' -f command 2>/dev/null - 'command' -v java - )" || : - JAVACCMD="$( - 'set' +e - 'unset' -f command 2>/dev/null - 'command' -v javac - )" || : - - if [ ! -x "${JAVACMD-}" ] || [ ! -x "${JAVACCMD-}" ]; then - echo "The java/javac command does not exist in PATH nor is JAVA_HOME set, so mvnw cannot run." >&2 - return 1 - fi - fi -} - -# hash string like Java String::hashCode -hash_string() { - str="${1:-}" h=0 - while [ -n "$str" ]; do - char="${str%"${str#?}"}" - h=$(((h * 31 + $(LC_CTYPE=C printf %d "'$char")) % 4294967296)) - str="${str#?}" - done - printf %x\\n $h -} - -verbose() { :; } -[ "${MVNW_VERBOSE-}" != true ] || verbose() { printf %s\\n "${1-}"; } - -die() { - printf %s\\n "$1" >&2 - exit 1 -} - -# parse distributionUrl and optional distributionSha256Sum, requires .mvn/wrapper/maven-wrapper.properties -while IFS="=" read -r key value; do - case "${key-}" in - distributionUrl) distributionUrl="${value-}" ;; - distributionSha256Sum) distributionSha256Sum="${value-}" ;; - esac -done <"${0%/*}/.mvn/wrapper/maven-wrapper.properties" -[ -n "${distributionUrl-}" ] || die "cannot read distributionUrl property in ${0%/*}/.mvn/wrapper/maven-wrapper.properties" - -case "${distributionUrl##*/}" in -maven-mvnd-*bin.*) - MVN_CMD=mvnd.sh _MVNW_REPO_PATTERN=/maven/mvnd/ - case "${PROCESSOR_ARCHITECTURE-}${PROCESSOR_ARCHITEW6432-}:$(uname -a)" in - *AMD64:CYGWIN* | *AMD64:MINGW*) distributionPlatform=windows-amd64 ;; - :Darwin*x86_64) distributionPlatform=darwin-amd64 ;; - :Darwin*arm64) distributionPlatform=darwin-aarch64 ;; - :Linux*x86_64*) distributionPlatform=linux-amd64 ;; - *) - echo "Cannot detect native platform for mvnd on $(uname)-$(uname -m), use pure java version" >&2 - distributionPlatform=linux-amd64 - ;; - esac - distributionUrl="${distributionUrl%-bin.*}-$distributionPlatform.zip" - ;; -maven-mvnd-*) MVN_CMD=mvnd.sh _MVNW_REPO_PATTERN=/maven/mvnd/ ;; -*) MVN_CMD="mvn${0##*/mvnw}" _MVNW_REPO_PATTERN=/org/apache/maven/ ;; -esac - -# apply MVNW_REPOURL and calculate MAVEN_HOME -# maven home pattern: ~/.m2/wrapper/dists/{apache-maven-,maven-mvnd--}/ -[ -z "${MVNW_REPOURL-}" ] || distributionUrl="$MVNW_REPOURL$_MVNW_REPO_PATTERN${distributionUrl#*"$_MVNW_REPO_PATTERN"}" -distributionUrlName="${distributionUrl##*/}" -distributionUrlNameMain="${distributionUrlName%.*}" -distributionUrlNameMain="${distributionUrlNameMain%-bin}" -MAVEN_HOME="$HOME/.m2/wrapper/dists/${distributionUrlNameMain-}/$(hash_string "$distributionUrl")" - -exec_maven() { - unset MVNW_VERBOSE MVNW_USERNAME MVNW_PASSWORD MVNW_REPOURL || : - exec "$MAVEN_HOME/bin/$MVN_CMD" "$@" || die "cannot exec $MAVEN_HOME/bin/$MVN_CMD" -} - -if [ -d "$MAVEN_HOME" ]; then - verbose "found existing MAVEN_HOME at $MAVEN_HOME" - exec_maven "$@" -fi - -case "${distributionUrl-}" in -*?-bin.zip | *?maven-mvnd-?*-?*.zip) ;; -*) die "distributionUrl is not valid, must match *-bin.zip or maven-mvnd-*.zip, but found '${distributionUrl-}'" ;; -esac - -# prepare tmp dir -if TMP_DOWNLOAD_DIR="$(mktemp -d)" && [ -d "$TMP_DOWNLOAD_DIR" ]; then - clean() { rm -rf -- "$TMP_DOWNLOAD_DIR"; } - trap clean HUP INT TERM EXIT -else - die "cannot create temp dir" -fi - -mkdir -p -- "${MAVEN_HOME%/*}" - -# Download and Install Apache Maven -verbose "Couldn't find MAVEN_HOME, downloading and installing it ..." -verbose "Downloading from: $distributionUrl" -verbose "Downloading to: $TMP_DOWNLOAD_DIR/$distributionUrlName" - -# select .zip or .tar.gz -if ! command -v unzip >/dev/null; then - distributionUrl="${distributionUrl%.zip}.tar.gz" - distributionUrlName="${distributionUrl##*/}" -fi - -# verbose opt -__MVNW_QUIET_WGET=--quiet __MVNW_QUIET_CURL=--silent __MVNW_QUIET_UNZIP=-q __MVNW_QUIET_TAR='' -[ "${MVNW_VERBOSE-}" != true ] || __MVNW_QUIET_WGET='' __MVNW_QUIET_CURL='' __MVNW_QUIET_UNZIP='' __MVNW_QUIET_TAR=v - -# normalize http auth -case "${MVNW_PASSWORD:+has-password}" in -'') MVNW_USERNAME='' MVNW_PASSWORD='' ;; -has-password) [ -n "${MVNW_USERNAME-}" ] || MVNW_USERNAME='' MVNW_PASSWORD='' ;; -esac - -if [ -z "${MVNW_USERNAME-}" ] && command -v wget >/dev/null; then - verbose "Found wget ... using wget" - wget ${__MVNW_QUIET_WGET:+"$__MVNW_QUIET_WGET"} "$distributionUrl" -O "$TMP_DOWNLOAD_DIR/$distributionUrlName" || die "wget: Failed to fetch $distributionUrl" -elif [ -z "${MVNW_USERNAME-}" ] && command -v curl >/dev/null; then - verbose "Found curl ... using curl" - curl ${__MVNW_QUIET_CURL:+"$__MVNW_QUIET_CURL"} -f -L -o "$TMP_DOWNLOAD_DIR/$distributionUrlName" "$distributionUrl" || die "curl: Failed to fetch $distributionUrl" -elif set_java_home; then - verbose "Falling back to use Java to download" - javaSource="$TMP_DOWNLOAD_DIR/Downloader.java" - targetZip="$TMP_DOWNLOAD_DIR/$distributionUrlName" - cat >"$javaSource" <<-END - public class Downloader extends java.net.Authenticator - { - protected java.net.PasswordAuthentication getPasswordAuthentication() - { - return new java.net.PasswordAuthentication( System.getenv( "MVNW_USERNAME" ), System.getenv( "MVNW_PASSWORD" ).toCharArray() ); - } - public static void main( String[] args ) throws Exception - { - setDefault( new Downloader() ); - java.nio.file.Files.copy( new java.net.URL( args[0] ).openStream(), java.nio.file.Paths.get( args[1] ).toAbsolutePath().normalize() ); - } - } - END - # For Cygwin/MinGW, switch paths to Windows format before running javac and java - verbose " - Compiling Downloader.java ..." - "$(native_path "$JAVACCMD")" "$(native_path "$javaSource")" || die "Failed to compile Downloader.java" - verbose " - Running Downloader.java ..." - "$(native_path "$JAVACMD")" -cp "$(native_path "$TMP_DOWNLOAD_DIR")" Downloader "$distributionUrl" "$(native_path "$targetZip")" -fi - -# If specified, validate the SHA-256 sum of the Maven distribution zip file -if [ -n "${distributionSha256Sum-}" ]; then - distributionSha256Result=false - if [ "$MVN_CMD" = mvnd.sh ]; then - echo "Checksum validation is not supported for maven-mvnd." >&2 - echo "Please disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." >&2 - exit 1 - elif command -v sha256sum >/dev/null; then - if echo "$distributionSha256Sum $TMP_DOWNLOAD_DIR/$distributionUrlName" | sha256sum -c >/dev/null 2>&1; then - distributionSha256Result=true - fi - elif command -v shasum >/dev/null; then - if echo "$distributionSha256Sum $TMP_DOWNLOAD_DIR/$distributionUrlName" | shasum -a 256 -c >/dev/null 2>&1; then - distributionSha256Result=true - fi - else - echo "Checksum validation was requested but neither 'sha256sum' or 'shasum' are available." >&2 - echo "Please install either command, or disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." >&2 - exit 1 - fi - if [ $distributionSha256Result = false ]; then - echo "Error: Failed to validate Maven distribution SHA-256, your Maven distribution might be compromised." >&2 - echo "If you updated your Maven version, you need to update the specified distributionSha256Sum property." >&2 - exit 1 - fi -fi - -# unzip and move -if command -v unzip >/dev/null; then - unzip ${__MVNW_QUIET_UNZIP:+"$__MVNW_QUIET_UNZIP"} "$TMP_DOWNLOAD_DIR/$distributionUrlName" -d "$TMP_DOWNLOAD_DIR" || die "failed to unzip" -else - tar xzf${__MVNW_QUIET_TAR:+"$__MVNW_QUIET_TAR"} "$TMP_DOWNLOAD_DIR/$distributionUrlName" -C "$TMP_DOWNLOAD_DIR" || die "failed to untar" -fi -printf %s\\n "$distributionUrl" >"$TMP_DOWNLOAD_DIR/$distributionUrlNameMain/mvnw.url" -mv -- "$TMP_DOWNLOAD_DIR/$distributionUrlNameMain" "$MAVEN_HOME" || [ -d "$MAVEN_HOME" ] || die "fail to move MAVEN_HOME" - -clean || : -exec_maven "$@" diff --git a/packages/camel-catalog/mvnw.cmd b/packages/camel-catalog/mvnw.cmd deleted file mode 100644 index 33cbf988c..000000000 --- a/packages/camel-catalog/mvnw.cmd +++ /dev/null @@ -1,146 +0,0 @@ -<# : batch portion -@REM ---------------------------------------------------------------------------- -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. -@REM ---------------------------------------------------------------------------- - -@REM ---------------------------------------------------------------------------- -@REM Apache Maven Wrapper startup batch script, version 3.3.0 -@REM -@REM Optional ENV vars -@REM MVNW_REPOURL - repo url base for downloading maven distribution -@REM MVNW_USERNAME/MVNW_PASSWORD - user and password for downloading maven -@REM MVNW_VERBOSE - true: enable verbose log; others: silence the output -@REM ---------------------------------------------------------------------------- - -@IF "%__MVNW_ARG0_NAME__%"=="" (SET __MVNW_ARG0_NAME__=%~nx0) -@SET __MVNW_CMD__= -@SET __MVNW_ERROR__= -@SET __MVNW_PSMODULEP_SAVE=%PSModulePath% -@SET PSModulePath= -@FOR /F "usebackq tokens=1* delims==" %%A IN (`powershell -noprofile "& {$scriptDir='%~dp0'; $script='%__MVNW_ARG0_NAME__%'; icm -ScriptBlock ([Scriptblock]::Create((Get-Content -Raw '%~f0'))) -NoNewScope}"`) DO @( - IF "%%A"=="MVN_CMD" (set __MVNW_CMD__=%%B) ELSE IF "%%B"=="" (echo %%A) ELSE (echo %%A=%%B) -) -@SET PSModulePath=%__MVNW_PSMODULEP_SAVE% -@SET __MVNW_PSMODULEP_SAVE= -@SET __MVNW_ARG0_NAME__= -@SET MVNW_USERNAME= -@SET MVNW_PASSWORD= -@IF NOT "%__MVNW_CMD__%"=="" (%__MVNW_CMD__% %*) -@echo Cannot start maven from wrapper >&2 && exit /b 1 -@GOTO :EOF -: end batch / begin powershell #> - -$ErrorActionPreference = "Stop" -if ($env:MVNW_VERBOSE -eq "true") { - $VerbosePreference = "Continue" -} - -# calculate distributionUrl, requires .mvn/wrapper/maven-wrapper.properties -$distributionUrl = (Get-Content -Raw "$scriptDir/.mvn/wrapper/maven-wrapper.properties" | ConvertFrom-StringData).distributionUrl -if (!$distributionUrl) { - Write-Error "cannot read distributionUrl property in $scriptDir/.mvn/wrapper/maven-wrapper.properties" -} - -switch -wildcard -casesensitive ( $($distributionUrl -replace '^.*/','') ) { - "maven-mvnd-*" { - $USE_MVND = $true - $distributionUrl = $distributionUrl -replace '-bin\.[^.]*$',"-windows-amd64.zip" - $MVN_CMD = "mvnd.cmd" - break - } - default { - $USE_MVND = $false - $MVN_CMD = $script -replace '^mvnw','mvn' - break - } -} - -# apply MVNW_REPOURL and calculate MAVEN_HOME -# maven home pattern: ~/.m2/wrapper/dists/{apache-maven-,maven-mvnd--}/ -if ($env:MVNW_REPOURL) { - $MVNW_REPO_PATTERN = if ($USE_MVND) { "/org/apache/maven/" } else { "/maven/mvnd/" } - $distributionUrl = "$env:MVNW_REPOURL$MVNW_REPO_PATTERN$($distributionUrl -replace '^.*'+$MVNW_REPO_PATTERN,'')" -} -$distributionUrlName = $distributionUrl -replace '^.*/','' -$distributionUrlNameMain = $distributionUrlName -replace '\.[^.]*$','' -replace '-bin$','' -$MAVEN_HOME_PARENT = "$HOME/.m2/wrapper/dists/$distributionUrlNameMain" -$MAVEN_HOME_NAME = ([System.Security.Cryptography.MD5]::Create().ComputeHash([byte[]][char[]]$distributionUrl) | ForEach-Object {$_.ToString("x2")}) -join '' -$MAVEN_HOME = "$MAVEN_HOME_PARENT/$MAVEN_HOME_NAME" - -if (Test-Path -Path "$MAVEN_HOME" -PathType Container) { - Write-Verbose "found existing MAVEN_HOME at $MAVEN_HOME" - Write-Output "MVN_CMD=$MAVEN_HOME/bin/$MVN_CMD" - exit $? -} - -if (! $distributionUrlNameMain -or ($distributionUrlName -eq $distributionUrlNameMain)) { - Write-Error "distributionUrl is not valid, must end with *-bin.zip, but found $distributionUrl" -} - -# prepare tmp dir -$TMP_DOWNLOAD_DIR_HOLDER = New-TemporaryFile -$TMP_DOWNLOAD_DIR = New-Item -Itemtype Directory -Path "$TMP_DOWNLOAD_DIR_HOLDER.dir" -$TMP_DOWNLOAD_DIR_HOLDER.Delete() | Out-Null -trap { - if ($TMP_DOWNLOAD_DIR.Exists) { - try { Remove-Item $TMP_DOWNLOAD_DIR -Recurse -Force | Out-Null } - catch { Write-Warning "Cannot remove $TMP_DOWNLOAD_DIR" } - } -} - -New-Item -Itemtype Directory -Path "$MAVEN_HOME_PARENT" -Force | Out-Null - -# Download and Install Apache Maven -Write-Verbose "Couldn't find MAVEN_HOME, downloading and installing it ..." -Write-Verbose "Downloading from: $distributionUrl" -Write-Verbose "Downloading to: $TMP_DOWNLOAD_DIR/$distributionUrlName" - -$webclient = New-Object System.Net.WebClient -if ($env:MVNW_USERNAME -and $env:MVNW_PASSWORD) { - $webclient.Credentials = New-Object System.Net.NetworkCredential($env:MVNW_USERNAME, $env:MVNW_PASSWORD) -} -[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 -$webclient.DownloadFile($distributionUrl, "$TMP_DOWNLOAD_DIR/$distributionUrlName") | Out-Null - -# If specified, validate the SHA-256 sum of the Maven distribution zip file -$distributionSha256Sum = (Get-Content -Raw "$scriptDir/.mvn/wrapper/maven-wrapper.properties" | ConvertFrom-StringData).distributionSha256Sum -if ($distributionSha256Sum) { - if ($USE_MVND) { - Write-Error "Checksum validation is not supported for maven-mvnd. `nPlease disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." - } - Import-Module $PSHOME\Modules\Microsoft.PowerShell.Utility -Function Get-FileHash - if ((Get-FileHash "$TMP_DOWNLOAD_DIR/$distributionUrlName" -Algorithm SHA256).Hash.ToLower() -ne $distributionSha256Sum) { - Write-Error "Error: Failed to validate Maven distribution SHA-256, your Maven distribution might be compromised. If you updated your Maven version, you need to update the specified distributionSha256Sum property." - } -} - -# unzip and move -Expand-Archive "$TMP_DOWNLOAD_DIR/$distributionUrlName" -DestinationPath "$TMP_DOWNLOAD_DIR" | Out-Null -Rename-Item -Path "$TMP_DOWNLOAD_DIR/$distributionUrlNameMain" -NewName $MAVEN_HOME_NAME | Out-Null -try { - Move-Item -Path "$TMP_DOWNLOAD_DIR/$MAVEN_HOME_NAME" -Destination $MAVEN_HOME_PARENT | Out-Null -} catch { - if (! (Test-Path -Path "$MAVEN_HOME" -PathType Container)) { - Write-Error "fail to move MAVEN_HOME" - } -} finally { - try { Remove-Item $TMP_DOWNLOAD_DIR -Recurse -Force | Out-Null } - catch { Write-Warning "Cannot remove $TMP_DOWNLOAD_DIR" } -} - -Write-Output "MVN_CMD=$MAVEN_HOME/bin/$MVN_CMD" diff --git a/packages/camel-catalog/package.json b/packages/camel-catalog/package.json deleted file mode 100644 index b6c20dfaa..000000000 --- a/packages/camel-catalog/package.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "@kaoto/camel-catalog-plugin", - "version": "2.3.0-dev", - "type": "commonjs", - "description": "Camel Catalog and schemas for Kaoto", - "repository": "https://github.com/KaotoIO/kaoto", - "repositoryDirectory": "packages/camel-catalog", - "author": "The Kaoto Team", - "license": "Apache License v2.0", - "private": true, - "main": "./package.json", - "exports": { - ".": "./dist", - "./index.json": "./dist/index.json", - "./types": "./dist/types/index.ts", - "./package.json": "./package.json", - "./*.json": "./dist/*.json" - }, - "scripts": { - "build": "yarn clean && yarn build:mvn && yarn build:ts", - "build:mvn": "./mvnw clean install", - "build:ts": "node --loader ts-node/esm ./src/json-schema-to-typescript.mts", - "lint": "yarn eslint \"src/**/*.{mts,ts}\"", - "lint:fix": "yarn lint --fix", - "clean": "yarn rimraf ./dist" - }, - "devDependencies": { - "@eslint/js": "^9.10.0", - "@types/eslint__js": "^8.42.3", - "@types/node": "^20.0.0", - "eslint": "^9.10.0", - "eslint-config-prettier": "^9.1.0", - "eslint-plugin-prettier": "^5.2.1", - "json-schema-to-typescript": "^15.0.0", - "prettier": "^3.0.0", - "rimraf": "^6.0.0", - "ts-node": "^10.9.1", - "typescript": "^5.4.2", - "typescript-eslint": "^8.5.0" - } -} diff --git a/packages/camel-catalog/pom.xml b/packages/camel-catalog/pom.xml deleted file mode 100644 index ac4f7b559..000000000 --- a/packages/camel-catalog/pom.xml +++ /dev/null @@ -1,166 +0,0 @@ - - 4.0.0 - io.kaoto - kaoto-camel-catalog-parent - pom - 0.0.1-SNAPSHOT - kaoto-camel-catalog-parent - - The Apache Camel catalog and YAML DSL schema collection to be used in Kaoto. - - https://kaoto.io - - - - apache.snapshots - Apache Snapshots - https://repository.apache.org/content/repositories/snapshots/ - - false - - - true - - - - - - apache.snapshots - Apache Snapshots - https://repository.apache.org/content/repositories/snapshots/ - - false - - - true - - - - - - UTF-8 - 4.8.0 - 2.4.0 - 4.7.0 - 2.17.2 - 21 - 5.11.0 - 6.13.3 - 3.1.0 - 3.13.0 - 3.8.0 - 3.5.0 - 3.3.1 - 3.15.0 - 3.9.9 - 3.15.0 - - - - kaoto-camel-catalog-maven-plugin - assembly - - - - - - org.apache.camel - camel-bom - ${version.camel} - pom - import - - - org.apache.camel.kamelets - camel-kamelets - ${version.camel-kamelets} - - - org.apache.maven - maven-plugin-api - ${version.maven-plugin-api} - - - org.apache.maven.plugin-tools - maven-plugin-annotations - ${version.maven-plugin-annotations} - - - com.fasterxml.jackson.core - jackson-databind - ${version.jackson} - - - com.fasterxml.jackson.dataformat - jackson-dataformat-yaml - ${version.jackson} - - - io.fabric8 - kubernetes-model - ${version.kubernetes-model} - - - org.junit.jupiter - junit-jupiter-api - ${version.junit} - test - - - org.junit.jupiter - junit-jupiter-engine - ${version.junit} - test - - - - - - - - - maven-dependency-plugin - ${version.maven-dependency-plugin} - - - maven-antrun-plugin - ${version.maven-antrun-plugin} - - - maven-surefire-plugin - ${version.maven-surefire-plugin} - - - maven-resources-plugin - ${version.maven-resources-plugin} - - - maven-plugin-plugin - ${version.maven-plugin-plugin} - - ${project.build.sourceEncoding} - - - - maven-compiler-plugin - ${version.maven-compiler-plugin} - - ${project.build.sourceEncoding} - ${version.java} - - - - org.apache.camel - camel-yaml-dsl-maven-plugin - ${version.camel} - - - io.kaoto - kaoto-camel-catalog-maven-plugin - ${project.version} - - - - - diff --git a/packages/camel-catalog/src/json-schema-to-typescript.mts b/packages/camel-catalog/src/json-schema-to-typescript.mts deleted file mode 100644 index c0c83af21..000000000 --- a/packages/camel-catalog/src/json-schema-to-typescript.mts +++ /dev/null @@ -1,104 +0,0 @@ -#!/usr/bin/env ts-node - -/** - * This script generates TypeScript types from the JSON schemas in the dist folder. - */ -import { mkdir, writeFile } from 'fs/promises'; -import { JSONSchema, compile } from 'json-schema-to-typescript'; -import { pathToFileURL } from 'node:url'; -import { resolve } from 'path'; -import { rimraf } from 'rimraf'; -import index from '../dist/index.json' assert { type: 'json' }; - -/** Function to ensure the dist/types folder is created and empty */ -const ensureTypesFolder = async () => { - const typesFolder = resolve('./dist/types'); - - await rimraf(typesFolder, { filter: (path) => !path.includes('catalog-index.d.ts') }); - await mkdir(typesFolder, { recursive: true }); -}; - -/** Function to compile a JSON schema file to a TypeScript file */ -const compileSchema = async (schemaContent: JSONSchema, name: string, outputFile: string) => { - const ts = await compile(schemaContent, name); - await writeFile(outputFile, ts); -}; - -/** - * Function to add a title property for schema properties that doesn't contains it - * The goal for this is to provide a better naming for the generated types - */ -const addTitleToDefinitions = (schema: JSONSchema) => { - if (!schema.items || Array.isArray(schema.items) || !schema.items.definitions) { - return; - } - - Object.entries(schema.items.definitions).forEach(([key, value]) => { - if (value.title) { - return; - } - - const title = key.split('.').slice(-1).join(''); - console.log(`\tAdding title to ${key}: ${title}`); - - value.title = title; - }); -}; - -/** Main function */ -async function main() { - await ensureTypesFolder(); - - const exportedFiles: string[] = ['catalog-index']; - - console.log('---'); - const targetSchemaNames = [ - 'camelYamlDsl', - 'Integration', - 'Kamelet', - 'KameletBinding', - 'Pipe', - 'ObjectMeta', - 'ObjectReference', - 'PipeErrorHandler', - ]; - const schemaPromises = Object.entries(index.schemas).map(async ([name, schema]) => { - if (!targetSchemaNames.includes(name)) { - return; - } - - const schemaFile = resolve(`./dist/${schema.file}`); - - /** - * In windows, path starting with C:\ are not supported - * We need to add file:// to the path to make it work - * [pathToFileURL](https://nodejs.org/api/url.html#url_url_pathtofileurl_path) - * Related issue: https://github.com/nodejs/node/issues/31710 - */ - const schemaFileUri = pathToFileURL(`./dist/${schema.file}`).toString(); - - const schemaContent = (await import(schemaFileUri, { assert: { type: 'json' } })).default; - - addTitleToDefinitions(schemaContent); - - /** Remove the -4.0.0.json section of the filename */ - const outputFile = resolve(`./dist/types/${name}.d.ts`); - - /** Add the file to the exported files */ - exportedFiles.push(name); - - console.log(`Input: '${schemaFile}'`); - console.log(`Output: ${outputFile}`); - console.log('---'); - - return compileSchema(schemaContent, name, outputFile); - }); - await Promise.all(schemaPromises); - - /** Generate the index file */ - const indexFile = resolve(`./dist/types/index.ts`); - const indexContent = exportedFiles.map((file) => `export * from './${file}';`).join('\n'); - await writeFile(indexFile, indexContent); -} - -main(); diff --git a/packages/camel-catalog/tsconfig.json b/packages/camel-catalog/tsconfig.json deleted file mode 100644 index 25784ab7e..000000000 --- a/packages/camel-catalog/tsconfig.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "compilerOptions": { - "target": "ES2020", - "useDefineForClassFields": true, - "lib": ["ES2020", "DOM", "DOM.Iterable"], - "module": "ESNext", - "skipLibCheck": true, - - /* Bundler mode */ - "moduleResolution": "Node", - "allowImportingTsExtensions": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "resolveJsonModule": true, - "isolatedModules": true, - "noEmit": true, - - /* Linting */ - "strict": true, - "noUnusedLocals": false, - "noUnusedParameters": false, - "noFallthroughCasesInSwitch": true, - }, - "include": ["src"], -} diff --git a/packages/catalog-generator/pom.xml b/packages/catalog-generator/pom.xml index eea4cac5a..9e560b8b0 100644 --- a/packages/catalog-generator/pom.xml +++ b/packages/catalog-generator/pom.xml @@ -37,6 +37,11 @@ camel-catalog ${version.camel} + + org.apache.camel + camel-yaml-dsl + ${version.camel} + org.apache.camel camel-catalog-maven diff --git a/packages/catalog-generator/src/main/java/io/kaoto/camelcatalog/generator/CamelYamlDSLKeysComparator.java b/packages/catalog-generator/src/main/java/io/kaoto/camelcatalog/generator/CamelYamlDSLKeysComparator.java index ce0468c1f..ad4014435 100644 --- a/packages/catalog-generator/src/main/java/io/kaoto/camelcatalog/generator/CamelYamlDSLKeysComparator.java +++ b/packages/catalog-generator/src/main/java/io/kaoto/camelcatalog/generator/CamelYamlDSLKeysComparator.java @@ -1,3 +1,18 @@ +/* + * Copyright (C) 2023 Red Hat, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.kaoto.camelcatalog.generator; import java.util.Comparator; diff --git a/packages/catalog-generator/src/main/java/io/kaoto/camelcatalog/generator/CatalogGenerator.java b/packages/catalog-generator/src/main/java/io/kaoto/camelcatalog/generator/CatalogGenerator.java index 1a72b9fbe..41a410f0a 100644 --- a/packages/catalog-generator/src/main/java/io/kaoto/camelcatalog/generator/CatalogGenerator.java +++ b/packages/catalog-generator/src/main/java/io/kaoto/camelcatalog/generator/CatalogGenerator.java @@ -1,3 +1,18 @@ +/* + * Copyright (C) 2023 Red Hat, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.kaoto.camelcatalog.generator; import com.fasterxml.jackson.core.JsonFactory; diff --git a/packages/catalog-generator/src/main/java/io/kaoto/camelcatalog/generator/KameletProcessor.java b/packages/catalog-generator/src/main/java/io/kaoto/camelcatalog/generator/KameletProcessor.java index a36723b91..56fc8084d 100644 --- a/packages/catalog-generator/src/main/java/io/kaoto/camelcatalog/generator/KameletProcessor.java +++ b/packages/catalog-generator/src/main/java/io/kaoto/camelcatalog/generator/KameletProcessor.java @@ -1,3 +1,18 @@ +/* + * Copyright (C) 2023 Red Hat, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.kaoto.camelcatalog.generator; import com.fasterxml.jackson.databind.node.ObjectNode; diff --git a/packages/catalog-generator/src/main/java/io/kaoto/camelcatalog/maven/CamelCatalogVersionLoader.java b/packages/catalog-generator/src/main/java/io/kaoto/camelcatalog/maven/CamelCatalogVersionLoader.java index 375d5eb1e..31323bdae 100644 --- a/packages/catalog-generator/src/main/java/io/kaoto/camelcatalog/maven/CamelCatalogVersionLoader.java +++ b/packages/catalog-generator/src/main/java/io/kaoto/camelcatalog/maven/CamelCatalogVersionLoader.java @@ -1,3 +1,18 @@ +/* + * Copyright (C) 2023 Red Hat, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.kaoto.camelcatalog.maven; import java.io.IOException; diff --git a/packages/catalog-generator/src/main/java/io/kaoto/camelcatalog/model/CatalogCliArgument.java b/packages/catalog-generator/src/main/java/io/kaoto/camelcatalog/model/CatalogCliArgument.java index 29b76ffa3..5802cb2bc 100644 --- a/packages/catalog-generator/src/main/java/io/kaoto/camelcatalog/model/CatalogCliArgument.java +++ b/packages/catalog-generator/src/main/java/io/kaoto/camelcatalog/model/CatalogCliArgument.java @@ -1,3 +1,18 @@ +/* + * Copyright (C) 2023 Red Hat, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.kaoto.camelcatalog.model; public class CatalogCliArgument { diff --git a/packages/catalog-generator/src/main/java/io/kaoto/camelcatalog/model/CatalogDefinitionEntry.java b/packages/catalog-generator/src/main/java/io/kaoto/camelcatalog/model/CatalogDefinitionEntry.java index 6f1621983..c91a6eb23 100644 --- a/packages/catalog-generator/src/main/java/io/kaoto/camelcatalog/model/CatalogDefinitionEntry.java +++ b/packages/catalog-generator/src/main/java/io/kaoto/camelcatalog/model/CatalogDefinitionEntry.java @@ -1,3 +1,18 @@ +/* + * Copyright (C) 2023 Red Hat, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.kaoto.camelcatalog.model; public record CatalogDefinitionEntry(String name, String description, String version, String file) {} diff --git a/packages/catalog-generator/src/main/java/io/kaoto/camelcatalog/model/CatalogLibrary.java b/packages/catalog-generator/src/main/java/io/kaoto/camelcatalog/model/CatalogLibrary.java index 4041c7440..39e300f6a 100644 --- a/packages/catalog-generator/src/main/java/io/kaoto/camelcatalog/model/CatalogLibrary.java +++ b/packages/catalog-generator/src/main/java/io/kaoto/camelcatalog/model/CatalogLibrary.java @@ -1,3 +1,18 @@ +/* + * Copyright (C) 2023 Red Hat, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.kaoto.camelcatalog.model; import java.util.ArrayList; diff --git a/packages/catalog-generator/src/main/java/io/kaoto/camelcatalog/model/CatalogLibraryEntry.java b/packages/catalog-generator/src/main/java/io/kaoto/camelcatalog/model/CatalogLibraryEntry.java index 47da60fc5..0df3f8c07 100644 --- a/packages/catalog-generator/src/main/java/io/kaoto/camelcatalog/model/CatalogLibraryEntry.java +++ b/packages/catalog-generator/src/main/java/io/kaoto/camelcatalog/model/CatalogLibraryEntry.java @@ -1,3 +1,18 @@ +/* + * Copyright (C) 2023 Red Hat, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.kaoto.camelcatalog.model; public record CatalogLibraryEntry(String name, String version, String runtime, String fileName) {} diff --git a/packages/catalog-generator/src/main/java/io/kaoto/camelcatalog/model/CatalogRuntime.java b/packages/catalog-generator/src/main/java/io/kaoto/camelcatalog/model/CatalogRuntime.java index c97710dd3..f9e9af59e 100644 --- a/packages/catalog-generator/src/main/java/io/kaoto/camelcatalog/model/CatalogRuntime.java +++ b/packages/catalog-generator/src/main/java/io/kaoto/camelcatalog/model/CatalogRuntime.java @@ -1,3 +1,18 @@ +/* + * Copyright (C) 2023 Red Hat, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.kaoto.camelcatalog.model; public enum CatalogRuntime { diff --git a/packages/catalog-generator/src/main/java/io/kaoto/camelcatalog/model/Constants.java b/packages/catalog-generator/src/main/java/io/kaoto/camelcatalog/model/Constants.java index df38892e0..960f46679 100644 --- a/packages/catalog-generator/src/main/java/io/kaoto/camelcatalog/model/Constants.java +++ b/packages/catalog-generator/src/main/java/io/kaoto/camelcatalog/model/Constants.java @@ -1,3 +1,18 @@ +/* + * Copyright (C) 2023 Red Hat, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.kaoto.camelcatalog.model; import java.util.List; diff --git a/packages/catalog-generator/src/main/java/io/kaoto/camelcatalog/model/MavenCoordinates.java b/packages/catalog-generator/src/main/java/io/kaoto/camelcatalog/model/MavenCoordinates.java index 0b58164db..e89e303a2 100644 --- a/packages/catalog-generator/src/main/java/io/kaoto/camelcatalog/model/MavenCoordinates.java +++ b/packages/catalog-generator/src/main/java/io/kaoto/camelcatalog/model/MavenCoordinates.java @@ -1,3 +1,18 @@ +/* + * Copyright (C) 2023 Red Hat, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.kaoto.camelcatalog.model; public class MavenCoordinates { diff --git a/packages/catalog-generator/src/test/java/io/kaoto/camelcatalog/MainTest.java b/packages/catalog-generator/src/test/java/io/kaoto/camelcatalog/MainTest.java index 360f9b984..998b03adf 100644 --- a/packages/catalog-generator/src/test/java/io/kaoto/camelcatalog/MainTest.java +++ b/packages/catalog-generator/src/test/java/io/kaoto/camelcatalog/MainTest.java @@ -1,5 +1,21 @@ +/* + * Copyright (C) 2023 Red Hat, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.kaoto.camelcatalog; +import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.Mockito.doNothing; import static org.mockito.Mockito.doThrow; @@ -42,7 +58,7 @@ public void testMainNormalExecution() throws Exception { verify(mockedGenerateCommandOptions.constructed().get(0)).configure(args); verify(mockedGenerateCommand.constructed().get(0)).run(); - assertTrue(exitCode[0] == EXIT_CODE_SUCCESS); + assertEquals(EXIT_CODE_SUCCESS, exitCode[0]); } } @@ -70,7 +86,7 @@ public void testMainAbnormalExecution() throws Exception { verify(mockedGenerateCommandOptions.constructed().get(0)).configure(args); verify(mockedGenerateCommand.constructed().get(0)).run(); - assertTrue(exitCode[0] == EXIT_CODE_FAILURE); + assertEquals(EXIT_CODE_FAILURE, exitCode[0]); } } } diff --git a/packages/catalog-generator/src/test/java/io/kaoto/camelcatalog/beans/ConfigBeanTest.java b/packages/catalog-generator/src/test/java/io/kaoto/camelcatalog/beans/ConfigBeanTest.java index be9d6d105..1dc189ff9 100644 --- a/packages/catalog-generator/src/test/java/io/kaoto/camelcatalog/beans/ConfigBeanTest.java +++ b/packages/catalog-generator/src/test/java/io/kaoto/camelcatalog/beans/ConfigBeanTest.java @@ -1,3 +1,18 @@ +/* + * Copyright (C) 2023 Red Hat, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.kaoto.camelcatalog.beans; import io.kaoto.camelcatalog.model.CatalogCliArgument; diff --git a/packages/catalog-generator/src/test/java/io/kaoto/camelcatalog/commands/GenerateCommandOptionsTest.java b/packages/catalog-generator/src/test/java/io/kaoto/camelcatalog/commands/GenerateCommandOptionsTest.java index a95b9cee8..3db10ba2d 100644 --- a/packages/catalog-generator/src/test/java/io/kaoto/camelcatalog/commands/GenerateCommandOptionsTest.java +++ b/packages/catalog-generator/src/test/java/io/kaoto/camelcatalog/commands/GenerateCommandOptionsTest.java @@ -1,3 +1,18 @@ +/* + * Copyright (C) 2023 Red Hat, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.kaoto.camelcatalog.commands; import static org.junit.jupiter.api.Assertions.assertEquals; diff --git a/packages/catalog-generator/src/test/java/io/kaoto/camelcatalog/commands/GenerateCommandTest.java b/packages/catalog-generator/src/test/java/io/kaoto/camelcatalog/commands/GenerateCommandTest.java index 3d5c01bdd..d569d79c7 100644 --- a/packages/catalog-generator/src/test/java/io/kaoto/camelcatalog/commands/GenerateCommandTest.java +++ b/packages/catalog-generator/src/test/java/io/kaoto/camelcatalog/commands/GenerateCommandTest.java @@ -1,3 +1,18 @@ +/* + * Copyright (C) 2023 Red Hat, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.kaoto.camelcatalog.commands; import io.kaoto.camelcatalog.beans.ConfigBean; diff --git a/packages/camel-catalog/kaoto-camel-catalog-maven-plugin/src/test/java/io/kaoto/camelcatalog/CamelCatalogProcessorTest.java b/packages/catalog-generator/src/test/java/io/kaoto/camelcatalog/generator/CamelCatalogProcessorTest.java similarity index 95% rename from packages/camel-catalog/kaoto-camel-catalog-maven-plugin/src/test/java/io/kaoto/camelcatalog/CamelCatalogProcessorTest.java rename to packages/catalog-generator/src/test/java/io/kaoto/camelcatalog/generator/CamelCatalogProcessorTest.java index 33e660097..91af49402 100644 --- a/packages/camel-catalog/kaoto-camel-catalog-maven-plugin/src/test/java/io/kaoto/camelcatalog/CamelCatalogProcessorTest.java +++ b/packages/catalog-generator/src/test/java/io/kaoto/camelcatalog/generator/CamelCatalogProcessorTest.java @@ -13,11 +13,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.kaoto.camelcatalog; +package io.kaoto.camelcatalog.generator; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.node.ArrayNode; import com.fasterxml.jackson.databind.node.ObjectNode; +import io.kaoto.camelcatalog.model.CatalogRuntime; +import org.apache.camel.catalog.CamelCatalog; +import org.apache.camel.catalog.DefaultCamelCatalog; import org.apache.camel.dsl.yaml.YamlRoutesBuilderLoader; import org.junit.jupiter.api.Test; @@ -28,11 +31,8 @@ import static org.junit.jupiter.api.Assertions.*; public class CamelCatalogProcessorTest { - private static final List ALLOWED_ENUM_TYPES = List.of("integer", "number", "string" ); - private final ObjectMapper jsonMapper; + private static final List ALLOWED_ENUM_TYPES = List.of("integer", "number", "string"); private final CamelCatalogProcessor processor; - private final ObjectNode yamlDslSchema; - private final CamelYamlDslSchemaProcessor schemaProcessor; private final ObjectNode componentCatalog; private final ObjectNode dataFormatCatalog; private final ObjectNode languageCatalog; @@ -42,11 +42,14 @@ public class CamelCatalogProcessorTest { private final ObjectNode loadBalancerCatalog; public CamelCatalogProcessorTest() throws Exception { - this.jsonMapper = new ObjectMapper(); + CamelCatalog catalog = new DefaultCamelCatalog(); + ObjectMapper jsonMapper = new ObjectMapper(); var is = YamlRoutesBuilderLoader.class.getClassLoader().getResourceAsStream("schema/camelYamlDsl.json"); - yamlDslSchema = (ObjectNode) jsonMapper.readTree(is); - schemaProcessor = new CamelYamlDslSchemaProcessor(jsonMapper, yamlDslSchema); - this.processor = new CamelCatalogProcessor(jsonMapper, schemaProcessor); + ObjectNode yamlDslSchema = (ObjectNode) jsonMapper.readTree(is); + CamelYamlDslSchemaProcessor schemaProcessor = new CamelYamlDslSchemaProcessor(jsonMapper, yamlDslSchema); + + this.processor = new CamelCatalogProcessor(catalog, jsonMapper, schemaProcessor, CatalogRuntime.Main, true); + this.componentCatalog = (ObjectNode) jsonMapper.readTree(this.processor.getComponentCatalog()); this.dataFormatCatalog = (ObjectNode) jsonMapper.readTree(this.processor.getDataFormatCatalog()); this.languageCatalog = (ObjectNode) jsonMapper.readTree(this.processor.getLanguageCatalog()); diff --git a/packages/camel-catalog/kaoto-camel-catalog-maven-plugin/src/test/java/io/kaoto/camelcatalog/CamelYamlDSLKeysComparatorTest.java b/packages/catalog-generator/src/test/java/io/kaoto/camelcatalog/generator/CamelYamlDSLKeysComparatorTest.java similarity index 81% rename from packages/camel-catalog/kaoto-camel-catalog-maven-plugin/src/test/java/io/kaoto/camelcatalog/CamelYamlDSLKeysComparatorTest.java rename to packages/catalog-generator/src/test/java/io/kaoto/camelcatalog/generator/CamelYamlDSLKeysComparatorTest.java index 4a4b8dd9e..1a8d1192e 100644 --- a/packages/camel-catalog/kaoto-camel-catalog-maven-plugin/src/test/java/io/kaoto/camelcatalog/CamelYamlDSLKeysComparatorTest.java +++ b/packages/catalog-generator/src/test/java/io/kaoto/camelcatalog/generator/CamelYamlDSLKeysComparatorTest.java @@ -1,53 +1,68 @@ -package io.kaoto.camelcatalog; - -import static org.junit.jupiter.api.Assertions.assertEquals; - -import java.util.Comparator; -import java.util.List; - -import org.apache.camel.catalog.DefaultCamelCatalog; -import org.apache.camel.tooling.model.EipModel; -import org.apache.camel.tooling.model.Kind; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; - -public class CamelYamlDSLKeysComparatorTest { - private DefaultCamelCatalog api; - - @BeforeEach - public void setUp() { - this.api = new DefaultCamelCatalog(); - } - - @Test - public void sort_keys_using_the_catalog_index() throws Exception { - var aggregateCatalogModel = (EipModel) api.model(Kind.eip, "aggregate"); - - List aggregateKeysFromCamelYAMLDsl = List.of("aggregateController", "aggregationRepository", - "aggregationStrategy", "aggregationStrategyMethodAllowNull", "aggregationStrategyMethodName", - "closeCorrelationKeyOnCompletion", "completeAllOnStop", "completionFromBatchConsumer", - "completionInterval", "completionOnNewCorrelationGroup", "completionPredicate", "completionSize", - "completionSizeExpression", "completionTimeout", "completionTimeoutCheckerInterval", - "completionTimeoutExpression", "correlationExpression", "description", "disabled", - "discardOnAggregationFailure", "discardOnCompletionTimeout", "eagerCheckCompletion", "executorService", - "forceCompletionOnStop", "id", "ignoreInvalidCorrelationKeys", "optimisticLockRetryPolicy", - "optimisticLocking", "parallelProcessing", "steps", "timeoutCheckerExecutorService"); - - List expected = List.of("id", "description", "disabled", "correlationExpression", "completionPredicate", - "completionTimeoutExpression", "completionSizeExpression", "optimisticLockRetryPolicy", - "parallelProcessing", "optimisticLocking", "executorService", "timeoutCheckerExecutorService", - "aggregateController", "aggregationRepository", "aggregationStrategy", "aggregationStrategyMethodName", - "aggregationStrategyMethodAllowNull", "completionSize", "completionInterval", "completionTimeout", - "completionTimeoutCheckerInterval", "completionFromBatchConsumer", "completionOnNewCorrelationGroup", - "eagerCheckCompletion", "ignoreInvalidCorrelationKeys", "closeCorrelationKeyOnCompletion", - "discardOnCompletionTimeout", "discardOnAggregationFailure", "forceCompletionOnStop", - "completeAllOnStop", "steps"); - - Comparator comparator = new CamelYamlDSLKeysComparator(aggregateCatalogModel.getOptions()); - - List result = aggregateKeysFromCamelYAMLDsl.stream().sorted(comparator).toList(); - - assertEquals(result, expected); - } - -} +/* + * Copyright (C) 2023 Red Hat, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.kaoto.camelcatalog.generator; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +import java.util.Comparator; +import java.util.List; + +import org.apache.camel.catalog.DefaultCamelCatalog; +import org.apache.camel.tooling.model.EipModel; +import org.apache.camel.tooling.model.Kind; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +public class CamelYamlDSLKeysComparatorTest { + private DefaultCamelCatalog api; + + @BeforeEach + public void setUp() { + this.api = new DefaultCamelCatalog(); + } + + @Test + public void sort_keys_using_the_catalog_index() throws Exception { + var aggregateCatalogModel = (EipModel) api.model(Kind.eip, "aggregate"); + + List aggregateKeysFromCamelYAMLDsl = List.of("aggregateController", "aggregationRepository", + "aggregationStrategy", "aggregationStrategyMethodAllowNull", "aggregationStrategyMethodName", + "closeCorrelationKeyOnCompletion", "completeAllOnStop", "completionFromBatchConsumer", + "completionInterval", "completionOnNewCorrelationGroup", "completionPredicate", "completionSize", + "completionSizeExpression", "completionTimeout", "completionTimeoutCheckerInterval", + "completionTimeoutExpression", "correlationExpression", "description", "disabled", + "discardOnAggregationFailure", "discardOnCompletionTimeout", "eagerCheckCompletion", "executorService", + "forceCompletionOnStop", "id", "ignoreInvalidCorrelationKeys", "optimisticLockRetryPolicy", + "optimisticLocking", "parallelProcessing", "steps", "timeoutCheckerExecutorService"); + + List expected = List.of("id", "description", "disabled", "correlationExpression", "completionPredicate", + "completionTimeoutExpression", "completionSizeExpression", "optimisticLockRetryPolicy", + "parallelProcessing", "optimisticLocking", "executorService", "timeoutCheckerExecutorService", + "aggregateController", "aggregationRepository", "aggregationStrategy", "aggregationStrategyMethodName", + "aggregationStrategyMethodAllowNull", "completionSize", "completionInterval", "completionTimeout", + "completionTimeoutCheckerInterval", "completionFromBatchConsumer", "completionOnNewCorrelationGroup", + "eagerCheckCompletion", "ignoreInvalidCorrelationKeys", "closeCorrelationKeyOnCompletion", + "discardOnCompletionTimeout", "discardOnAggregationFailure", "forceCompletionOnStop", + "completeAllOnStop", "steps"); + + Comparator comparator = new CamelYamlDSLKeysComparator(aggregateCatalogModel.getOptions()); + + List result = aggregateKeysFromCamelYAMLDsl.stream().sorted(comparator).toList(); + + assertEquals(result, expected); + } + +} diff --git a/packages/camel-catalog/kaoto-camel-catalog-maven-plugin/src/test/java/io/kaoto/camelcatalog/CamelYamlDslSchemaProcessorTest.java b/packages/catalog-generator/src/test/java/io/kaoto/camelcatalog/generator/CamelYamlDslSchemaProcessorTest.java similarity index 99% rename from packages/camel-catalog/kaoto-camel-catalog-maven-plugin/src/test/java/io/kaoto/camelcatalog/CamelYamlDslSchemaProcessorTest.java rename to packages/catalog-generator/src/test/java/io/kaoto/camelcatalog/generator/CamelYamlDslSchemaProcessorTest.java index 885437f66..0d6f07a3b 100644 --- a/packages/camel-catalog/kaoto-camel-catalog-maven-plugin/src/test/java/io/kaoto/camelcatalog/CamelYamlDslSchemaProcessorTest.java +++ b/packages/catalog-generator/src/test/java/io/kaoto/camelcatalog/generator/CamelYamlDslSchemaProcessorTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.kaoto.camelcatalog; +package io.kaoto.camelcatalog.generator; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.node.ObjectNode; diff --git a/packages/camel-catalog/kaoto-camel-catalog-maven-plugin/src/test/java/io/kaoto/camelcatalog/K8sSchemaProcessorTest.java b/packages/catalog-generator/src/test/java/io/kaoto/camelcatalog/generator/K8sSchemaProcessorTest.java similarity index 97% rename from packages/camel-catalog/kaoto-camel-catalog-maven-plugin/src/test/java/io/kaoto/camelcatalog/K8sSchemaProcessorTest.java rename to packages/catalog-generator/src/test/java/io/kaoto/camelcatalog/generator/K8sSchemaProcessorTest.java index 9fb9ac0c7..3b2cc8570 100644 --- a/packages/camel-catalog/kaoto-camel-catalog-maven-plugin/src/test/java/io/kaoto/camelcatalog/K8sSchemaProcessorTest.java +++ b/packages/catalog-generator/src/test/java/io/kaoto/camelcatalog/generator/K8sSchemaProcessorTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.kaoto.camelcatalog; +package io.kaoto.camelcatalog.generator; import com.fasterxml.jackson.databind.node.ObjectNode; import com.fasterxml.jackson.databind.ObjectMapper; diff --git a/packages/camel-catalog/kaoto-camel-catalog-maven-plugin/src/test/java/io/kaoto/camelcatalog/KameletProcessorTest.java b/packages/catalog-generator/src/test/java/io/kaoto/camelcatalog/generator/KameletProcessorTest.java similarity index 99% rename from packages/camel-catalog/kaoto-camel-catalog-maven-plugin/src/test/java/io/kaoto/camelcatalog/KameletProcessorTest.java rename to packages/catalog-generator/src/test/java/io/kaoto/camelcatalog/generator/KameletProcessorTest.java index 76e7451e6..7700b8d38 100644 --- a/packages/camel-catalog/kaoto-camel-catalog-maven-plugin/src/test/java/io/kaoto/camelcatalog/KameletProcessorTest.java +++ b/packages/catalog-generator/src/test/java/io/kaoto/camelcatalog/generator/KameletProcessorTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.kaoto.camelcatalog; +package io.kaoto.camelcatalog.generator; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; diff --git a/packages/camel-catalog/kaoto-camel-catalog-maven-plugin/src/test/java/io/kaoto/camelcatalog/UtilTest.java b/packages/catalog-generator/src/test/java/io/kaoto/camelcatalog/generator/UtilTest.java similarity index 93% rename from packages/camel-catalog/kaoto-camel-catalog-maven-plugin/src/test/java/io/kaoto/camelcatalog/UtilTest.java rename to packages/catalog-generator/src/test/java/io/kaoto/camelcatalog/generator/UtilTest.java index c66629818..3cc3e4b07 100644 --- a/packages/camel-catalog/kaoto-camel-catalog-maven-plugin/src/test/java/io/kaoto/camelcatalog/UtilTest.java +++ b/packages/catalog-generator/src/test/java/io/kaoto/camelcatalog/generator/UtilTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.kaoto.camelcatalog; +package io.kaoto.camelcatalog.generator; import org.junit.jupiter.api.Test; @@ -52,12 +52,12 @@ public void testGenerateHash() throws Exception { @Test public void testGenerateHashFromPath() throws Exception { - var url = Thread.currentThread().getContextClassLoader().getResource(testFiles.getFirst()); + var url = Thread.currentThread().getContextClassLoader().getResource(testFiles.get(0)); if (url == null) throw new Exception("no test file available"); var testFilePath = Path.of(url.toURI()); var hash = Util.generateHash(testFilePath); assertNotNull(hash); - url = Thread.currentThread().getContextClassLoader().getResource(testFiles.getFirst()); + url = Thread.currentThread().getContextClassLoader().getResource(testFiles.get(0)); if (url == null) throw new Exception("no test file available"); testFilePath = Path.of(url.toURI()); var hash2 = Util.generateHash(testFilePath); @@ -66,12 +66,12 @@ public void testGenerateHashFromPath() throws Exception { @Test public void testGenerateHashFromString() throws Exception { - var is = Thread.currentThread().getContextClassLoader().getResourceAsStream(testFiles.getFirst()); + var is = Thread.currentThread().getContextClassLoader().getResourceAsStream(testFiles.get(0)); if (is == null) throw new Exception("no test file available"); var testFileString = new String(is.readAllBytes()); var hash = Util.generateHash(testFileString); assertNotNull(hash); - is = Thread.currentThread().getContextClassLoader().getResourceAsStream(testFiles.getFirst()); + is = Thread.currentThread().getContextClassLoader().getResourceAsStream(testFiles.get(0)); if (is == null) throw new Exception("no test file available"); testFileString = new String(is.readAllBytes()); var hash2 = Util.generateHash(testFileString); @@ -80,7 +80,7 @@ public void testGenerateHashFromString() throws Exception { @Test public void testMessageDigestHash() throws Exception { - try (var is = Thread.currentThread().getContextClassLoader().getResourceAsStream(testFiles.getFirst())) { + try (var is = Thread.currentThread().getContextClassLoader().getResourceAsStream(testFiles.get(0))) { if (is == null) throw new Exception("no test file available"); var digest = MessageDigest.getInstance("MD5"); var hash = digest.digest(is.readAllBytes()); diff --git a/packages/camel-catalog/kaoto-camel-catalog-maven-plugin/src/test/resources/kubernetes-api-v1-openapi.json b/packages/catalog-generator/src/test/resources/kubernetes-api-v1-openapi.json similarity index 100% rename from packages/camel-catalog/kaoto-camel-catalog-maven-plugin/src/test/resources/kubernetes-api-v1-openapi.json rename to packages/catalog-generator/src/test/resources/kubernetes-api-v1-openapi.json diff --git a/packages/camel-catalog/kaoto-camel-catalog-maven-plugin/src/test/resources/testfile1.txt b/packages/catalog-generator/src/test/resources/testfile1.txt similarity index 100% rename from packages/camel-catalog/kaoto-camel-catalog-maven-plugin/src/test/resources/testfile1.txt rename to packages/catalog-generator/src/test/resources/testfile1.txt diff --git a/packages/camel-catalog/kaoto-camel-catalog-maven-plugin/src/test/resources/testfile2.txt b/packages/catalog-generator/src/test/resources/testfile2.txt similarity index 100% rename from packages/camel-catalog/kaoto-camel-catalog-maven-plugin/src/test/resources/testfile2.txt rename to packages/catalog-generator/src/test/resources/testfile2.txt