Cody2333 / koa-swagger-decorator

using decorator to automatically generate swagger doc for koa-router
348 stars 81 forks source link

if the option value is null or an object #130

Closed bulog closed 2 years ago

bulog commented 3 years ago

We want to disable the validator badge, so we tried to add option validatorUrl: null to swagger-ui swaggerConfiguration

const swaggerRouter = new SwaggerRouter();
swaggerRouter.swagger({
    ...
    //swagger ui config https://swagger.io/docs/open-source-tools/swagger-ui/usage/configuration/
    swaggerConfiguration: {
        display: {
            validatorUrl: null
        }
    }
});

But, this did not works, and we tried a few fixes by change the file ./dist/swaggerHTML.js, and it works