Add a way to add custom css to the generated swagger html
See original GitHub issueI’m submitting a…
[ ] Regression
[ ] Bug report
[x] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.
Current behavior
There’s no option to add custom styles to the generated swagger html
Expected behavior
have an option for the DocumentBuilder
to setCustomCss
that recieves a path to a css file (or scss file?)
Environment
Nest version: 5.0.0
For Tooling issues:
- Node version: 7.7.3
- Platform: Mac
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (2 by maintainers)
Top Results From Across the Web
Modify Swagger default UI by injecting custom CSS
We need to add static css file, so the preferred place is to add under wwwroot folder. ... Step 2: Add custom CSS...
Read more >How to add custom css in swagger-ui using .Net
In swashbuckle there is an option: InjectStylesheet that should do exactly what you need. That is located in the SwaggerConfig.cs and is ...
Read more >How to customize Swagger UI with custom CSS in .NET 7
In this article, we will learn how to inject a CSS file in the Swagger UI generated using .NET Minimal APIs. How to...
Read more >How I Customized The Swagger UI In ASP.NET Core
A custom CSS file is needed under "wwwroot/swagger-ui/custom. css". This replaced the logo with a text, but you should be able to replace...
Read more >Customizing Swagger UI in ASP.NET Core - Chris Pratt
The procedure here is pretty much the same as with adding custom CSS above. Add a custom.js file to the swagger-ui folder you...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The
SwaggerModule
acceptsoptions
argument as a 4th argument:These options are passed down to the underlying
swagger-ui-express
package. Here is aSwaggerCustomOptions
interface:as you see, there is a
customCss
property available already.Maybe it is a good point to add it into the documentation 😃 feel free to create a PR, if you want to