swagger-api / validator-badge

Validate your Swagger JSON/YAML today!
http://swagger.io
Apache License 2.0
209 stars 85 forks source link

Validator results are different from Swagger Editor errors #117

Open axnsan12 opened 6 years ago

axnsan12 commented 6 years ago

The Swagger Editor seems to catch a lot more errors than the online validator. Is this by design or will it ever be fixed?

Is there any way to access the editor's validation programatically?

webron commented 6 years ago

The two validations are different. At the moment we don't offer a way to access the editor's validation.

If you provide us with examples of missed things, we can work on fixing those here.

axnsan12 commented 6 years ago

For my case, the editor complains if I add a parameter in: formData without adding multipart/form-data to consumes, while the validator does not.

webron commented 6 years ago

Thanks, we'll look into that. If you have any other issues, please file new tickets or add comments here.

smile18 commented 6 years ago

I see the validator has some bug, I was using this validator in my application to validate the swagger spec but found that it is not working correctly any more so I cloned the validator-badge to my local and ran the application and when I try to validate an invalid swagger spec in which I purposefully deleted one of the reference model say Addresses but it still says valid where as swagger editor shows error "Reference could not be resolved: #/definitions/Addresses" localinvalidswaggersuccess swaggereditorinvaliderror