swagger-api / validator-badge

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

Allow POSTing of swagger definition to validator #91

Open btrepp opened 8 years ago

btrepp commented 8 years ago

I'm developing an API thats internal use only, and placing swagger-ui under a /swagger endpoint (so its self contained and run-able). I've just discovered swagger-ui is posting my swagger definition url out to swagger.io. This url will never be reachable by the swagger validator.

Could it be flipped?. Can the UI post the swagger.yaml to the validator?. That way there is only the requirement of the browser being able to access the validator.

webron commented 8 years ago

Right now we only support debugging by content, though adding validation should be fairly easy.

For your use case though, it will work only if the spec is a single file and doesn't contain external references.

Keep in mind you can always run a local instance of the validator as well, and point the ui to it.

dolmen commented 5 years ago

An alternative is to disable validation in swagger-ui : validatorUrl: null.