Change Swagger documentation theme easily.
npm install swagger-theme-changer
const swaggerThemes = require('swagger-theme-changer');
const theme = swaggerThemes.getTheme('universal-dark');
app.use(
'/api-docs',
swaggerUi.serve,
swaggerUi.setup(
{ openapi: '3.0.0' },
{ customCss: theme }
);
);
const theme = swaggerThemes.getTheme('dracula');
const theme = swaggerThemes.getTheme('gruvbox');
const theme = swaggerThemes.getTheme('monokai');
const theme = swaggerThemes.getTheme('nord-dark');
const theme = swaggerThemes.getTheme('one-dark');
const theme = swaggerThemes.getTheme('universal-dark');
const theme = swaggerThemes.getTheme('x-code-light');