Reputation: 995
Is there any java/python/javascript library that validates API request/payload against openapi 3.0.2 i looked many of the libraries but was not able to find the correct one. There is one problem which is found when these libraries are not able to validate polymorphism and inheritance. for example oneOf, anyOf, allOf.
what is being trying to do is to validate an API request, which includes a set of fields as described by using oneOf keyword and then followed by discriminator & mapping. The mapping fields include values with allOf Keyword but the request for validating swagger fails.
Upvotes: 2
Views: 3269
Reputation: 2263
I would suggest the OpenAPI Initiative Tooling page for the list of available libraries.
There's Data validators category.
A half year ago, the best validator library I found for Java was Atlassian's Swagger Request Validator.
Upvotes: 3