Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for JsonPolymorphic and JsonDerivedType attributes to Swashbuckle.AspNetCore.Annotations for .NET7 and later #2671

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

schnerring
Copy link

@schnerring schnerring commented Jun 16, 2023

Beginning with .NET 7, System.Text.Json supports polymorphic type hierarchy serialization and deserialization with attribute annotations.

This PR adds support for JsonPolymorphic and JsonDerivedType attributes to Swashbuckle.AspNetCore.Annotations for .NET 7 and later.

Fixes #2571

@schnerring schnerring changed the title Add stj polymorphic attr Add support for JsonPolymorphic and JsonDerivedType attributes to Swashbuckle.AspNetCore.Annotations for .NET7 and later Jun 16, 2023
@schnerring
Copy link
Author

schnerring commented Jun 16, 2023

To fix the appveyor build, tests should be upgraded to net7 first. I'll rebase after related PR has been merged: #2672

@tomohisa
Copy link

This change would be great! @schnerring
Looking forward to use it in Swashbuckle.AspNetCore.Annotations

@martincostello
Copy link
Collaborator

Thanks for contributing - if you'd like to continue with this pull request, please rebase against the default branch to pick up our new CI. We'd also need tests for these new scenarios.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

System.Text.JSON polymorphic behaviour not supported
3 participants