This is an automated email from the ASF dual-hosted git repository.
Croway pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-spring-boot.git
The following commit(s) were added to refs/heads/main by this push:
new 69dcfe62675 CAMEL-24913: Support TypeSafe AI language properties
(#1999)
69dcfe62675 is described below
commit 69dcfe62675bcdaf91767f5df71ed521f26855ab
Author: Ramu <[email protected]>
AuthorDate: Sat Sep 26 18:27:26 2026 +0530
CAMEL-24913: Support TypeSafe AI language properties (#1999)
* CAMEL-24913: Support TypeSafe AI language properties
* CAMEL-24913: fix TypeSafe AI starter review comments
* CAMEL-24913 Update generator ignore module test
---
.../camel-typesafe-ai-starter/pom.xml | 18 +++++-
.../src/main/doc/configuration.adoc | 19 ++++++
.../src/main/docs/typesafe-ai.json | 32 +++++++++-
.../TypeSafeAiLanguageAutoConfiguration.java | 7 +--
.../TypeSafeAiLanguageConfiguration.java | 73 +++++++++++++++++++++-
.../TypeSafeAiComponentAutoConfigurationTest.java | 17 ++++-
.../modules/ROOT/pages/starters/typesafe-ai.adoc | 28 ++++++++-
.../maven/SpringBootAutoConfigurationMojo.java | 3 +-
.../springboot/maven/SpringBootStarterMojo.java | 9 +++
.../SpringBootGeneratorIgnoreModulesTest.java | 59 +++++++++++++++++
.../maven/UpdateStarterDocPageMojoTest.java | 37 +++++++++++
11 files changed, 286 insertions(+), 16 deletions(-)
diff --git a/components-starter/camel-typesafe-ai-starter/pom.xml
b/components-starter/camel-typesafe-ai-starter/pom.xml
index 9cd74a0072a..d12b860d787 100644
--- a/components-starter/camel-typesafe-ai-starter/pom.xml
+++ b/components-starter/camel-typesafe-ai-starter/pom.xml
@@ -19,14 +19,20 @@
-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
+
<parent>
<groupId>org.apache.camel.springboot</groupId>
<artifactId>components-starter</artifactId>
<version>4.23.0-SNAPSHOT</version>
</parent>
+
<artifactId>camel-typesafe-ai-starter</artifactId>
<packaging>jar</packaging>
<name>Camel SB Starters :: typesafe-ai</name>
+ <description>Spring Boot Starter for Apache Camel TypeSafe AI
Language</description>
+
+ <!-- This starter is hand-crafted and excluded from automatic regeneration
-->
+
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
@@ -38,11 +44,19 @@
<artifactId>camel-typesafe-ai</artifactId>
<version>${camel-version}</version>
</dependency>
- <!--START OF GENERATED CODE-->
<dependency>
<groupId>org.apache.camel.springboot</groupId>
<artifactId>camel-core-starter</artifactId>
</dependency>
- <!--END OF GENERATED CODE-->
</dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.camel.springboot</groupId>
+ <artifactId>camel-spring-boot-generator-maven-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
+
</project>
diff --git
a/components-starter/camel-typesafe-ai-starter/src/main/doc/configuration.adoc
b/components-starter/camel-typesafe-ai-starter/src/main/doc/configuration.adoc
new file mode 100644
index 00000000000..d3286743e79
--- /dev/null
+++
b/components-starter/camel-typesafe-ai-starter/src/main/doc/configuration.adoc
@@ -0,0 +1,19 @@
+The starter auto-configures both the TypeSafe AI component
(`camel.component.typesafe-ai.*`)
+and the TypeSafe AI language (`camel.language.typesafe-ai.*`). Component
properties
+configure the API client and producer defaults. Language properties configure
the
+`typesafe-ai` language independently: `endpoint`, `threshold`, `uncertainty`,
+`uncertainty-policy`, and `state`.
+
+[source,properties]
+----
+camel.component.typesafe-ai.base-url=https://api.typesafe.ai
+camel.component.typesafe-ai.model=jev-latest
+camel.component.typesafe-ai.api-key=test-key
+camel.component.typesafe-ai.threshold=0.75
+
+camel.language.typesafe-ai.endpoint=direct:ai-test
+camel.language.typesafe-ai.threshold=0.85
+camel.language.typesafe-ai.uncertainty=0.15
+camel.language.typesafe-ai.uncertainty-policy=NonMatch
+camel.language.typesafe-ai.state=active
+----
diff --git
a/components-starter/camel-typesafe-ai-starter/src/main/docs/typesafe-ai.json
b/components-starter/camel-typesafe-ai-starter/src/main/docs/typesafe-ai.json
index c2f4abbb60b..a12dc2c3fe9 100644
---
a/components-starter/camel-typesafe-ai-starter/src/main/docs/typesafe-ai.json
+++
b/components-starter/camel-typesafe-ai-starter/src/main/docs/typesafe-ai.json
@@ -143,15 +143,45 @@
"description": "Whether to enable auto configuration of the typesafe-ai
language. This is enabled by default.",
"sourceType":
"org.apache.camel.language.typesafeai.springboot.TypeSafeAiLanguageConfiguration"
},
+ {
+ "name": "camel.language.typesafe-ai.endpoint",
+ "type": "java.lang.String",
+ "description": "Target endpoint URI for TypeSafe AI processing.",
+ "sourceType":
"org.apache.camel.language.typesafeai.springboot.TypeSafeAiLanguageConfiguration"
+ },
{
"name": "camel.language.typesafe-ai.language",
"type": "java.lang.String",
"description": "The name of the language to use.",
"sourceType":
"org.apache.camel.language.typesafeai.springboot.TypeSafeAiLanguageConfiguration"
+ },
+ {
+ "name": "camel.language.typesafe-ai.state",
+ "type": "java.lang.String",
+ "description": "Simple expression selecting state for the TypeSafe AI
language.",
+ "sourceType":
"org.apache.camel.language.typesafeai.springboot.TypeSafeAiLanguageConfiguration"
+ },
+ {
+ "name": "camel.language.typesafe-ai.threshold",
+ "type": "java.lang.Double",
+ "description": "Minimum confidence threshold for the TypeSafe AI
language. Must be within [0,1].",
+ "sourceType":
"org.apache.camel.language.typesafeai.springboot.TypeSafeAiLanguageConfiguration"
+ },
+ {
+ "name": "camel.language.typesafe-ai.uncertainty",
+ "type": "java.lang.Double",
+ "description": "Half-width of the inclusive uncertainty band for the
TypeSafe AI language.",
+ "sourceType":
"org.apache.camel.language.typesafeai.springboot.TypeSafeAiLanguageConfiguration"
+ },
+ {
+ "name": "camel.language.typesafe-ai.uncertainty-policy",
+ "type": "java.lang.String",
+ "description": "Action for the TypeSafe AI language within the
uncertainty band.",
+ "sourceType":
"org.apache.camel.language.typesafeai.springboot.TypeSafeAiLanguageConfiguration"
}
],
"hints": [],
"ignored": {
"properties": []
}
-}
\ No newline at end of file
+}
diff --git
a/components-starter/camel-typesafe-ai-starter/src/main/java/org/apache/camel/language/typesafeai/springboot/TypeSafeAiLanguageAutoConfiguration.java
b/components-starter/camel-typesafe-ai-starter/src/main/java/org/apache/camel/language/typesafeai/springboot/TypeSafeAiLanguageAutoConfiguration.java
index 308d0613d9a..4fce31bd57b 100644
---
a/components-starter/camel-typesafe-ai-starter/src/main/java/org/apache/camel/language/typesafeai/springboot/TypeSafeAiLanguageAutoConfiguration.java
+++
b/components-starter/camel-typesafe-ai-starter/src/main/java/org/apache/camel/language/typesafeai/springboot/TypeSafeAiLanguageAutoConfiguration.java
@@ -16,7 +16,6 @@
*/
package org.apache.camel.language.typesafeai.springboot;
-import org.apache.camel.CamelContext;
import org.apache.camel.CamelContextAware;
import org.apache.camel.language.typesafeai.TypeSafeAiLanguage;
import org.apache.camel.spi.Language;
@@ -29,15 +28,11 @@ import
org.apache.camel.spring.boot.util.ConditionalOnHierarchicalProperties;
import org.apache.camel.spring.boot.util.HierarchicalPropertiesEvaluator;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import
org.springframework.boot.context.properties.EnableConfigurationProperties;
-import org.springframework.boot.convert.ApplicationConversionService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Conditional;
import org.springframework.context.annotation.Lazy;
-/**
- * Generated by camel-package-maven-plugin - do not edit this file!
- */
@AutoConfiguration(after = CamelAutoConfiguration.class)
@Conditional(ConditionalOnCamelContextAndAutoConfigurationBeans.class)
@EnableConfigurationProperties({LanguageConfigurationProperties.class,TypeSafeAiLanguageConfiguration.class})
@@ -77,4 +72,4 @@ public class TypeSafeAiLanguageAutoConfiguration {
}
};
}
-}
\ No newline at end of file
+}
diff --git
a/components-starter/camel-typesafe-ai-starter/src/main/java/org/apache/camel/language/typesafeai/springboot/TypeSafeAiLanguageConfiguration.java
b/components-starter/camel-typesafe-ai-starter/src/main/java/org/apache/camel/language/typesafeai/springboot/TypeSafeAiLanguageConfiguration.java
index e1d24d23238..3dd434509f7 100644
---
a/components-starter/camel-typesafe-ai-starter/src/main/java/org/apache/camel/language/typesafeai/springboot/TypeSafeAiLanguageConfiguration.java
+++
b/components-starter/camel-typesafe-ai-starter/src/main/java/org/apache/camel/language/typesafeai/springboot/TypeSafeAiLanguageConfiguration.java
@@ -21,8 +21,6 @@ import
org.springframework.boot.context.properties.ConfigurationProperties;
/**
* Evaluate a Noul question with the TypeSafe AI decision API
- *
- * Generated by camel-package-maven-plugin - do not edit this file!
*/
@ConfigurationProperties(prefix = "camel.language.typesafe-ai")
public class TypeSafeAiLanguageConfiguration
@@ -39,6 +37,35 @@ public class TypeSafeAiLanguageConfiguration
*/
private String language;
+ /**
+ * Target endpoint URI for TypeSafe AI processing.
+ */
+ private String endpoint;
+ /**
+ * Minimum confidence threshold for the TypeSafe AI language. Must be
within [0,1].
+ */
+ private Double threshold;
+ /**
+ * Half-width of the inclusive uncertainty band for the TypeSafe AI
language.
+ */
+ private Double uncertainty;
+ /**
+ * Action for the TypeSafe AI language within the uncertainty band.
+ */
+ private String uncertaintyPolicy;
+ /**
+ * Simple expression selecting state for the TypeSafe AI language.
+ */
+ private String state;
+
+ public Boolean getEnabled() {
+ return enabled;
+ }
+
+ public void setEnabled(Boolean enabled) {
+ this.enabled = enabled;
+ }
+
public String getLanguage() {
return language;
}
@@ -46,4 +73,44 @@ public class TypeSafeAiLanguageConfiguration
public void setLanguage(String language) {
this.language = language;
}
-}
\ No newline at end of file
+
+ public String getEndpoint() {
+ return endpoint;
+ }
+
+ public void setEndpoint(String endpoint) {
+ this.endpoint = endpoint;
+ }
+
+ public Double getThreshold() {
+ return threshold;
+ }
+
+ public void setThreshold(Double threshold) {
+ this.threshold = threshold;
+ }
+
+ public Double getUncertainty() {
+ return uncertainty;
+ }
+
+ public void setUncertainty(Double uncertainty) {
+ this.uncertainty = uncertainty;
+ }
+
+ public String getUncertaintyPolicy() {
+ return uncertaintyPolicy;
+ }
+
+ public void setUncertaintyPolicy(String uncertaintyPolicy) {
+ this.uncertaintyPolicy = uncertaintyPolicy;
+ }
+
+ public String getState() {
+ return state;
+ }
+
+ public void setState(String state) {
+ this.state = state;
+ }
+}
diff --git
a/components-starter/camel-typesafe-ai-starter/src/test/java/org/apache/camel/component/typesafeai/springboot/TypeSafeAiComponentAutoConfigurationTest.java
b/components-starter/camel-typesafe-ai-starter/src/test/java/org/apache/camel/component/typesafeai/springboot/TypeSafeAiComponentAutoConfigurationTest.java
index 8251efbab67..51bac1c523a 100644
---
a/components-starter/camel-typesafe-ai-starter/src/test/java/org/apache/camel/component/typesafeai/springboot/TypeSafeAiComponentAutoConfigurationTest.java
+++
b/components-starter/camel-typesafe-ai-starter/src/test/java/org/apache/camel/component/typesafeai/springboot/TypeSafeAiComponentAutoConfigurationTest.java
@@ -17,6 +17,7 @@
package org.apache.camel.component.typesafeai.springboot;
import org.apache.camel.CamelContext;
+import org.apache.camel.Expression;
import org.apache.camel.component.typesafeai.TypeSafeAiComponent;
import org.apache.camel.language.typesafeai.TypeSafeAiLanguage;
import
org.apache.camel.language.typesafeai.springboot.TypeSafeAiLanguageAutoConfiguration;
@@ -35,7 +36,11 @@ import static
org.junit.jupiter.api.Assertions.assertInstanceOf;
"camel.component.typesafe-ai.base-url=http://127.0.0.1:8000",
"camel.component.typesafe-ai.model=local-model",
"camel.component.typesafe-ai.api-key=test-key",
- "camel.component.typesafe-ai.threshold=0.75" })
+ "camel.component.typesafe-ai.threshold=0.75",
+ "camel.language.typesafe-ai.endpoint=typesafe-ai:ai-test",
+ "camel.language.typesafe-ai.threshold=0.85",
+ "camel.language.typesafe-ai.uncertainty=0.15",
+ "camel.language.typesafe-ai.state=active" })
class TypeSafeAiComponentAutoConfigurationTest {
@Autowired
@@ -49,6 +54,14 @@ class TypeSafeAiComponentAutoConfigurationTest {
assertEquals("local-model", component.getConfiguration().getModel());
assertEquals("test-key", component.getConfiguration().getApiKey());
assertEquals(0.75, component.getConfiguration().getThreshold());
- assertInstanceOf(TypeSafeAiLanguage.class,
context.resolveLanguage("typesafe-ai"));
+
+ TypeSafeAiLanguage language =
assertInstanceOf(TypeSafeAiLanguage.class,
context.resolveLanguage("typesafe-ai"));
+ assertEquals("typesafe-ai:ai-test", language.getEndpoint());
+ assertEquals(0.85, language.getThreshold());
+ assertEquals(0.15, language.getUncertainty());
+ assertEquals("active", language.getState());
+
+ Expression expression = language.createExpression("test");
+ expression.init(context);
}
}
diff --git a/docs/spring-boot/modules/ROOT/pages/starters/typesafe-ai.adoc
b/docs/spring-boot/modules/ROOT/pages/starters/typesafe-ai.adoc
index 3455516dd5f..5cafe8241fa 100644
--- a/docs/spring-boot/modules/ROOT/pages/starters/typesafe-ai.adoc
+++ b/docs/spring-boot/modules/ROOT/pages/starters/typesafe-ai.adoc
@@ -24,9 +24,30 @@ Please refer to the above links for usage and configuration
details.
== Spring Boot Auto-Configuration
-The starter supports 18 options, which are listed below.
+The starter auto-configures both the TypeSafe AI component
(`camel.component.typesafe-ai.*`)
+and the TypeSafe AI language (`camel.language.typesafe-ai.*`). Component
properties
+configure the API client and producer defaults. Language properties configure
the
+`typesafe-ai` language independently: `endpoint`, `threshold`, `uncertainty`,
+`uncertainty-policy`, and `state`.
+
+[source,properties]
+----
+camel.component.typesafe-ai.base-url=https://api.typesafe.ai
+camel.component.typesafe-ai.model=jev-latest
+camel.component.typesafe-ai.api-key=test-key
+camel.component.typesafe-ai.threshold=0.75
+
+camel.language.typesafe-ai.endpoint=typesafe-ai:ai-test
+camel.language.typesafe-ai.threshold=0.85
+camel.language.typesafe-ai.uncertainty=0.15
+camel.language.typesafe-ai.uncertainty-policy=NonMatch
+camel.language.typesafe-ai.state=active
+----
+
+The starter supports 23 options, which are listed below.
[width="100%",cols="2,5,^1,2",options="header"]
+
|===
| Name | Description | Default | Type
| camel.component.typesafe-ai.api-key | The API key used for Bearer
authentication. | | String
@@ -46,5 +67,10 @@ The starter supports 18 options, which are listed below.
| camel.component.typesafe-ai.uncertainty | Default half-width of the
inclusive uncertainty band for the TypeSafe AI language. Zero disables the
band. | | Double
| camel.component.typesafe-ai.uncertainty-policy | Default action for the
TypeSafe AI language within the uncertainty band: NonMatch or Fail. | nonmatch
| TypeSafeAiLanguage$UncertaintyPolicy
| camel.language.typesafe-ai.enabled | Whether to enable auto configuration of
the typesafe-ai language. This is enabled by default. | | Boolean
+| camel.language.typesafe-ai.endpoint | Target endpoint URI for TypeSafe AI
processing. | | String
| camel.language.typesafe-ai.language | The name of the language to use. | |
String
+| camel.language.typesafe-ai.state | Simple expression selecting state for the
TypeSafe AI language. | | String
+| camel.language.typesafe-ai.threshold | Minimum confidence threshold for the
TypeSafe AI language. Must be within [0,1]. | | Double
+| camel.language.typesafe-ai.uncertainty | Half-width of the inclusive
uncertainty band for the TypeSafe AI language. | | Double
+| camel.language.typesafe-ai.uncertainty-policy | Action for the TypeSafe AI
language within the uncertainty band. | | String
|===
diff --git
a/tooling/camel-spring-boot-generator-maven-plugin/src/main/java/org/apache/camel/springboot/maven/SpringBootAutoConfigurationMojo.java
b/tooling/camel-spring-boot-generator-maven-plugin/src/main/java/org/apache/camel/springboot/maven/SpringBootAutoConfigurationMojo.java
index aa11a1765cd..387d5e7d237 100644
---
a/tooling/camel-spring-boot-generator-maven-plugin/src/main/java/org/apache/camel/springboot/maven/SpringBootAutoConfigurationMojo.java
+++
b/tooling/camel-spring-boot-generator-maven-plugin/src/main/java/org/apache/camel/springboot/maven/SpringBootAutoConfigurationMojo.java
@@ -81,7 +81,8 @@ import org.springframework.context.annotation.Lazy;
@Mojo(name = "prepare-spring-boot-auto-configuration", threadSafe = true,
requiresDependencyCollection = ResolutionScope.COMPILE_PLUS_RUNTIME,
requiresDependencyResolution = ResolutionScope.COMPILE_PLUS_RUNTIME,
defaultPhase = LifecyclePhase.GENERATE_RESOURCES)
public class SpringBootAutoConfigurationMojo extends
AbstractSpringBootGenerator {
- private static final String[] IGNORE_MODULES = { "camel-spring-boot-xml",
"camel-spring-boot-engine" };
+ private static final String[] IGNORE_MODULES = { "camel-spring-boot-xml",
"camel-spring-boot-engine",
+ "camel-typesafe-ai" };
/**
* Useful to move configuration towards starters. Warning: the
spring.factories files sometimes are used also on the
diff --git
a/tooling/camel-spring-boot-generator-maven-plugin/src/main/java/org/apache/camel/springboot/maven/SpringBootStarterMojo.java
b/tooling/camel-spring-boot-generator-maven-plugin/src/main/java/org/apache/camel/springboot/maven/SpringBootStarterMojo.java
index b902e3fdade..0d7867185c3 100644
---
a/tooling/camel-spring-boot-generator-maven-plugin/src/main/java/org/apache/camel/springboot/maven/SpringBootStarterMojo.java
+++
b/tooling/camel-spring-boot-generator-maven-plugin/src/main/java/org/apache/camel/springboot/maven/SpringBootStarterMojo.java
@@ -23,6 +23,7 @@ import java.io.IOException;
import java.io.InputStream;
import java.io.StringWriter;
import java.nio.charset.StandardCharsets;
+import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.Properties;
@@ -67,6 +68,9 @@ import org.w3c.dom.NodeList;
@Mojo(name = "prepare-spring-boot-starter", threadSafe = true,
requiresDependencyCollection = ResolutionScope.COMPILE_PLUS_RUNTIME,
requiresDependencyResolution = ResolutionScope.COMPILE_PLUS_RUNTIME,
defaultPhase = LifecyclePhase.GENERATE_RESOURCES)
public class SpringBootStarterMojo extends AbstractSpringBootGenerator {
+ private static final String[] IGNORE_MODULES = { "camel-spring-boot-xml",
"camel-spring-boot-engine",
+ "camel-typesafe-ai" };
+
private static final String GENERATED_SECTION_START = "START OF GENERATED
CODE";
private static final String GENERATED_SECTION_START_COMMENT = "<!--" +
GENERATED_SECTION_START + "-->";
private static final String GENERATED_SECTION_END = "END OF GENERATED
CODE";
@@ -87,6 +91,11 @@ public class SpringBootStarterMojo extends
AbstractSpringBootGenerator {
@Inject
private ProjectBuilder projectBuilder;
+ @Override
+ protected boolean isIgnore(String artifactId) {
+ return Arrays.asList(IGNORE_MODULES).contains(artifactId);
+ }
+
@Override
protected void executeAll() throws MojoExecutionException,
MojoFailureException {
try {
diff --git
a/tooling/camel-spring-boot-generator-maven-plugin/src/test/java/org/apache/camel/springboot/maven/SpringBootGeneratorIgnoreModulesTest.java
b/tooling/camel-spring-boot-generator-maven-plugin/src/test/java/org/apache/camel/springboot/maven/SpringBootGeneratorIgnoreModulesTest.java
new file mode 100644
index 00000000000..095d5fb8a10
--- /dev/null
+++
b/tooling/camel-spring-boot-generator-maven-plugin/src/test/java/org/apache/camel/springboot/maven/SpringBootGeneratorIgnoreModulesTest.java
@@ -0,0 +1,59 @@
+/*
+ * 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.
+ */
+package org.apache.camel.springboot.maven;
+
+import org.junit.jupiter.api.DisplayName;
+import org.junit.jupiter.api.Test;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+/**
+ * Tests for {@link AbstractSpringBootGenerator#isIgnore(String)} on generator
mojos.
+ */
+class SpringBootGeneratorIgnoreModulesTest {
+
+ @Test
+ @DisplayName("Hand-crafted and core Spring Boot modules are ignored by
generator mojos")
+ void ignoredModulesAreSkipped() {
+ AbstractSpringBootGenerator[] mojos = {
+ new SpringBootStarterMojo(),
+ new SpringBootAutoConfigurationMojo(),
+ new PrepareCatalogSpringBootMojo(),
+ new UpdateStarterDocPageMojo()
+ };
+
+ for (AbstractSpringBootGenerator mojo : mojos) {
+ assertThat(mojo.isIgnore("camel-spring-boot-xml"))
+ .as("%s should ignore camel-spring-boot-xml",
mojo.getClass().getSimpleName())
+ .isTrue();
+ assertThat(mojo.isIgnore("camel-spring-boot-engine"))
+ .as("%s should ignore camel-spring-boot-engine",
mojo.getClass().getSimpleName())
+ .isTrue();
+ assertThat(mojo.isIgnore("camel-http"))
+ .as("%s should not ignore camel-http",
mojo.getClass().getSimpleName())
+ .isFalse();
+ }
+
+ assertThat(new
PrepareCatalogSpringBootMojo().isIgnore("camel-typesafe-ai"))
+ .as("PrepareCatalogSpringBootMojo should not ignore
camel-typesafe-ai")
+ .isFalse();
+ assertThat(new
UpdateStarterDocPageMojo().isIgnore("camel-typesafe-ai"))
+ .as("UpdateStarterDocPageMojo should not ignore
camel-typesafe-ai")
+ .isFalse();
+ }
+
+}
diff --git
a/tooling/camel-spring-boot-generator-maven-plugin/src/test/java/org/apache/camel/springboot/maven/UpdateStarterDocPageMojoTest.java
b/tooling/camel-spring-boot-generator-maven-plugin/src/test/java/org/apache/camel/springboot/maven/UpdateStarterDocPageMojoTest.java
index b0358acdf0c..bfad4509703 100644
---
a/tooling/camel-spring-boot-generator-maven-plugin/src/test/java/org/apache/camel/springboot/maven/UpdateStarterDocPageMojoTest.java
+++
b/tooling/camel-spring-boot-generator-maven-plugin/src/test/java/org/apache/camel/springboot/maven/UpdateStarterDocPageMojoTest.java
@@ -70,6 +70,43 @@ class UpdateStarterDocPageMojoTest {
assertThat(countCells(nullRow)).isEqualTo(4);
}
+ @Test
+ @DisplayName("TypeSafe AI language properties keep 4 table columns and
match starter metadata")
+ void typeSafeAiLanguagePropertiesAreDocumented() {
+ List<SBProperty> properties = List.of(
+ new SBProperty("camel.language.typesafe-ai.endpoint",
+ "Target endpoint URI for TypeSafe AI processing.",
"java.lang.String", null),
+ new SBProperty("camel.language.typesafe-ai.threshold",
+ "Minimum confidence threshold for the TypeSafe AI
language. Must be within [0,1].",
+ "java.lang.Double", null),
+ new SBProperty("camel.language.typesafe-ai.uncertainty",
+ "Half-width of the inclusive uncertainty band for the
TypeSafe AI language.",
+ "java.lang.Double", null),
+ new SBProperty("camel.language.typesafe-ai.uncertainty-policy",
+ "Action for the TypeSafe AI language within the
uncertainty band.", "java.lang.String",
+ null),
+ new SBProperty("camel.language.typesafe-ai.state",
+ "Simple expression selecting state for the TypeSafe AI
language.", "java.lang.String",
+ null));
+
+ String page = new
UpdateStarterDocPageMojo().generatePage("camel-typesafe-ai-starter",
"typesafe-ai",
+ "TypeSafe AI", null, List.of(), properties, null, null, null,
null);
+
+ assertThat(page).contains("The starter supports 5 options");
+ for (SBProperty property : properties) {
+ String row = page.lines()
+ .filter(line -> line.startsWith("| " + property.name() + "
"))
+ .findFirst()
+ .orElseThrow(() -> new AssertionError("No table row for "
+ property.name() + " in:\n" + page));
+ assertThat(countCells(row)).isEqualTo(4);
+ assertThat(row).contains(" | " + property.description() + " | | "
+ simpleName(property.type()));
+ }
+ }
+
+ private static String simpleName(String fqcn) {
+ return fqcn.substring(fqcn.lastIndexOf('.') + 1);
+ }
+
private static String generateRow(SBProperty property) {
String page = new
UpdateStarterDocPageMojo().generatePage("camel-test-starter", "test", "Test",
null,
List.of(), List.of(property), null, null, null, null);