Swagger UI shows error (validation) when deployed

前端 未结 3 1724
自闭症患者
自闭症患者 2021-02-03 18:38

I have the swagger ui embedded in my application. And when I run my node application locally the UI works great.

However when I deploy the UI to my \'real\' server I ge

3条回答
  •  遥遥无期
    2021-02-03 19:05

    Swagger-UI is able to handle some malformed specs, which is probably why it is works locally.

    By default, the validation process does not run when the spec is read from localhost. You should be able to run it still, if you wish, using the validatorUrl (https://github.com/swagger-api/swagger-ui#parameters).

    To see the validation errors, just click on the ERROR icon, and it will give you a list of problems with your spec.

提交回复
热议问题