mbknor / mbknor-jackson-jsonSchema

Generate JSON Schema with Polymorphism using Jackson annotations
MIT License
234 stars 79 forks source link

Adds a callback to user code when resolving a polymorphic type #138

Closed big-andy-coates closed 2 years ago

big-andy-coates commented 3 years ago

fixes: https://github.com/mbknor/mbknor-jackson-jsonSchema/issues/137

Alternative fix: (which I think I prefer) #139

Adds a callback to SubclassesResolver that is invoked when the generator is about to search for subtypes of a type annotated with @JsonTypeInfo, passing the type being resolved:

  def resolving(_type: JavaType)def resolving(_type: JavaType) = {}

This allows users to, optionally, execute custom code before ClassGraph attempts to determine the subtypes.

big-andy-coates commented 2 years ago

Thoughts on this change @mbknor. Feel free to close the PR is you're not going to merge / adopt...

big-andy-coates commented 2 years ago

Thoughts on this change @mbknor. Feel free to close the PR is you're not going to merge / adopt...