Are you trying to turn it off in Swagger UI?  If so then just modify the 
index.html and in the script tags next to where you had to modify it to 
point to your swagger file add the validatorUrl: "", text. It should look 
something like below:

window.onload = function() {
  
  // Build a system
  const ui = SwaggerUIBundle({
    url: "/api/swagger.json",
    dom_id: '#swagger-ui',
    validatorUrl: "",
    presets: [
      SwaggerUIBundle.presets.apis,
      SwaggerUIStandalonePreset
    ],
    plugins: [
      SwaggerUIBundle.plugins.DownloadUrl
    ],
    layout: "StandaloneLayout"
  })

  window.ui = ui
}
</script>

On Friday, July 28, 2017 at 4:19:39 AM UTC-5, zhangmingshui wrote:
>
> Hi,
> Is it possible to switch the swagger validation off using the swagger 
> configuration using the swagger.yml file?
>
> From googling it looks like this could be done using the setting 
> validatorUrl:null. We've tried numerous positioning of this config in our 
> swagger.yml but none of them seem to work.
> (we get the little red Error icon) on the bottom right hand corner of the 
> spec.
>
> We are using Play - Scala and here is our current swagger.yml
>
> ---
> swagger: "2.0"
> info:
>   title: foo-servicce
>   description: Foo service description
>   version: "BUILD"
> schemes:
>   - http
> consumes:
>   - application/json
> produces:
>   - application/json
> definitions:
>   EmptyJsonBody:
>     format: string
>     example : "{}"
>
> Any help/suggestion gratelully received.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to