Allow to configure functional swagger option parameters and plugins
opened this issue · comments
Deleted user commented
Hello,
currently its necessary to configure requestInterceptor and also a plugin.
So I extends a local copy of your project to add the new functionality.
If you can adopt my changes to your code, I can switch back to your project.
Thx
//index.js
...
module.exports = function koaSwagger(config) {
...
// added two helper to check and render functions directly
Handlebars.registerHelper('strfnc', fnc => fnc)
Handlebars.registerHelper('isset', function (conditional, options) { return !!conditional ? options.fn(this) : options.inverse(this) })
...
Scott Cooper commented
Can you do a pr please?
Deleted user commented
#41
Done
Scott Cooper commented
published as 2.7.0. thanks for the PR