Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide callback to user code before trying to resolve @JsonTypeInfo types #137

Open
big-andy-coates opened this issue Jan 23, 2021 · 0 comments · May be fixed by #139
Open

Provide callback to user code before trying to resolve @JsonTypeInfo types #137

big-andy-coates opened this issue Jan 23, 2021 · 0 comments · May be fixed by #139

Comments

@big-andy-coates
Copy link
Contributor

A callback would allow users to be notified a polymorphic type was about to be resolved.

This can be useful to allow the calling code to perform some operation, e.g. dynamically register the required subtypes if they haven't been registered already.

big-andy-coates added a commit to big-andy-coates/mbknor-jackson-jsonSchema that referenced this issue Jan 23, 2021
big-andy-coates added a commit to big-andy-coates/mbknor-jackson-jsonSchema that referenced this issue Jan 25, 2021
…olving sub types.

Fixes: mbknor#137

Rather than providing a callback, just move the actual code for resolving subtypes into the resolver itself. Then users are free to implement what they like here.

Obviously, it's their responsibility that this aligns with what ever weird and wonderful serialization logic they have.
@big-andy-coates big-andy-coates linked a pull request Jan 25, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant