apupier commented on code in PR #8197:
URL: https://github.com/apache/camel-quarkus/pull/8197#discussion_r2720331402
##########
integration-tests/docling/src/main/java/org/apache/camel/quarkus/component/docling/it/DoclingResource.java:
##########
@@ -206,13 +210,38 @@ public Response extractMetadata(String documentContent)
throws IOException {
java.nio.file.Path tempFile = Files.createTempFile("docling-test",
".md");
Files.writeString(tempFile, documentContent);
try {
- String result =
producerTemplate.requestBody("direct:extractMetadata", tempFile.toString(),
String.class);
- return Response.ok(result).build();
+ DocumentMetadata result =
producerTemplate.requestBody("direct:extractMetadata", tempFile.toString(),
+ DocumentMetadata.class);
+ ObjectWriter ow = new
ObjectMapper().writer().withDefaultPrettyPrinter();
+ String json = ow.writeValueAsString(result);
+ return Response.ok(json).build();
Review Comment:
when adding quarkus-resteast-jackson or quarkus-resteasy-jsonb, I got this
error at compilation:
```
java.lang.RuntimeException: io.quarkus.builder.BuildException: Build
failure: Build failed due to errors
[error]: Build step io.quarkus.arc.deployment.ArcProcessor#validate
threw an exception: jakarta.enterprise.inject.spi.DeploymentException: Found 2
deployment problems:
[1] Unsatisfied dependency for type org.apache.camel.CamelContext and
qualifiers [@Default]
- injection target:
org.apache.camel.quarkus.component.docling.it.DoclingResource#context
- declared on CLASS bean [types=[java.lang.Object,
org.apache.camel.quarkus.component.docling.it.DoclingResource],
qualifiers=[@Any, @Default],
target=org.apache.camel.quarkus.component.docling.it.DoclingResource]
[2] Unsatisfied dependency for type org.apache.camel.ProducerTemplate and
qualifiers [@Default]
- injection target:
org.apache.camel.quarkus.component.docling.it.DoclingResource#producerTemplate
- declared on CLASS bean [types=[java.lang.Object,
org.apache.camel.quarkus.component.docling.it.DoclingResource],
qualifiers=[@Any, @Default],
target=org.apache.camel.quarkus.component.docling.it.DoclingResource]
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]