PWZER / swagger-ui-py

Swagger UI for Python web framework, such Tornado, Flask and Sanic. https://pwzer.github.io/swagger-ui-py/
https://pypi.org/project/swagger-ui-py
Apache License 2.0
68 stars 31 forks source link

Disable Validator Option in Swagger object #18

Open cyrilj9696 opened 4 years ago

cyrilj9696 commented 4 years ago

Hello, Could you please add an option to disable the validator url. As my Tornado application and schema looks fine and i get all the endpoints displayed in the UI but i get this weird error at the bottom maybe cause I'm not hosting any of the schema's.

image Clicking on the invalid warning, gives an error like this {"schemaValidationMessages":[{"level":"error","message":"Can't read from file http://xx.xx.xx.xx/api/doc/swagger.json"}]}

Currently i'm bypassing this error by adding the validatorUrl: null in the swagger object of doc.html, by following this thread https://github.com/swagger-api/swagger-ui/issues/2796

Thanks