fix: Change ValidationErrorDetail.input type from String to Object#507
Merged
Conversation
:java_duke: JaCoCo coverage report
|
|
||||||||||||||
|
HTML test reports are available as workflow artifacts (zipped HTML). • Download: Artifacts for this run |
The docling-serve 422 validation error response can return the `input` field as either a JSON string or a JSON object, depending on what failed validation. Changing the field type from String to Object allows Jackson to deserialize both shapes without a custom deserializer. Fixes docling-project#339 Signed-off-by: Andrea Cosentino <ancosen1985@yahoo.com> Signed-off-by: Andrea Cosentino <ancosen@gmail.com>
|
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 |
edeandrea
approved these changes
May 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ValidationErrorDetail.inputfield type fromStringtoObjectto support both string and object values returned by docling-serve in 422 validation error responsesContext
docling-serve (Pydantic v2) returns the
inputfield in 422 responses as either a JSON string (e.g.,"file:///path") or a JSON object (e.g.,{"kind": "file"}). TheStringtype caused deserialization failures for object inputs. UsingObjectlets Jackson handle both shapes natively.Fixes #339
Related: docling-project/docling-serve#493
Test plan
inputdeserializationinput./gradlew build)Generated with Claude Code