Skip to content

fix: honor nested Jackson annotations in tool schemas - #1940

Open
arnabnandy7 wants to merge 1 commit into
embabel:mainfrom
arnabnandy7:fix/nested-jackson-schema
Open

arnabnandy7 wants to merge 1 commit into
embabel:mainfrom
arnabnandy7:fix/nested-jackson-schema

Conversation

@arnabnandy7

Copy link
Copy Markdown
Collaborator

Summary

Fixes #1884 by registering Victools’ JacksonModule when generating tool input schemas.

Nested Jackson annotations such as @JsonPropertyDescription are now reflected in the generated JSON Schema.

Changes

  • Register JacksonModule in VictoolsSchemaGenerator
  • Add regression coverage for descriptions on nested properties
  • Reuse the Jackson-aware schema configuration pattern already present in the codebase

Testing

mvn -pl embabel-agent-api -Dtest=TypeBasedInputSchemaTest test

@igordayen igordayen added this to the 1.5.3-Release🔵 milestone Aug 16, 2026
@arnabnandy7 arnabnandy7 self-assigned this Sep 17, 2026
Signed-off-by: Arnab Nandy <arnab_nandy7@yahoo.com>
@arnabnandy7
arnabnandy7 force-pushed the fix/nested-jackson-schema branch from f2de790 to 66ac93e Compare September 17, 2026 08:12
@arnabnandy7

Copy link
Copy Markdown
Collaborator Author

@simeshev thanks for the detailed review, good catch on the nested $defs references.

I’ve updated the configuration to:

  • Disable subtype lookup so embedded parameter schemas don’t contain unresolved root references.
  • Respect @JsonProperty(required = true) and @JsonPropertyOrder, matching the existing output-schema configuration.
  • Add regression tests for polymorphic parameters, required properties, and property ordering.

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.

VictoolsSchemaGenerator does not honor nested Jackson annotations for parameter serialization

3 participants