Details
-
Improvement
-
Status: Patch Available
-
Minor
-
Resolution: Unresolved
-
1.8.2
-
None
Description
This patch facilitates the addition of Union types for a given class. This is equivalent to adding an @Union annotation with values. But this can help in cases where you cannot mutate the class to annotate it (or don't want to use java-agent to transform/mutate the class at runtime).
UseCase:
In our project, we are using ReflectData to generate schema for external jar imported classes which cannot be mutated. In this scenario, we cannot add @Union annotation to the base class to add all implemenations of the derived classes. So, when generating schema, the derived classes are not included.
This patch will enable us to add the union type information so that ReflectData can generate the schema with union types also in it.
Please let us know if you have any questions. I would make corresponding changes. Thanks
Attachments
Issue Links
- links to