iheartradio / play-swagger

Swagger spec generator for play framework
Apache License 2.0
404 stars 131 forks source link

How to turn off validation in Swagger UI? #92

Closed vasily-kirichenko closed 8 years ago

vasily-kirichenko commented 8 years ago

image

{"schemaValidationMessages":[{"level":"error","message":"Can't read from file http://<private host name>:9000/docs/swagger.json"}]}
kailuowang commented 8 years ago

Is your swagger spec showing up? This error message swagger UI gave isn't very helpful 😞

kbedel commented 8 years ago

The validator badge in Swagger UI uses the publicly hosted version of the swagger validator. If you want to update it to either turn off the badge or point to a locally hosted validator which is able to reach your endpoint, you can set the validatorUrl property in the Swagger UI index.html page. See the Swagger UI github page for more info.

If you are using docker to host your swagger UI endpoint, see this docker hub image. I recently made a contribution that allows you to override the validator within the image.

KamakshaiahM commented 6 years ago

Hi, My case is little different , I am using Swagger UI Webjars-3.14.2 to generate Swagger UI JS files in my project structure dynamically, as a result if i introduce index.html file with validateURL:null attribute, the original from web jars retains back every time upon mvn compile. Could you put me in right direction.