Swagger-ui is not distributed in a jar – how did you add it to your project?
From: <[email protected]> on behalf of zhangmingshui <[email protected]> Reply-To: "[email protected]" <[email protected]> Date: Tuesday, August 1, 2017 at 01:27 To: Swagger <[email protected]> Subject: Re: can validatorUrl be used to switch off swagger validation (Play - Scala)? Hi Austin, Thanks for getting back to me. Yes we are trying to turn it off. We haven't created the index.html file - but there is one in the target directory wed/publis/main/lib/swagger-ui so I am guessing that it is being generated somehow or copied from the original swagger Jar. So I don't think changing the index.html would be an option for us, but happy to be corrected :) On Friday, July 28, 2017 at 8:09:17 PM UTC+1, Austin wrote: 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 [email protected]. For more options, visit https://groups.google.com/d/optout. -- 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 [email protected]. For more options, visit https://groups.google.com/d/optout.
