JSPM

swagger-ui-customization

2.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 6
  • Score
    100M100P100Q46463F
  • License MIT

Customizes the Swagger UI with a version selector and allows you to track api version changes by adding colored tags to operations. Also automatically expands spoilers for convenience.

Package Exports

  • swagger-ui-customization
  • swagger-ui-customization/dist/index.js
  • swagger-ui-customization/dist/index.mjs

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (swagger-ui-customization) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Swagger UI Customization

Customizes the Swagger UI with a version selector and allows you to track API version changes by adding colored tags to operations. Also automatically expands spoilers for convenience.

Usage

To apply the customization, follow these two steps:

  1. Import setupSwaggerCustomization in the Swagger configuration file:

    import setupSwaggerCustomization from 'swagger-ui-customization';
  2. Specify the array of versions in swaggerOptions to define which API versions will be displayed in the version selector. Set the setupSwaggerCustomization function to the onComplete configuration of Swagger:

    swaggerOptions: {
        versions: [1, 2, 3]
        onComplete: setupSwaggerCustomization,
      },

Example Screenshots

Example 1 Example 2