swagger-ui-customization
v2.0.1
Published
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.
Downloads
51
Maintainers
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:
Import
setupSwaggerCustomization
in the Swagger configuration file:import setupSwaggerCustomization from 'swagger-ui-customization';
Specify the array of versions in swaggerOptions to define which API versions will be displayed in the version selector. Set the
setupSwaggerCustomization
function to theonComplete
configuration of Swagger:swaggerOptions: { versions: [1, 2, 3] onComplete: setupSwaggerCustomization, },
Example Screenshots