I decided that I hate default light Swagger theme, so I created a simple project, which would solve this problem.
Usage:
1) Install:
nuget install oqo0.SwaggerThemes
2) Select a theme from link.
3) Update your project:
app.UseSwagger();
app.UseSwaggerThemes(Theme.UniversalDark); // selected theme goes here
app.UseSwaggerUI();
And if you are using NSwag:
app.UseOpenApi();
app.UseSwaggerUi(options =>
{
options.CustomInlineStyles = SwaggerTheme.GetSwaggerThemeCss(Theme.UniversalDark); // selected theme goes here
});
🎉 And thats it! Very simple.
Top comments (0)