-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Support for JsonTypeInfo to add type information for Jackson1/Jackson2 #958
Comments
ddcruver
added a commit
to ddcruver/jsonschema2pojo
that referenced
this issue
Apr 4, 2019
…ation onto all generated classes as described in joelittlejohn#958
@joelittlejohn Do you think you could look over this and merge it in if you like it? |
joelittlejohn
pushed a commit
that referenced
this issue
Apr 23, 2019
Squashed commits: * This will add support for including the Jackson1/2 JsonTypeInfo annotation onto all generated classes as described in #958 * #967 Remove unnecessary constructor. * #967 Move type info related code into annotator implementations. * #967 Improve documentation to include references to deserializationClassProperty. * #967 make type info more generic as future annotators may not always implement through annotations. * #967 Move use plymorphic deserialization related code into annotator implementations. * #967 Move use plymorphic deserialization related code into annotator implementations. Updated composite annotator and tests instances. * #967 Improve documentation to include references to deserializationClassProperty in ant plugin. * #967 Update property in maven plugin and update tests.
This feature would be very useful! I would like to benefit from that too. |
@dsegoviat This feature is already implemented. Make sure you update to version 1.0.2. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I would like to create json-schema generated classes where type information added to the class. This is useful in cases when you want to enable polymorphism.
My primary use case is to add this to the top of generated classes:
@JsonTypeInfo(use=JsonTypeInfo.Id.CLASS, include=JsonTypeInfo.As.PROPERTY, property="@class")
Also my primary use case is Jackson 2 but Jackson 1 has similar classes and functionality.
The text was updated successfully, but these errors were encountered: