nestjs / swagger

OpenAPI (Swagger) module for Nest framework (node.js) :earth_americas:

Home Page:https://nestjs.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

can we customize the css?

bahaa-alden opened this issue · comments

Is there an existing issue for this?

  • I have searched the existing issues

Current behavior

i put the url of css file in customCssUrl and it did not work
Screenshot from 2024-01-06 17-43-17

Minimum reproduction code

https://github.com/bahaa-alden/nest-init

Steps to reproduce

No response

Expected behavior

i want to add css file to swagger in nestjs

Package version

9.0.0

NestJS version

9.0.0

Node.js version

18

In which operating systems have you tested?

  • macOS
  • Windows
  • Linux

Other

No response

it worked after i add this to main.ts
app.useStaticAssets(join(__dirname, '..', 'public'), { extensions: ['jpg', 'css', 'png'], index: false, });