You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The issue started to occur from version 1.5.8 onwards. From 1.5.8 to 1.6.9 (inlcuded) there was a nullPointer in the logs.
Since 1.6.10, the NullPointerException is fixed, but the documentation is still incorrect (not generating subtypes documentation).
The text was updated successfully, but these errors were encountered:
didjoman
changed the title
Polymorphism - documentation not generated for subtypes when using JsonTypeInfo.As.WRAPPER_OBJECT
Polymorphism - documentation not generated for subtypes when using JsonTypeInfo.As.WRAPPER_OBJECT and JsonTypeInfo.Id.NAME
Aug 18, 2022
Describe the bug
If a controller returning a response containing an interface or class that is annotated with:
Then, the documentation generated does not contain the schemas of child classes.
How to reproduce
git clone https://github.com/didjoman/springdoc-polymorphism-issue-v1.6.10
Run the application (spring boot).
Run curl --location --request GET 'http://localhost:8080/doc' --header 'Content-Type: application/json'
Expected behavior
The json representation of the Cat and Dog (subtypes of Animal class) schemas should be returned:
Actual behavior
Only the Animal (parent class) schema is described:
Additional context
The issue started to occur from version 1.5.8 onwards. From 1.5.8 to 1.6.9 (inlcuded) there was a nullPointer in the logs.
Since 1.6.10, the NullPointerException is fixed, but the documentation is still incorrect (not generating subtypes documentation).
See also the same demo using SpringDoc 1.5.7 that worked: https://github.com/didjoman/springdoc-no-polymorphism-issue-v1.5.7
The text was updated successfully, but these errors were encountered: