Repository navigation
feat(api): add missing OutputFormat values - #828
Conversation
OutputFormat only declared 6 of the 12 values Docling Serve supports, so callers could not request yaml, vtt, doclang, dclx, or latex output (chunks is left for the convert-side chunking work). DocumentResponse gains a matching doclangContent accessor, since Docling Serve returns doclang_content inline the same way it does for the existing formats. The other four new formats have no inline content field on the server today; like the existing HTML_SPLIT_PAGE, they are only reachable through file-based targets such as a zip archive or a presigned URL. Related to docling-project#822. Assisted-By: Claude Code <noreply@anthropic.com> Signed-off-by: Eric Deandrea <eric.deandrea@ibm.com>
There was a problem hiding this comment.
🟡 Changes recommended
The documentation incorrectly claims ZIP/presigned-URL export support for YAML, VTT, and LATEX; it should describe them as accepted values without implemented exports and DCLX as file-only.
1 open issue
What changed in this PR
Expands the Java conversion API to expose five additional Docling Serve output-format values, addressing #822 while leaving CHUNKS for separate work.
Changes:
- Adds
YAML,VTT,DOCLANG,DCLX, andLATEXtoOutputFormat. - Adds nullable
doclangContentresponse support and unit coverage. - Adds client integration tests and a release-note entry.
| File | Description |
|---|---|
docs/src/doc/docs/whats-new.md |
Documents the added formats and response accessor. |
docling-serve/docling-serve-client/src/test/java/ai/docling/serve/client/AbstractDoclingServeClientTests.java |
Tests inline DocLang output and acceptance of additional formats. |
docling-serve/docling-serve-api/src/test/java/ai/docling/serve/api/convert/response/DocumentResponseTests.java |
Covers populated and null DocLang content. |
docling-serve/docling-serve-api/src/main/java/ai/docling/serve/api/convert/response/DocumentResponse.java |
Maps the server’s doclang_content response field. |
docling-serve/docling-serve-api/src/main/java/ai/docling/serve/api/convert/request/options/OutputFormat.java |
Adds five enum constants with JSON mappings. |
Review effort: Balanced
The previous wording implied all four non-doclang formats (yaml, vtt, dclx, latex) are reachable through file-based targets like the existing HTML_SPLIT_PAGE. Checked against docling-jobkit's convert/results.py and convert/export.py: only dclx actually has an export flag and a file-export implementation. yaml, vtt, and latex are accepted by the server's request validation but have no implemented export path at all, inline or file. Assisted-By: Claude Code <noreply@anthropic.com> Signed-off-by: Eric Deandrea <eric.deandrea@ibm.com>
:java_duke: JaCoCo coverage report
|
|
||||||||||||||
|
HTML test reports are available as workflow artifacts (zipped HTML). • Download: Artifacts for this run |
…missing-values Signed-off-by: Eric Deandrea <eric.deandrea@ibm.com> # Conflicts: # docs/src/doc/docs/whats-new.md
|
HTML test reports are available as workflow artifacts (zipped HTML). • Download: Artifacts for this run |
|
HTML test reports are available as workflow artifacts (zipped HTML). • Download: Artifacts for this run |

Summary
OutputFormatonly declared 6 of the 12 values Docling Serve'sOutputFormatenum supports. AddsYAML,VTT,DOCLANG,DCLX, andLATEX(CHUNKSis intentionally left out — it's a prerequisite for convert-side chunking and belongs with that work).DocumentResponsegains adoclangContentaccessor, since Docling Serve'sdocling_jobkitexport logic populatesdoclang_contentinline for single-document responses the same way it does fordoctags_content/html_content/etc. (verified by readingdocling-jobkit's_export_document_as_content).yaml,vtt,dclx,latex) have no inline content field on the server today — confirmed the same export logic never sets one for them — so, like the existingHTML_SPLIT_PAGE, noDocumentResponseaccessor is added for them; they're only reachable through file-based targets (zip archive, presigned URL).docs/src/doc/docs/whats-new.mdupdated with an entry describing the change.Test plan
./gradlew spotlessCheck./gradlew :docling-serve-api:test— extendedDocumentResponseTeststo coverdoclangContent./gradlew :docling-serve-client:test— addedshouldConvertFileWithDoclangFormatSuccessfullyandshouldAcceptNewlySupportedOutputFormatsintegration tests against the real Testcontainers-backeddocling-serveCloses #822