Skip to content

oqo0/swagger-themes-js

Repository files navigation

Swagger themes

github issues github last commits

Change Swagger documentation theme easily.

Usage

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 }
    );
);

Themes

Dracula

alt text

const theme = swaggerThemes.getTheme('dracula');

Gruvbox

alt text

const theme = swaggerThemes.getTheme('gruvbox');

Monokai

alt text

const theme = swaggerThemes.getTheme('monokai');

Nord Dark

alt text

const theme = swaggerThemes.getTheme('nord-dark');

One Dark

alt text

const theme = swaggerThemes.getTheme('one-dark');

Universal Dark

alt text

const theme = swaggerThemes.getTheme('universal-dark');

X-Code Light

alt text

const theme = swaggerThemes.getTheme('x-code-light');