fix: [PromptRegistry] oneOf deserialization for proper support of both template types#789
Open
n-o-u-r-h-a-n wants to merge 3 commits intomainfrom
Open
fix: [PromptRegistry] oneOf deserialization for proper support of both template types#789n-o-u-r-h-a-n wants to merge 3 commits intomainfrom
n-o-u-r-h-a-n wants to merge 3 commits intomainfrom
Conversation
newtork
reviewed
Mar 18, 2026
| private static class JacksonMixin { | ||
| @JsonTypeInfo(use = JsonTypeInfo.Id.NONE) | ||
| @JsonDeserialize(as = SingleChatTemplate.class) | ||
| @JsonDeserialize(using = PromptTemplateDeserializer.class) |
Contributor
There was a problem hiding this comment.
(Major)
I assume this is a breaking change. Or it is a fix. Anyway it requires a dedicated PR with semantic title: fix: [PromptRegistry] ...
Contributor
Author
Contributor
There was a problem hiding this comment.
Alternatively just rename this PR, and keep everything as is.
LGTM
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.

Context
AI/ai-sdk-java-backlog#346.
Comprehensive unit test coverage was added as the prompt-registry module was initially developed as a PoC.
Feature scope:
PromptTemplate oneOfdeserialization now properly supports both template types.parsePromptTemplateByNameVersionwas identified as a hot path and tested.Definition of Done
Aligned changes with the JavaScript SDKDocumentation updated