swagger-core icon indicating copy to clipboard operation
swagger-core copied to clipboard

Support subTypes registered via JSON.mapper().registerSubtypes()

Open RadicalQuiver opened this issue 10 years ago • 3 comments

The system I am working with can't use the annotation based definition of subtypes (either Swagger's or Jackson's) because the superclasses and subclasses are in separate OSGI bundles and the superclass->subclass references would cause dependency problems. As such we make pretty extensive use of Jackson's ObjectMapper.registerSubtypes() mechanism to setup these things, however, the way Swagger is written means that those subtype registrations are ignored.

I have a 1 line change that fixes this problem, and doesn't break anything else. (It effectively switches from using Jackson's annotation processor to using it's subtypes mechanism)

I would like to submit a PR. Any interest ?

RadicalQuiver avatar Oct 31 '16 21:10 RadicalQuiver

I am also facing the same issue. Was it ever fixed?

mukulb90 avatar Aug 21 '18 20:08 mukulb90

@RadicalQuiver Can you share your fix? Or create a PR?

michaelzangl avatar Mar 29 '21 14:03 michaelzangl

Closing this issue as part of our backlog cleanup effort.
This issue is outdated and/or inactive for a long time, and we’re not able to revisit it meaningfully.

If this problem is still relevant, please open a new issue and reference this one for context.
Thank you for your understanding!

MichakrawSB avatar Mar 08 '26 19:03 MichakrawSB