WMK666666 commented on PR #29594:
URL: https://github.com/apache/camel/pull/29594#issuecomment-6801191947

   Both points are taken in 7d32190.
   
   **The CLI half is gone** (@Croway). The CLI operations pass a hardcoded 
format to `buildDoclingCommand` —
   `markdown`, `html`, `json` or `text` — so `outputFormat` never reaches 
`mapToDoclingFormat` or
   `getOutputFileExtension` with anything else. The 
`md`/`txt`/`doctags`/`html_split_page` cases were
   unreachable, and so was `DoclingOutputFormatTest`; both are removed and the 
two maps are back to what `main`
   has.
   
   **`html_split_page`** (@davsclaus) is the fail-with-a-message branch, 
because there is no field to map it to:
   `DocumentResponse` has five content fields — `doctagsContent`, 
`htmlContent`, `jsonContent`,
   `markdownContent`, `textContent` — and the html one is only filled when HTML 
is requested. The split pages
   are not in the response at all, which is why the body was empty. The message 
no longer points at the CLI
   either, since that is not a way to get them; it names `outputFormat=html` as 
the way to get the HTML of the
   whole document.
   
   What is left is the doctags half you both reviewed: the extractor reads 
`doctags_content`, and
   `html_split_page` no longer returns an empty body on the serve path.
   
   **Formatter**: `mvn formatter:format` did rewrap the Javadoc of 
`DoclingServeOutputFormatTest`; the formatted
   result is committed, and `formatter:validate` plus `impsort:check` pass.
   
   **Interaction with #29595**: that PR replaces `buildConvertRequest(String, 
String)` with a three-argument
   overload that takes the exchange, so the two touch the same method. 
Whichever lands first, I will rebase the
   other; nothing is lost, the rejection just moves into the new signature.
   
   **Tests**: `DoclingServeOutputFormatTest` (3) and 
`DoclingContentExtractorTest` (4) green.
   `mvn -pl components/camel-ai/camel-docling test`: 93 tests, 2 failures, both
   `DoclingCustomArgsValidationTest` on Windows (`/etc/cron.d` is not an 
absolute path there), the same two that
   fail without this change.
   


-- 
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]

Reply via email to