DEV Community

loading...

Validating OAS3.X YAML spec files against the OAS3.0 spec in Java?

gauamg profile image gauamg ・1 min read

I am new to this forum and this is really more a question than a post. Hopefully this is OK.

I would like to be able to validate OAS3.X compatible YAML spec files against the OAS3.0 spec (https://spec.openapis.org/oas/v3.1.0). The built-in capabilities in swagger-parser and openapi4j appear to give inconsistent results. For instance the swagger-parser is not flagging that 'decimal' is not a valid data type in OAS3 etc. How could I write a validator from scratch in Java that would load the OAS3 spec and then validate the YAML spec files against it? (Note: In openapi4j, if the URL points to the OAS3.0 spec file, the parser quits with an exception.)

Thanks!

Discussion (0)

pic
Editor guide