Turn Swagger Theme to the Dark Mode

2 · Romans Pokrovskis · June 26, 2021, 6:49 a.m.
So you have Swagger integrated into your .NET Core Web API application. Maybe even using my previous guide . And now you want to customize it a bit. I prefer my UI’s dark. So, when I am presented with a predominantly white screen from the Swagger default theme, I immediately want to change it. Luckily SwaggerUI supports CSS injection. Here are the tweaks that we need to make: Changes for Startup.cs Enable support for static files in a Configure() method app.UseStaticFiles(); Add folder structu...

Placeholder image
Romans Pokrovskis

I envision a world in which technology and automation have given us freedom from tedious tasks and everyone can focus on what individually matters most to them.

BLOG POST FEATURED ON

Add this plugin to your blog