Skip to content

Instantly share code, notes, and snippets.

@intelguasoft
Created April 12, 2020 03:59
Show Gist options
  • Select an option

  • Save intelguasoft/daac22af912ff8c877de96d1fe5dfd4d to your computer and use it in GitHub Desktop.

Select an option

Save intelguasoft/daac22af912ff8c877de96d1fe5dfd4d to your computer and use it in GitHub Desktop.
Personalización del estilo y sus dependecias en libreria para Swagger en NestJS

The SwaggerModule accepts options argument as a 4th argument:

public static setup(
    path: string,
    app: INestApplication,
    document: SwaggerDocument,
    options?: SwaggerCustomOptions
) {...}

These options are passed down to the underlying swagger-ui-express package. Here is a SwaggerCustomOptions interface:

export interface SwaggerCustomOptions {
  explorer?: boolean;
  swaggerOptions?: any;
  customCss?: string;
  customJs?: string;
  customfavIcon?: string;
  swaggerUrl?: string;
  customSiteTitle?: string;
}

as you see, there is a customCss property available already.

@intelguasoft
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment