Can't read from file issue in Swagger UI

后端 未结 6 1583
无人共我
无人共我 2021-01-31 13:07

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

6条回答
  •  离开以前
    2021-01-31 13:49

    Setting this.model.validatorUrl = null; in dist/swagger-ui.js worked for me ..

    // Default validator
    if(window.location.protocol === 'https:') {
      //this.model.validatorUrl = 'https://online.swagger.io/validator';
      this.model.validatorUrl = null;
    } else {
      //this.model.validatorUrl = 'http://online.swagger.io/validator';
      this.model.validatorUrl = null;
    }
    

提交回复
热议问题