Skip to content

Commit

Permalink
Fix camel annotated parameters that were not usable as template varia…
Browse files Browse the repository at this point in the history
…ble #6543 (#6558)
  • Loading branch information
aldettinger authored Sep 26, 2024
1 parent c05675e commit de68f20
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
*/
package org.apache.camel.quarkus.component.langchain.chat.deployment;

import io.quarkiverse.langchain4j.deployment.items.MethodParameterAllowedAnnotationsBuildItem;
import io.quarkus.deployment.annotations.BuildStep;
import io.quarkus.deployment.builditem.FeatureBuildItem;

Expand All @@ -26,4 +27,9 @@ class LangChain4jProcessor {
FeatureBuildItem feature() {
return new FeatureBuildItem(FEATURE);
}

@BuildStep
MethodParameterAllowedAnnotationsBuildItem camelAnnotatedParametersCouldBeUsedAsTemplateVariable() {
return new MethodParameterAllowedAnnotationsBuildItem(anno -> anno.name().toString().startsWith("org.apache.camel"));
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

import io.quarkus.test.junit.QuarkusTest;
import io.restassured.RestAssured;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;

import static org.hamcrest.Matchers.is;
Expand All @@ -27,7 +26,6 @@
class LangChain4jTest {

@Test
@Disabled("https://github.com/apache/camel-quarkus/issues/6543")
void camelAnnotationsShouldWorkAsExpected() {
RestAssured.given()
.body("{\"included\": \"included-content\", \"ignored\": \"ignored-content\"}")
Expand Down

0 comments on commit de68f20

Please sign in to comment.