I have incorporated swagger UI in my application.
When I try and see the swagger UI, I get the documentation of the API nicely but after some time it shows some error i
If you are using files from swagger-ui github repo, then you can disable schema validation from your index.html
file by setting validatorUrl
to null
in it:
window.onload = function() {
// Build a system
const ui = SwaggerUIBundle({
url: "/docs/open_api.json",
dom_id: '#swagger-ui',
validatorUrl : null, # <----- Add this line
deepLinking: true,
presets: [
SwaggerUIBundle.presets.apis,
SwaggerUIStandalonePreset
],
plugins: [
SwaggerUIBundle.plugins.DownloadUrl
],
layout: "StandaloneLayout"
})