Socket
Socket
Sign inDemoInstall

@dsaid/chain-wrap-components

Package Overview
Dependencies
6
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @dsaid/chain-wrap-components

This provides a helper function for [Swagger UI](https://swagger.io/docs/open-source-tools/swagger-ui/customization/plugin-api/), it allows:


Version published
Maintainers
1
Created

Readme

Source

@dsaid/chain-wrap-components npm version

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'

// swagger-ui initialization
  SwaggerUI({
    plugins: [
      // otpAuthPlugin and samlAuthPlugin both overriding wrapComponenrs
      // e.g. wrapComponents: {AuthItem: ...}
      chainWrapComponents(otpAuthPlugin, samlAuthPlugin),
      ...
    ]
  })

FAQs

Last updated on 05 May 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc