Closed k0ka closed 1 week ago
:warning: Please install the to ensure uploads and comments are reliably processed by Codecov.
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 84.51%. Comparing base (
8ea0461
) to head (daeadcb
).
:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
🚨 Try these New Features:
Hello,
I added this case to NswagClientExample
because it was the only integration test which enabled inheritance and polymorphic annotations.
Also, I found a problem in Annotation handler and fixed it. It was using only direct parent annotations to get type value.
The issue or feature being addressed
The
UseAllOfForInheritance
option of schema generator only accounts for direct parents. It makes impossible to generate correct discriminator information for a big inheritance tree.Example
data class structure:
Swagger generator options:
Generated components of the json:
It doesn't include
discriminator
andBaseType
definition.If we remove
SubType
and makeSubSubType
child ofBaseType
we would get the expected generated components:Details on the issue fix or feature implementation
This PR checks all parents until it finds the one which has this class defined as sub type. I added same assertions to test with one level assertions.