3

I am using the online Swagger Editor (https://editor.swagger.io/) to validate my swagger, and it is giving me helpful error messages such as:

Semantic error at paths./whatever/something...required.3
Read only properties cannot be marked as required by a schema.

Semantic error at definitions.whatever.properties.whatever.description
Sibling values are not allowed alongside $refs

I need to perform this validation with a command-line tool, as part of a build. I can't find anything in any swagger.io project that will do this. In addition, I have tried the following third-party tools, all of which claim that my Swagger is valid:

  • swagger-cli
  • swagger-tools
  • swagger-codegen-cli

Is it possible to get the validation offered by the online Swagger Editor, but in a command-line tool?

Martin Del Vecchio
  • 3,558
  • 2
  • 27
  • 36
  • Related (or duplicate): [Swagger 2.0 offline validation](https://stackoverflow.com/questions/35978671/swagger-2-0-offline-validation) – Helen Jan 09 '18 at 19:43
  • Also I guess related - a GitHub issue https://github.com/APIDevTools/swagger-cli/issues/57 – brezniczky Apr 20 '22 at 11:55

0 Answers0