oas20postman-collectionjson.zipswagger-petstore-oas2-rev1-2020-10-19.zipoas20postman-collectionjson.zipsf-oasvalildation-rev1-2020-10-19.zip
How to validate open spec 2.0 and 3.0 versions using javascript policy?
I saw an article https://community.apigee.com/articles/42993/using-the-openapi-spec-to-validate-json-requests.html
Kurt Googler Kanaskie Could you please let me know how to validate OAS 3.0 spec
Hi, @Vijaya Krishna,
Iâve not done that yet, merely using an OAS 3.0 spec doesnât work.
1 Like
Hi Kurt, Why do you say OAS 3.0 doesnât work? Can it be made to work? Many thanks
Hi @Vijaya Krishna,
I provided an updated solution that supports OAS 2 and 3 request validation, plus it validates required headers and query params. See: https://community.apigee.com/articles/88441/validate-json-requests-using-openapi-spec-20-or-30.html
One of the differences between OAS 2 and 3 is how the request body schema is represented. Its now located in ârequestBody.content[âapplication/jsonâ].schemaâ vs parameters[in==body].