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

Discriminator mapping throws validation error on valid discriminator mapping and accepts incorrect one. #199

Closed
pjordaan opened this issue Nov 9, 2023 · 1 comment

Comments

@pjordaan
Copy link

pjordaan commented Nov 9, 2023

Example found on https://swagger.io/docs/specification/data-models/inheritance-and-polymorphism/ in the section "Mapping Type Names"
The mapping section doesn't work with $ref references, but is a string that is being used as reference

If I add a mapping as found on the openapi spec site, i get a validation error that he expects a Reference object, but that is incorrect.
If i replace it with a Reference object, this libary says it's correct, but swagger ui and swagger editor say they expect a string and not an object.

Can this be fixed? For now I can just not fill in a mapping, but I prefer I could fill it in.

@pjordaan
Copy link
Author

pjordaan commented Nov 9, 2023

Never mind, I looked incorrectly. The issue was in my code.

@pjordaan pjordaan closed this as completed Nov 9, 2023
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