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

Do not require JsonSubType annotation for sealed classes #2696

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sahil-ramagiri
Copy link

Description of Changes

  1. SpringDocSealedClassModule.java
    • Provides swagger and jackson with the ability to introspect annotations and resolve subclasses from the permits list of sealed classes.
    • Ensures that subclasses are correctly identified without the need for JsonSubType annotations.
  2. SpringDocConfiguration.java
    • Registers the new SpringDocSealedClassModule with objectmapper.
  3. API Tests 224, 225
    • Includes polymorphic deserialization tests to verify functionality without JsonSubType annotations.

Important Note

@bnasslahsen
Copy link
Contributor

@sahil-ramagiri,

Your PR is still in draft mode.
Are you willing to finish it, or we need to close it ?

@sahil-ramagiri
Copy link
Author

sahil-ramagiri commented Sep 24, 2024

@sahil-ramagiri,

Your PR is still in draft mode. Are you willing to finish it, or we need to close it ?

@bnasslahsen This is dependent on this other issue in swagger-core. I am trying to get their attention but failing to do so. What do you suggest?

swagger-api/swagger-core#4744
swagger-api/swagger-core#4728

@bnasslahsen
Copy link
Contributor

@sahil-ramagiri,

Just try to ping them again, no worries

@bnasslahsen bnasslahsen changed the title Do not require JsonSubType annotation for sealed classes. Do not require JsonSubType annotation for sealed classes Oct 5, 2024
@bnasslahsen
Copy link
Contributor

i see

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.

2 participants