Skip to content

feat(api): add missing OutputFormat values - #828

Merged
edeandrea merged 3 commits into
docling-project:mainfrom
edeandrea:feat/output-format-missing-values
Dec 1, 2026
Merged

edeandrea merged 3 commits into
docling-project:mainfrom
edeandrea:feat/output-format-missing-values

Conversation

@edeandrea

Copy link
Copy Markdown
Contributor

Summary

  • OutputFormat only declared 6 of the 12 values Docling Serve's OutputFormat enum supports. Adds YAML, VTT, DOCLANG, DCLX, and LATEX (CHUNKS is intentionally left out — it's a prerequisite for convert-side chunking and belongs with that work).
  • DocumentResponse gains a doclangContent accessor, since Docling Serve's docling_jobkit export logic populates doclang_content inline for single-document responses the same way it does for doctags_content/html_content/etc. (verified by reading docling-jobkit's _export_document_as_content).
  • The other four new formats (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 existing HTML_SPLIT_PAGE, no DocumentResponse accessor is added for them; they're only reachable through file-based targets (zip archive, presigned URL).
  • docs/src/doc/docs/whats-new.md updated with an entry describing the change.

Test plan

  • ./gradlew spotlessCheck
  • ./gradlew :docling-serve-api:test — extended DocumentResponseTests to cover doclangContent
  • ./gradlew :docling-serve-client:test — added shouldConvertFileWithDoclangFormatSuccessfully and shouldAcceptNewlySupportedOutputFormats integration tests against the real Testcontainers-backed docling-serve

Closes #822

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>
Copilot AI balanced review requested due to automatic review settings December 1, 2026 18:43
@edeandrea
edeandrea enabled auto-merge (squash) December 1, 2026 18:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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, and LATEX to OutputFormat.
  • Adds nullable doclangContent response 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

Comment thread docs/src/doc/docs/whats-new.md Resolved
@edeandrea
edeandrea disabled auto-merge December 1, 2026 18:48
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>
Copilot AI balanced review requested due to automatic review settings December 1, 2026 19:06
@github-actions

github-actions Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

:java_duke: JaCoCo coverage report

Overall Project 53% 🟢

There is no coverage information present for the Files changed

@github-actions

github-actions Bot commented Dec 1, 2026 •

Copy link
Copy Markdown
TestsPassed ✅SkippedFailed
Gradle Test Results (all modules & JDKs)2448 ran2448 passed0 skipped0 failed
TestResult
No test annotations available

@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown

HTML test reports are available as workflow artifacts (zipped HTML).

• Download: Artifacts for this run

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are reported for the output-format additions and DocLang response support.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

@edeandrea
edeandrea enabled auto-merge (squash) December 1, 2026 19:08
…missing-values

Signed-off-by: Eric Deandrea <eric.deandrea@ibm.com>

# Conflicts:
#	docs/src/doc/docs/whats-new.md
Copilot AI balanced review requested due to automatic review settings December 1, 2026 19:20
@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown

HTML test reports are available as workflow artifacts (zipped HTML).

• Download: Artifacts for this run

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues remain for the added output formats and nullable DocLang response support.

No open issues 🎉

Review effort: Balanced

@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown

HTML test reports are available as workflow artifacts (zipped HTML).

• Download: Artifacts for this run

@edeandrea
edeandrea disabled auto-merge December 1, 2026 19:43
@edeandrea
edeandrea merged commit ff51069 into docling-project:main Dec 1, 2026
29 checks passed
@edeandrea edeandrea mentioned this pull request Dec 1, 2026
3 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Improvement] OutputFormat is missing six values the server supports

2 participants