yonaskolb / SwagGen

OpenAPI/Swagger 3.0 Parser and Swift code generator
MIT License
625 stars 146 forks source link

The spec yaml files in this repo fail lots of Swagger validations #296

Open rogerluan opened 2 years ago

rogerluan commented 2 years ago

Description

If we pass /Specs/PetstoreTest/spec.yml through the online validator a https://editor.swagger.io, it throws these validation errors:

image

Same goes for /Specs/Rocket/spec.yml (there're tens of errors on this one, they wouldn't all fit in a single screenshot):

image

And /Specs/TBX/spec.json:

image

And /Specs/TestSpec/spec.yml:

image

And /Specs/TFL/spec.json:

image

Room for Improvement

I think a great improvement would be to have a spec validation step in CI for this repo, so that on every PR we'd be checking if all the spec yaml files continue to be valid. Here's a reference: https://swagger.io/blog/api-design/validate-openapi-definitions-swagger-editor/