2

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.

1 Answer 1

3

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.

Sign up to request clarification or add additional context in comments.

3 Comments

Thanks for this..i am also using this in my project. but its failing for oneOf, anyOf, allOf
Yes, it seems pretty difficult to find mature and well-maintained tools.
Link in answer is broken (Data validators category). New link is: tools.openapis.org/categories/data-validators.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.