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

UseOneOfForPolymorphism puts discriminator in useless place in swagger-file #1439

Open
SimonSimCity opened this issue May 12, 2023 · 0 comments

Comments

@SimonSimCity
Copy link

VERSION:

6.5.0

STEPS TO REPRODUCE:

Create an endpoint with an abstract class which is extended by two classes, whose instances could properly be returned at this endpoint. Enable UseOneOfForPolymorphism and set SelectDiscriminatorNameUsing and SelectDiscriminatorValueUsing.

EXPECTED RESULT:

As UseOneOfForPolymorphism replaces the usage of the abstract-class by a list of oneOf definition, containing the two classes extending it, the property discriminator should be on the oneOf definitions.

ACTUAL RESULT:

The property discriminator is instead defined on the component definition of the abstract class, where it's quite useless.

ADDITIONAL DETAILS

...

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

No branches or pull requests

1 participant