@dsaid/chain-wrap-components 
This provides a helper function for Swagger UI, it allows:
- Use of
chainWrapComponents(plugin1, plugin2...)
to enable chaining for multiple plugins with the same components in wrapComponents
.
- Add support to e.g.
swagger-ui v4.18.3
, pluginsOptions: {pluginLoadType: "chain"}
does not support chaining in wrapComponents
.
Prerequisites
Install
$ npm install @dsaid/chain-wrap-components
Usage
import otpAuthPlugin from '@dsaid/swagger-ui-plugin-otp-auth'
import samlAuthPlugin from '@dsaid/swagger-ui-plugin-saml-auth'
import chainWrapComponents from '@dsaid/chain-wrap-components'
SwaggerUI({
plugins: [
chainWrapComponents(otpAuthPlugin, samlAuthPlugin),
...
]
})