docling-java
docling-java copied to clipboard
[Improvement] OutputFormat is missing six values the server supports
Description
ai.docling.serve.api.convert.request.options.OutputFormat declares 6 values. Docling's OutputFormat declares 12, so a Java caller cannot request half of the output formats the server supports.
Current
@JsonProperty("doctags") DOCTAGS,
@JsonProperty("html") HTML,
@JsonProperty("html_split_page") HTML_SPLIT_PAGE,
@JsonProperty("json") JSON,
@JsonProperty("md") MARKDOWN,
@JsonProperty("text") TEXT
Server (docling/datamodel/base_models.py, 2.155.0)
class OutputFormat(str, Enum):
MARKDOWN = "md"
JSON = "json"
YAML = "yaml"
HTML = "html"
HTML_SPLIT_PAGE = "html_split_page"
TEXT = "text"
DOCTAGS = "doctags"
VTT = "vtt"
DOCLANG = "doclang"
DCLX = "dclx"
CHUNKS = "chunks"
LATEX = "latex"
Missing
yaml, vtt, doclang, dclx, chunks, latex.
Each will also need a matching content accessor on DocumentResponse where the server returns one, in the way md_content / html_content / text_content are handled today — adding the enum constant alone only gets the request accepted.
chunks is a prerequisite for convert-side chunking and is also referenced from that issue; it may be simplest to land it there and the other five here.
Found while scoping #819.