├── .idea └── .idea.SwaggerThemes │ └── .idea │ ├── .name │ ├── encodings.xml │ ├── vcs.xml │ ├── indexLayout.xml │ ├── discord.xml │ └── .gitignore ├── assets ├── sepia.png ├── dracula.png ├── gruvbox.png ├── monokai.png ├── one-dark.png ├── nord-dark.png ├── x-code-light.png └── universal-dark.png ├── SwaggerThemes ├── package-logo.png ├── Themes │ ├── x-code-light.css │ ├── sepia.css │ ├── dracula.css │ ├── vs2022.css │ ├── gruvbox.css │ ├── nord-dark.css │ ├── monokai.css │ ├── universal-dark.css │ ├── one-dark.css │ └── _base.css ├── Theme.cs ├── SwaggerTheme.cs └── SwaggerThemes.csproj ├── .gitignore ├── SwaggerThemes.Sample ├── appsettings.Development.json ├── appsettings.json ├── Program.cs ├── SwaggerThemes.Sample.csproj ├── Endpoints.cs └── Properties │ └── launchSettings.json ├── LICENSE.md ├── .github └── workflows │ └── main.yml ├── SwaggerThemes.sln └── README.md /.idea/.idea.SwaggerThemes/.idea/.name: -------------------------------------------------------------------------------- 1 | SwaggerThemes -------------------------------------------------------------------------------- /assets/sepia.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oqo0/swagger-themes/HEAD/assets/sepia.png -------------------------------------------------------------------------------- /assets/dracula.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oqo0/swagger-themes/HEAD/assets/dracula.png -------------------------------------------------------------------------------- /assets/gruvbox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oqo0/swagger-themes/HEAD/assets/gruvbox.png -------------------------------------------------------------------------------- /assets/monokai.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oqo0/swagger-themes/HEAD/assets/monokai.png -------------------------------------------------------------------------------- /assets/one-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oqo0/swagger-themes/HEAD/assets/one-dark.png -------------------------------------------------------------------------------- /assets/nord-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oqo0/swagger-themes/HEAD/assets/nord-dark.png -------------------------------------------------------------------------------- /assets/x-code-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oqo0/swagger-themes/HEAD/assets/x-code-light.png -------------------------------------------------------------------------------- /assets/universal-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oqo0/swagger-themes/HEAD/assets/universal-dark.png -------------------------------------------------------------------------------- /SwaggerThemes/package-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oqo0/swagger-themes/HEAD/SwaggerThemes/package-logo.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | bin/ 2 | obj/ 3 | .vs/ 4 | *.user 5 | /packages/ 6 | riderModule.iml 7 | /_ReSharper.Caches/ 8 | /SwaggerThemesSample -------------------------------------------------------------------------------- /SwaggerThemes.Sample/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /.idea/.idea.SwaggerThemes/.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /SwaggerThemes.Sample/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | }, 8 | "AllowedHosts": "*" 9 | } 10 | -------------------------------------------------------------------------------- /.idea/.idea.SwaggerThemes/.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/.idea.SwaggerThemes/.idea/indexLayout.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.idea/.idea.SwaggerThemes/.idea/discord.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | -------------------------------------------------------------------------------- /.idea/.idea.SwaggerThemes/.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /shelf/ 3 | /workspace.xml 4 | # Rider ignored files 5 | /projectSettingsUpdater.xml 6 | /modules.xml 7 | /contentModel.xml 8 | /.idea.SwaggerThemes.iml 9 | # Editor-based HTTP Client requests 10 | /httpRequests/ 11 | # Datasource local storage ignored files 12 | /dataSources/ 13 | /dataSources.local.xml 14 | -------------------------------------------------------------------------------- /SwaggerThemes.Sample/Program.cs: -------------------------------------------------------------------------------- 1 | using SwaggerThemes; 2 | using SwaggerThemes.Sample; 3 | 4 | var builder = WebApplication.CreateBuilder(args); 5 | 6 | builder.Services.AddEndpointsApiExplorer(); 7 | builder.Services.AddSwaggerGen(); 8 | 9 | var app = builder.Build(); 10 | 11 | if (app.Environment.IsDevelopment()) 12 | { 13 | app.UseSwagger(); 14 | app.UseSwaggerUI(Theme.UniversalDark); 15 | } 16 | 17 | app.AddEndpoints(); 18 | 19 | app.Run(); -------------------------------------------------------------------------------- /SwaggerThemes.Sample/SwaggerThemes.Sample.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net9.0 5 | enable 6 | enable 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /SwaggerThemes.Sample/Endpoints.cs: -------------------------------------------------------------------------------- 1 | namespace SwaggerThemes.Sample; 2 | 3 | internal static class Endpoints 4 | { 5 | internal static WebApplication AddEndpoints(this WebApplication app) 6 | { 7 | app.MapGet("/get", () => "Result") 8 | .WithSampleInfo(); 9 | app.MapPost("/post", () => "Result") 10 | .WithSampleInfo(); 11 | app.MapPut("/put", () => "Result") 12 | .WithSampleInfo(); 13 | app.MapDelete("/delete", () => "Result") 14 | .WithSampleInfo(); 15 | app.MapPatch("/patch", () => "Result") 16 | .WithSampleInfo(); 17 | 18 | return app; 19 | } 20 | 21 | private static RouteHandlerBuilder WithSampleInfo(this RouteHandlerBuilder routeHandlerBuilder) 22 | { 23 | routeHandlerBuilder 24 | .WithSummary("Method summary") 25 | .WithDescription("Sample description") 26 | .WithTags("Sample tag") 27 | .WithOpenApi(); 28 | 29 | return routeHandlerBuilder; 30 | } 31 | } -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) [year] [fullname] 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | name: Nuget Publish 2 | 3 | on: 4 | release: 5 | types: [published] 6 | 7 | jobs: 8 | 9 | publish: 10 | runs-on: ubuntu-latest 11 | 12 | steps: 13 | - name: Checkout code 14 | uses: actions/checkout@v3 15 | 16 | - name: Setup .NET 17 | uses: actions/setup-dotnet@v3 18 | with: 19 | dotnet-version: '9.0.x' 20 | 21 | - name: Restore dependencies 22 | working-directory: ./SwaggerThemes 23 | run: dotnet restore 24 | 25 | - name: Build the project for all frameworks 26 | working-directory: ./SwaggerThemes 27 | run: dotnet build --configuration Release --no-restore 28 | 29 | - name: Pack the project 30 | working-directory: ./SwaggerThemes 31 | run: dotnet pack --configuration Release --no-build --output './packages' 32 | 33 | - name: Publish to NuGet 34 | working-directory: ./SwaggerThemes 35 | env: 36 | NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} 37 | run: dotnet nuget push './packages/*.nupkg' --api-key $NUGET_API_KEY --source https://api.nuget.org/v3/index.json 38 | -------------------------------------------------------------------------------- /SwaggerThemes.Sample/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/launchsettings.json", 3 | "iisSettings": { 4 | "windowsAuthentication": false, 5 | "anonymousAuthentication": true, 6 | "iisExpress": { 7 | "applicationUrl": "http://localhost:44883", 8 | "sslPort": 44374 9 | } 10 | }, 11 | "profiles": { 12 | "http": { 13 | "commandName": "Project", 14 | "dotnetRunMessages": true, 15 | "launchBrowser": true, 16 | "launchUrl": "swagger", 17 | "applicationUrl": "http://localhost:5266", 18 | "environmentVariables": { 19 | "ASPNETCORE_ENVIRONMENT": "Development" 20 | } 21 | }, 22 | "https": { 23 | "commandName": "Project", 24 | "dotnetRunMessages": true, 25 | "launchBrowser": true, 26 | "launchUrl": "swagger", 27 | "applicationUrl": "https://localhost:7092;http://localhost:5266", 28 | "environmentVariables": { 29 | "ASPNETCORE_ENVIRONMENT": "Development" 30 | } 31 | }, 32 | "IIS Express": { 33 | "commandName": "IISExpress", 34 | "launchBrowser": true, 35 | "launchUrl": "swagger", 36 | "environmentVariables": { 37 | "ASPNETCORE_ENVIRONMENT": "Development" 38 | } 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /SwaggerThemes.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SwaggerThemes", "SwaggerThemes\SwaggerThemes.csproj", "{7E0BD97D-F12D-4928-97AA-780949FFC161}" 4 | EndProject 5 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SwaggerThemes.Sample", "SwaggerThemes.Sample\SwaggerThemes.Sample.csproj", "{70F25CFB-C225-4027-8E6C-21C66C8B1C72}" 6 | EndProject 7 | Global 8 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 9 | Debug|Any CPU = Debug|Any CPU 10 | Release|Any CPU = Release|Any CPU 11 | EndGlobalSection 12 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 13 | {7E0BD97D-F12D-4928-97AA-780949FFC161}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 14 | {7E0BD97D-F12D-4928-97AA-780949FFC161}.Debug|Any CPU.Build.0 = Debug|Any CPU 15 | {7E0BD97D-F12D-4928-97AA-780949FFC161}.Release|Any CPU.ActiveCfg = Release|Any CPU 16 | {7E0BD97D-F12D-4928-97AA-780949FFC161}.Release|Any CPU.Build.0 = Release|Any CPU 17 | {70F25CFB-C225-4027-8E6C-21C66C8B1C72}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 18 | {70F25CFB-C225-4027-8E6C-21C66C8B1C72}.Debug|Any CPU.Build.0 = Debug|Any CPU 19 | {70F25CFB-C225-4027-8E6C-21C66C8B1C72}.Release|Any CPU.ActiveCfg = Release|Any CPU 20 | {70F25CFB-C225-4027-8E6C-21C66C8B1C72}.Release|Any CPU.Build.0 = Release|Any CPU 21 | EndGlobalSection 22 | GlobalSection(NestedProjects) = preSolution 23 | EndGlobalSection 24 | EndGlobal 25 | -------------------------------------------------------------------------------- /SwaggerThemes/Themes/x-code-light.css: -------------------------------------------------------------------------------- 1 | /* https://github.com/oqo0/swagger-themes */ 2 | 3 | :root { 4 | /* primary colors */ 5 | --swagger-color: #4c9325; 6 | --link-color: #407ec9; 7 | --accept-header-color: #619929; 8 | 9 | /* methods colors */ 10 | --post-method-color: #619929; 11 | --post-method-background-color: rgba(0, 0, 0, .0); 12 | --get-method-color: #57A9D7; 13 | --get-method-background-color: rgba(0, 0, 0, .0); 14 | --head-method-color: #9B2393; 15 | --head-method-background-color: rgba(0, 0, 0, .0); 16 | --put-method-color: #0B4F79; 17 | --put-method-background-color: rgba(0, 0, 0, .0); 18 | --delete-method-color: #D12F1B; 19 | --delete-method-background-color: rgba(0, 0, 0, .0); 20 | --options-method-color: #000000; 21 | --options-method-background-color: rgba(0, 0, 0, .0); 22 | --patch-method-color: #0E0EFF; 23 | --patch-method-background-color: rgba(0, 0, 0, .0); 24 | 25 | /* background */ 26 | --all-bg-color: #ffffff; 27 | --secondary-bg-color: #F2F2F2; 28 | --header-bg-color: #619929; 29 | --block-bg-color: #E9E9E9; 30 | --selecter-bg-color: #F2F2F2; 31 | 32 | /* text */ 33 | --primary-text-color: rgb(0, 0, 0); 34 | --secondary-text-color: rgba(0, 0, 0, 0.4); 35 | 36 | /* border */ 37 | --block-border-color: rgba(0, 0, 0, 0.08); 38 | --block-border-radius: 12px; 39 | --innner-block-border-radius: 8px; 40 | 41 | /* icons */ 42 | --primary-icon-color: #000000; 43 | --icons-opacity: none; 44 | --secondary-icon-opacity: none; 45 | --black-icons-filter: none; 46 | } -------------------------------------------------------------------------------- /SwaggerThemes/Themes/sepia.css: -------------------------------------------------------------------------------- 1 | /* https://github.com/oqo0/swagger-themes */ 2 | 3 | :root { 4 | /* primary colors */ 5 | --swagger-color: #91bb26; 6 | --link-color: #468ca5; 7 | --accept-header-color: #7ec038; 8 | 9 | /* methods colors */ 10 | --post-method-color: #76c580; 11 | --post-method-background-color: rgba(0, 0, 0, .0); 12 | --get-method-color: #8cd3c7; 13 | --get-method-background-color: rgba(0, 0, 0, .0); 14 | --head-method-color: #c58d9d; 15 | --head-method-background-color: rgba(0, 0, 0, .0); 16 | --put-method-color: #8e3f70; 17 | --put-method-background-color: rgba(0, 0, 0, .0); 18 | --delete-method-color: #9e78b4; 19 | --delete-method-background-color: rgba(0, 0, 0, .0); 20 | --options-method-color: rgb(77, 110, 194); 21 | --options-method-background-color: rgba(0, 0, 0, .0); 22 | --patch-method-color: rgb(225, 143, 61); 23 | --patch-method-background-color: rgba(0, 0, 0, .0); 24 | 25 | /* background */ 26 | --all-bg-color: #f7f3d6; 27 | --secondary-bg-color: #e9e1be; 28 | --header-bg-color: #b7a770; 29 | --block-bg-color: #f0e3bb; 30 | --selecter-bg-color: #f9efc6; 31 | 32 | /* text */ 33 | --primary-text-color: rgb(40, 40, 40); 34 | --secondary-text-color: rgb(143, 143, 143); 35 | 36 | /* border */ 37 | --block-border-color: rgb(212, 195, 160); 38 | --block-border-radius: 0px; 39 | --innner-block-border-radius: 0px; 40 | 41 | /* icons */ 42 | --primary-icon-color: #000000; 43 | --icons-opacity: none; 44 | --secondary-icon-opacity: none; 45 | --black-icons-filter: none; 46 | } -------------------------------------------------------------------------------- /SwaggerThemes/Themes/dracula.css: -------------------------------------------------------------------------------- 1 | /* https://github.com/oqo0/swagger-themes */ 2 | 3 | :root { 4 | /* primary colors */ 5 | --swagger-color: #86ff54; 6 | --link-color: #86E1F4; 7 | --accept-header-color: #34A05E; 8 | 9 | /* methods colors */ 10 | --post-method-color: #5bdc3e; 11 | --post-method-background-color: rgba(0, 0, 0, .0); 12 | --get-method-color: #51e3cb; 13 | --get-method-background-color: rgba(0, 0, 0, .0); 14 | --head-method-color: #F87FBD; 15 | --head-method-background-color: rgba(0, 0, 0, .0); 16 | --put-method-color: #e0a44e; 17 | --put-method-background-color: rgba(0, 0, 0, .0); 18 | --delete-method-color: #9680FF; 19 | --delete-method-background-color: rgba(0, 0, 0, .0); 20 | --options-method-color: rgb(64, 145, 225); 21 | --options-method-background-color: rgba(0, 0, 0, .0); 22 | --patch-method-color: rgb(229, 178, 38); 23 | --patch-method-background-color: rgba(0, 0, 0, .0); 24 | 25 | /* background */ 26 | --all-bg-color: #282A36; 27 | --secondary-bg-color: #282A35; 28 | --header-bg-color: #3A3D4C; 29 | --block-bg-color: #414450; 30 | --selecter-bg-color: #3A3D4C; 31 | 32 | /* text */ 33 | --primary-text-color: rgba(255, 255, 255, 1.00); 34 | --secondary-text-color: rgba(193, 192, 192, 1.00); 35 | 36 | /* border */ 37 | --block-border-color: rgba(255, 255, 255, 0.08); 38 | --block-border-radius: 12px; 39 | --innner-block-border-radius: 8px; 40 | 41 | /* icons */ 42 | --primary-icon-color: #ffffff; 43 | --icons-opacity: 0; 44 | --secondary-icon-opacity: .6; 45 | --black-icons-filter: invert(1); 46 | } -------------------------------------------------------------------------------- /SwaggerThemes/Themes/vs2022.css: -------------------------------------------------------------------------------- 1 | :root { 2 | /* primary colors */ 3 | --swagger-color: #007acc; 4 | --link-color: #3794ff; 5 | --accept-header-color: #6a9955; 6 | /* methods colors */ 7 | --post-method-color: rgb(127, 176, 84); 8 | --post-method-background-color: rgba(127, 176, 84, .08); 9 | --get-method-color: rgb(58, 150, 221); 10 | --get-method-background-color: rgba(58, 150, 221, .08); 11 | --head-method-color: rgb(183, 121, 215); 12 | --head-method-background-color: rgba(183, 121, 215, .08); 13 | --put-method-color: rgb(181, 101, 29); 14 | --put-method-background-color: rgba(181, 101, 29, .08); 15 | --delete-method-color: rgb(230, 17, 35); 16 | --delete-method-background-color: rgba(230, 17, 35, .08); 17 | --options-method-color: rgb(193, 156, 0); 18 | --options-method-background-color: rgba(193, 156, 0, .08); 19 | --patch-method-color: rgb(106, 153, 85); 20 | --patch-method-background-color: rgba(106, 153, 85, .08); 21 | /* background */ 22 | --all-bg-color: #1e1e1e; 23 | --secondary-bg-color: #1e1e1e; 24 | --header-bg-color: #252526; 25 | --block-bg-color: #2d2d30; 26 | --selecter-bg-color: #3c3c3c; 27 | /* text */ 28 | --primary-text-color: rgb(204, 204, 204); 29 | --secondary-text-color: rgba(204, 204, 204, 0.8); 30 | /* border */ 31 | --block-border-color: rgba(128, 128, 128, 0.3); 32 | --block-border-radius: 6px; 33 | --innner-block-border-radius: 2px; 34 | /* icons */ 35 | --primary-icon-color: rgb(204, 204, 204); 36 | --icons-opacity: 0.3; 37 | --secondary-icon-opacity: .5; 38 | --black-icons-filter: invert(1); 39 | } 40 | -------------------------------------------------------------------------------- /SwaggerThemes/Themes/gruvbox.css: -------------------------------------------------------------------------------- 1 | /* https://github.com/oqo0/swagger-themes */ 2 | 3 | :root { 4 | /* primary colors */ 5 | --swagger-color: #86C066; 6 | --link-color: #4783BB; 7 | --accept-header-color: #86C066; 8 | 9 | /* methods colors */ 10 | --post-method-color: rgb(155, 182, 37); 11 | --post-method-background-color: rgba(0, 0, 0, .0); 12 | --get-method-color: rgb(69, 132, 135); 13 | --get-method-background-color: rgba(0, 0, 0, .0); 14 | --head-method-color: rgb(218, 185, 252); 15 | --head-method-background-color: rgba(0, 0, 0, .0); 16 | --put-method-color: rgb(248, 188, 47); 17 | --put-method-background-color: rgba(0, 0, 0, .0); 18 | --delete-method-color: rgb(227, 67, 45); 19 | --delete-method-background-color: rgba(0, 0, 0, .0); 20 | --options-method-color: rgb(164, 99, 110); 21 | --options-method-background-color: rgba(0, 0, 0, .0); 22 | --patch-method-color: rgb(118, 128, 134); 23 | --patch-method-background-color: rgba(0, 0, 0, .0); 24 | 25 | /* background */ 26 | --all-bg-color: #282828; 27 | --secondary-bg-color: #282828; 28 | --header-bg-color: #282828; 29 | --block-bg-color: #282828; 30 | --selecter-bg-color: #282828; 31 | 32 | /* text */ 33 | --primary-text-color: rgb(255, 251, 238); 34 | --secondary-text-color: rgb(189, 172, 156); 35 | 36 | /* border */ 37 | --block-border-color: rgba(255, 255, 255, 0.08); 38 | --block-border-radius: 0px; 39 | --innner-block-border-radius: 0px; 40 | 41 | /* icons */ 42 | --primary-icon-color: #bdac9c; 43 | --icons-opacity: .42; 44 | --secondary-icon-opacity: .7; 45 | --black-icons-filter: invert(1); 46 | } -------------------------------------------------------------------------------- /SwaggerThemes/Themes/nord-dark.css: -------------------------------------------------------------------------------- 1 | /* https://github.com/oqo0/swagger-themes */ 2 | 3 | :root { 4 | /* primary colors */ 5 | --swagger-color: #88C0D0; 6 | --link-color: #88C0D0; 7 | --accept-header-color: #A3BE8C; 8 | 9 | /* methods colors */ 10 | --post-method-color: rgb(163, 190, 140); 11 | --post-method-background-color: rgba(163, 190, 140, .1); 12 | --get-method-color: rgb(136, 192, 208); 13 | --get-method-background-color: rgba(136, 192, 208, .1); 14 | --head-method-color: rgb(129, 161, 193); 15 | --head-method-background-color: rgba(129, 161, 193, .1); 16 | --put-method-color: rgb(208, 135, 112); 17 | --put-method-background-color: rgba(208, 135, 112, .1); 18 | --delete-method-color: rgb(191, 97, 106); 19 | --delete-method-background-color: rgba(191, 97, 106, .1); 20 | --options-method-color: rgb(108, 120, 173); 21 | --options-method-background-color: rgba(108, 120, 173, 0.1); 22 | --patch-method-color: rgb(195, 171, 122); 23 | --patch-method-background-color: rgba(195, 171, 122, .1); 24 | 25 | /* background */ 26 | --all-bg-color: #2E3440; 27 | --secondary-bg-color: #3B4252; 28 | --header-bg-color: #4C566A; 29 | --block-bg-color: #323846; 30 | --selecter-bg-color: #3B4252; 31 | 32 | /* text */ 33 | --primary-text-color: #D8DEE9; 34 | --secondary-text-color: #78808f; 35 | 36 | /* border */ 37 | --block-border-color: rgba(250, 250, 255, 0.08); 38 | --block-border-radius: 6px; 39 | --innner-block-border-radius: 2px; 40 | 41 | /* icons */ 42 | --primary-icon-color: #D8DEE9; 43 | --icons-opacity: .32; 44 | --secondary-icon-opacity: .6; 45 | --black-icons-filter: invert(1); 46 | } -------------------------------------------------------------------------------- /SwaggerThemes/Themes/monokai.css: -------------------------------------------------------------------------------- 1 | /* https://github.com/oqo0/swagger-themes */ 2 | 3 | :root { 4 | /* primary colors */ 5 | --swagger-color: #7cc256; 6 | --link-color: #5685b7; 7 | --accept-header-color: #a8da75; 8 | 9 | /* methods colors */ 10 | --post-method-color: rgb(168, 218, 117); 11 | --post-method-background-color: rgba(168, 218, 117, .1); 12 | --get-method-color: rgb(120, 220, 232); 13 | --get-method-background-color: rgba(120, 220, 232, .1); 14 | --head-method-color: rgb(166, 153, 235); 15 | --head-method-background-color: rgba(166, 153, 235, .1); 16 | --put-method-color: rgb(241, 149, 97); 17 | --put-method-background-color: rgba(241, 149, 97, .1); 18 | --delete-method-color: rgb(255, 97, 136); 19 | --delete-method-background-color: rgba(255, 97, 136, .1); 20 | --options-method-color: rgb(130, 170, 255); 21 | --options-method-background-color: rgba(25, 123, 220, 0.1); 22 | --patch-method-color: rgb(0, 172, 193); 23 | --patch-method-background-color: rgba(80, 227, 194, .1); 24 | 25 | /* background */ 26 | --all-bg-color: #221F22; 27 | --secondary-bg-color: #2D2A2E; 28 | --header-bg-color: #2D2A2E; 29 | --block-bg-color: #2D2A2E; 30 | --selecter-bg-color: #363337; 31 | 32 | /* text */ 33 | --primary-text-color: rgba(255, 255, 255, 1.00); 34 | --secondary-text-color: rgba(193, 192, 192, 1.00); 35 | 36 | /* border */ 37 | --block-border-color: rgba(255, 255, 255, 0.08); 38 | --block-border-radius: 0px; 39 | --innner-block-border-radius: 0px; 40 | 41 | /* icons */ 42 | --primary-icon-color: #ffffff; 43 | --icons-opacity: .32; 44 | --secondary-icon-opacity: .6; 45 | --black-icons-filter: invert(1); 46 | } -------------------------------------------------------------------------------- /SwaggerThemes/Themes/universal-dark.css: -------------------------------------------------------------------------------- 1 | /* https://github.com/oqo0/swagger-themes */ 2 | 3 | :root { 4 | /* primary colors */ 5 | --swagger-color: #62a03f; 6 | --link-color: #4e9fff; 7 | --accept-header-color: #61cc6a; 8 | 9 | /* methods colors */ 10 | --post-method-color: rgb(73, 204, 95); 11 | --post-method-background-color: rgba(73, 204, 95, .1); 12 | --get-method-color: rgb(97, 175, 254); 13 | --get-method-background-color: rgba(97, 175, 254, .1); 14 | --head-method-color: rgb(144, 18, 254); 15 | --head-method-background-color: rgba(144, 18, 254, .1); 16 | --put-method-color: rgb(252, 161, 48); 17 | --put-method-background-color: rgba(252, 161, 48, .1); 18 | --delete-method-color: rgb(249, 62, 62); 19 | --delete-method-background-color: rgba(249, 62, 62, .1); 20 | --options-method-color: rgb(25, 123, 220); 21 | --options-method-background-color: rgba(25, 123, 220, 0.1); 22 | --patch-method-color: rgb(80, 227, 194); 23 | --patch-method-background-color: rgba(80, 227, 194, .1); 24 | 25 | /* background */ 26 | --all-bg-color: #121212; 27 | --secondary-bg-color: #181818; 28 | --header-bg-color: #202020; 29 | --block-bg-color: #202020; 30 | --selecter-bg-color: #202020; 31 | 32 | /* text */ 33 | --primary-text-color: rgba(255, 255, 255, 1.00); 34 | --secondary-text-color: rgba(255, 255, 255, 0.40); 35 | 36 | /* border */ 37 | --block-border-color: rgba(255, 255, 255, 0.06); 38 | --block-border-radius: 8px; 39 | --innner-block-border-radius: 4px; 40 | 41 | /* icons */ 42 | --primary-icon-color: #ffffff; 43 | --icons-opacity: .32; 44 | --secondary-icon-opacity: .6; 45 | --black-icons-filter: invert(1); 46 | } -------------------------------------------------------------------------------- /SwaggerThemes/Themes/one-dark.css: -------------------------------------------------------------------------------- 1 | /* https://github.com/oqo0/swagger-themes */ 2 | 3 | :root { 4 | /* primary colors */ 5 | --swagger-color: #62a03f; 6 | --link-color: #2e82e5; 7 | --accept-header-color: #47b750; 8 | 9 | /* methods colors */ 10 | --post-method-color: rgb(141, 199, 111); 11 | --post-method-background-color: rgba(141, 199, 111, .08); 12 | --get-method-color: rgb(74, 176, 244); 13 | --get-method-background-color: rgba(74, 176, 244, .08); 14 | --head-method-color: rgb(217, 115, 234); 15 | --head-method-background-color: rgba(217, 115, 234, .08); 16 | --put-method-color: rgb(189, 135, 86); 17 | --put-method-background-color: rgba(189, 135, 86, .08); 18 | --delete-method-color: rgb(237, 99, 113); 19 | --delete-method-background-color: rgba(237, 99, 113, .08); 20 | --options-method-color: rgb(210, 175, 60); 21 | --options-method-background-color: rgba(210, 175, 60, .08); 22 | --patch-method-color: rgb(113, 128, 147); 23 | --patch-method-background-color: rgba(113, 128, 147, .08); 24 | 25 | /* background */ 26 | --all-bg-color: #272C35; 27 | --secondary-bg-color: #272C35; 28 | --header-bg-color: #313845; 29 | --block-bg-color: #20252C; 30 | --selecter-bg-color: #313845; 31 | 32 | /* text */ 33 | --primary-text-color: rgb(179, 187, 201); 34 | --secondary-text-color: rgba(177, 203, 255, 0.3); 35 | 36 | /* border */ 37 | --block-border-color: rgba(220, 220, 255, 0.1); 38 | --block-border-radius: 6px; 39 | --innner-block-border-radius: 2px; 40 | 41 | /* icons */ 42 | --primary-icon-color: rgb(179, 187, 201); 43 | --icons-opacity: .28; 44 | --secondary-icon-opacity: .5; 45 | --black-icons-filter: invert(1); 46 | } -------------------------------------------------------------------------------- /SwaggerThemes/Theme.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | 3 | namespace SwaggerThemes; 4 | 5 | public class Theme 6 | { 7 | private Theme(string fileName) 8 | { 9 | FileName = fileName; 10 | } 11 | 12 | public string FileName { get; private set; } 13 | 14 | internal string Text => GetEmbeddedResourceText(FileName); 15 | 16 | internal static Theme Base => new("_base.css"); 17 | 18 | public static Theme Dracula => new ("dracula.css"); 19 | 20 | public static Theme Gruvbox => new ("gruvbox.css"); 21 | 22 | public static Theme Monokai => new ("monokai.css"); 23 | 24 | public static Theme NordDark => new ("nord-dark.css"); 25 | 26 | public static Theme OneDark => new ("one-dark.css"); 27 | 28 | public static Theme UniversalDark => new ("universal-dark.css"); 29 | 30 | public static Theme Vs2022 => new("vs2022.css"); 31 | 32 | public static Theme XCodeLight => new ("x-code-light.css"); 33 | 34 | public static Theme Sepia => new ("sepia.css"); 35 | 36 | public override string ToString() 37 | { 38 | return FileName; 39 | } 40 | 41 | private static string GetEmbeddedResourceText(string embeddedResourcePath) 42 | { 43 | const string themesNamespace = "SwaggerThemes.Themes."; 44 | 45 | var currentAssembly = Assembly.GetExecutingAssembly(); 46 | var resource = string.Concat(themesNamespace, embeddedResourcePath); 47 | 48 | using var stream = currentAssembly.GetManifestResourceStream(resource) 49 | ?? throw new ArgumentException($"Can't find embedded resource: {embeddedResourcePath}"); 50 | 51 | using var reader = new StreamReader(stream); 52 | 53 | return reader.ReadToEnd(); 54 | } 55 | } -------------------------------------------------------------------------------- /SwaggerThemes/SwaggerTheme.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Builder; 2 | using Microsoft.AspNetCore.Http; 3 | using Swashbuckle.AspNetCore.SwaggerUI; 4 | using System.Text; 5 | 6 | namespace SwaggerThemes; 7 | 8 | public static class SwaggerTheme 9 | { 10 | /// 11 | /// Returns a CSS string for a specified Swagger theme. 12 | /// 13 | /// The theme to be applied. 14 | public static string GetSwaggerThemeCss(Theme theme) 15 | { 16 | var sb = new StringBuilder(); 17 | 18 | sb.Append(Theme.Base.Text); 19 | sb.Append('\n'); 20 | sb.Append(theme.Text); 21 | 22 | return sb.ToString(); 23 | } 24 | 25 | /// 26 | /// Configures the Swagger UI with custom themes. 27 | /// 28 | /// The web application to which the Swagger UI is added. 29 | /// The theme to be applied to the Swagger UI. 30 | /// Optional custom styles to be applied to the Swagger UI. 31 | /// Additional swagger setup options 32 | public static void UseSwaggerUI( 33 | this WebApplication app, Theme theme, string? customStyles = null, Action? setupAction = null) 34 | { 35 | string baseCssPath = "/themes/" + Theme.Base.FileName; 36 | string themeCssPath = "/themes/" + theme.FileName; 37 | string customCssPath = "/themes/" + "custom.css"; 38 | 39 | AddGetEndpoint(app, baseCssPath, Theme.Base.Text); 40 | AddGetEndpoint(app, themeCssPath, theme.Text); 41 | 42 | if (customStyles is not null) 43 | AddGetEndpoint(app, customCssPath, customStyles); 44 | 45 | app.UseSwaggerUI(options => 46 | { 47 | options.InjectStylesheet(baseCssPath); 48 | options.InjectStylesheet(themeCssPath); 49 | 50 | if (customStyles is not null) 51 | options.InjectStylesheet(customCssPath); 52 | 53 | setupAction?.Invoke(options); 54 | }); 55 | } 56 | 57 | private static void AddGetEndpoint(WebApplication app, string cssPath, string styleText) 58 | { 59 | app.MapGet(cssPath, (HttpContext context) => 60 | { 61 | context.Response.Headers["Cache-Control"] = "public, max-age=3600"; 62 | context.Response.Headers["Expires"] = DateTime.UtcNow.AddDays(2).ToString("R"); 63 | return Results.Content(styleText, "text/css"); 64 | }) 65 | .ExcludeFromDescription(); 66 | } 67 | } -------------------------------------------------------------------------------- /SwaggerThemes/SwaggerThemes.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | oqo0.SwaggerThemes 5 | 1.4.3 6 | oqo0,ds5678 7 | https://github.com/oqo0/swagger-themes 8 | https://github.com/oqo0/swagger-themes 9 | Swagger;Theme;Ui; 10 | 11 | Change Swagger documentation theme easily 12 | 13 | MIT 14 | net6.0;net8.0;net9.0 15 | enable 16 | enable 17 | true 18 | package-logo.png 19 | false 20 | 21 | 22 | 23 | true 24 | 25 | 26 | 27 | true 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 | Logo 3 | Swagger themes 4 |

5 | 6 | [![github publish workflow](https://github.com/oqo0/swagger-themes/actions/workflows/main.yml/badge.svg)](https://github.com/oqo0/swagger-themes/actions/workflows/main.yml) 7 | [![github issues](https://img.shields.io/github/issues/oqo0/swagger-themes?&color=E0AF18)]() 8 | [![github last commits](https://img.shields.io/github/last-commit/oqo0/swagger-themes)]() 9 | 10 | Change Swagger documentation theme easily. 11 | 12 | ## 💾 Install 13 | With NuGet CLI: 14 | ``` 15 | nuget install oqo0.SwaggerThemes 16 | ``` 17 | Using NuGet Package Manager: 18 | https://www.nuget.org/packages/oqo0.SwaggerThemes/ 19 | 20 | ## 📚 Usage 21 | Select any theme from [themes list](#-themes) and apply it using following ways: 22 | #### 📖 Using with Swashbuckle 23 | ```csharp 24 | app.UseSwagger(); 25 | app.UseSwaggerUI(Theme.UniversalDark); 26 | ``` 27 | 28 | #### 📖 Using with NSwag 29 | ```csharp 30 | app.UseOpenApi(); 31 | app.UseSwaggerUi(options => 32 | { 33 | options.CustomInlineStyles = SwaggerTheme.GetSwaggerThemeCss(Theme.UniversalDark); 34 | }); 35 | ``` 36 | 37 | #### 🔧 Adding custom CSS 38 | ```csharp 39 | string customCss = "body {" + 40 | " background-color: red;" + 41 | "}"; 42 | 43 | app.UseSwaggerUI(Theme.UniversalDark, customCss ); 44 | ``` 45 | 46 | ## 🎨 Themes 47 | 48 | 49 | 50 | 51 | 62 | 63 | 74 | 75 | 76 | 77 | 88 | 89 | 100 | 101 | 102 | 103 | 114 | 115 | 126 | 127 | 128 | 129 | 140 | 151 | 152 | 153 |
52 | 53 |

Dracula

54 | 55 | ![alt text](assets/dracula.png) 56 | 57 | ```csharp 58 | Theme.Dracula 59 | ``` 60 | 61 |
64 | 65 |

Gruvbox

66 | 67 | ![alt text](assets/gruvbox.png) 68 | 69 | ```csharp 70 | Theme.Gruvbox 71 | ``` 72 | 73 |
78 | 79 |

Monokai

80 | 81 | ![alt text](assets/monokai.png) 82 | 83 | ```csharp 84 | Theme.Monokai 85 | ``` 86 | 87 |
90 | 91 |

Nord Dark

92 | 93 | ![alt text](assets/nord-dark.png) 94 | 95 | ```csharp 96 | Theme.NordDark 97 | ``` 98 | 99 |
104 | 105 |

One Dark

106 | 107 | ![alt text](assets/one-dark.png) 108 | 109 | ```csharp 110 | Theme.OneDark 111 | ``` 112 | 113 |
116 | 117 |

Universal Dark

118 | 119 | ![alt text](assets/universal-dark.png) 120 | 121 | ```csharp 122 | Theme.UniversalDark 123 | ``` 124 | 125 |
130 | 131 |

X-Code Light

132 | 133 | ![alt text](assets/x-code-light.png) 134 | 135 | ```csharp 136 | Theme.XCodeLight 137 | ``` 138 | 139 |
141 | 142 |

Sepia

143 | 144 | ![alt text](assets/sepia.png) 145 | 146 | ```csharp 147 | Theme.Sepia 148 | ``` 149 | 150 |
154 | 155 | ## 💡 Creating your own themes 156 | 157 | 1. Create theme `.css` in `Themes` directory. 158 | 2. Add a placeholder for filename in `Theme.cs`: 159 | ```csharp 160 | public static Theme YourTheme => new("your-theme.css"); 161 | ``` 162 | 3. Add an embedded resource for your `.css` file: 163 | ```xml 164 | ... 165 | 166 | 167 | ``` 168 | 4. Use any other complete theme as a template. 169 | 5. Build project: 170 | ``` 171 | dotnet build -c Release 172 | ``` 173 | 6. Package `.nupkg` file is going to appear in `./bin/Release` -------------------------------------------------------------------------------- /SwaggerThemes/Themes/_base.css: -------------------------------------------------------------------------------- 1 | @media (prefers-color-scheme: dark) { 2 | 3 | /* primary colors */ 4 | 5 | .swagger-ui .topbar .download-url-wrapper .select-label select { 6 | border: 2px solid var(--swagger-color); 7 | } 8 | 9 | .swagger-ui .info .title small.version-stamp { 10 | background-color: var(--swagger-color); 11 | } 12 | 13 | .swagger-ui .info a { 14 | color: var(--link-color); 15 | } 16 | 17 | .swagger-ui .response-control-media-type--accept-controller select { 18 | border-color: var(--accept-header-color); 19 | } 20 | 21 | .swagger-ui .response-control-media-type__accept-message { 22 | color: var(--accept-header-color); 23 | } 24 | 25 | .swagger-ui .btn.authorize { 26 | color: var(--post-method-color); 27 | } 28 | 29 | .swagger-ui .btn.authorize { 30 | border-color: var(--post-method-color); 31 | } 32 | 33 | .swagger-ui .btn.authorize svg { 34 | fill: var(--post-method-color); 35 | } 36 | 37 | /* methods colors */ 38 | /* http post */ 39 | 40 | .swagger-ui .opblock.opblock-post .opblock-summary-method { 41 | background: var(--post-method-color); 42 | } 43 | 44 | .swagger-ui .opblock.opblock-post .opblock-summary { 45 | border-color: var(--post-method-color); 46 | } 47 | 48 | .swagger-ui .opblock.opblock-post { 49 | background: var(--post-method-background-color); 50 | border-color: var(--post-method-color); 51 | } 52 | 53 | .swagger-ui .opblock.opblock-post .tab-header .tab-item.active h4 span::after { 54 | background: var(--post-method-color); 55 | } 56 | 57 | /* http get */ 58 | 59 | .swagger-ui .opblock.opblock-get .opblock-summary-method { 60 | background: var(--get-method-color); 61 | } 62 | 63 | .swagger-ui .opblock.opblock-get .opblock-summary { 64 | border-color: var(--get-method-color); 65 | } 66 | 67 | .swagger-ui .opblock.opblock-get { 68 | background: var(--get-method-background-color); 69 | border-color: var(--get-method-color); 70 | } 71 | 72 | .swagger-ui .opblock.opblock-get .tab-header .tab-item.active h4 span::after { 73 | background: var(--get-method-color); 74 | } 75 | 76 | /* http head */ 77 | 78 | .swagger-ui .opblock.opblock-head .opblock-summary-method { 79 | background: var(--head-method-color); 80 | } 81 | 82 | .swagger-ui .opblock.opblock-head .opblock-summary { 83 | border-color: var(--head-method-color); 84 | } 85 | 86 | .swagger-ui .opblock.opblock-head { 87 | background: var(--head-method-background-color); 88 | border-color: var(--head-method-color); 89 | } 90 | 91 | .swagger-ui .opblock.opblock-head .tab-header .tab-item.active h4 span::after { 92 | background: var(--head-method-color); 93 | } 94 | 95 | /* http put */ 96 | 97 | .swagger-ui .opblock.opblock-put .opblock-summary-method { 98 | background: var(--put-method-color); 99 | } 100 | 101 | .swagger-ui .opblock.opblock-put .opblock-summary { 102 | border-color: var(--put-method-color); 103 | } 104 | 105 | .swagger-ui .opblock.opblock-put { 106 | background: var(--put-method-background-color); 107 | border-color: var(--put-method-color); 108 | } 109 | 110 | .swagger-ui .opblock.opblock-put .tab-header .tab-item.active h4 span::after { 111 | background: var(--put-method-color); 112 | } 113 | 114 | /* http delete */ 115 | 116 | .swagger-ui .opblock.opblock-delete .opblock-summary-method { 117 | background: var(--delete-method-color); 118 | } 119 | 120 | .swagger-ui .opblock.opblock-delete .opblock-summary { 121 | border-color: var(--delete-method-color); 122 | } 123 | 124 | .swagger-ui .opblock.opblock-delete { 125 | background: var(--delete-method-background-color); 126 | border-color: var(--delete-method-color); 127 | } 128 | 129 | .swagger-ui .opblock.opblock-delete .tab-header .tab-item.active h4 span::after { 130 | background: var(--delete-method-color); 131 | } 132 | 133 | /* http options */ 134 | 135 | .swagger-ui .opblock.opblock-options .opblock-summary-method { 136 | background: var(--options-method-color); 137 | } 138 | 139 | .swagger-ui .opblock.opblock-options .opblock-summary { 140 | border-color: var(--options-method-color); 141 | } 142 | 143 | .swagger-ui .opblock.opblock-options { 144 | background: var(--options-method-background-color); 145 | border-color: var(--options-method-color); 146 | } 147 | 148 | .swagger-ui .opblock.opblock-options .tab-header .tab-item.active h4 span::after { 149 | background: var(--options-method-color); 150 | } 151 | 152 | /* http patch */ 153 | 154 | .swagger-ui .opblock.opblock-patch .opblock-summary-method { 155 | background: var(--patch-method-color); 156 | } 157 | 158 | .swagger-ui .opblock.opblock-patchs .opblock-summary { 159 | border-color: var(--patch-method-color); 160 | } 161 | 162 | .swagger-ui .opblock.opblock-patch { 163 | background: var(--patch-method-background-color); 164 | border-color: var(--patch-method-color); 165 | } 166 | 167 | .swagger-ui .opblock.opblock-patch .tab-header .tab-item.active h4 span::after { 168 | background: var(--patch-method-color); 169 | } 170 | 171 | /* blocks */ 172 | body { 173 | background-color: var(--all-bg-color); 174 | color: white; 175 | } 176 | 177 | .swagger-ui .topbar { 178 | background-color: var(--header-bg-color); 179 | } 180 | 181 | .swagger-ui .scheme-container { 182 | background: var(--secondary-bg-color); 183 | } 184 | 185 | .swagger-ui section.models .model-container { 186 | background: var(--secondary-bg-color); 187 | border-radius: var(--innner-block-border-radius); 188 | } 189 | 190 | .swagger-ui select { 191 | background: var(--selecter-bg-color); 192 | border-radius: var(--block-border-radius); 193 | color: var(--primary-text-color); 194 | } 195 | 196 | .swagger-ui section.models { 197 | border: 1px solid var(--block-border-color); 198 | background-color: var(--block-bg-color); 199 | } 200 | 201 | .swagger-ui .opblock .opblock-section-header { 202 | background: var(--secondary-bg-color); 203 | } 204 | 205 | .swagger-ui .body-param__example { 206 | background-color: var(--secondary-bg-color) !important; 207 | border-radius: var(--block-border-radius) !important; 208 | } 209 | 210 | .swagger-ui .example { 211 | background-color: var(--secondary-bg-color) !important; 212 | border-radius: var(--block-border-radius) !important; 213 | } 214 | 215 | .swagger-ui .copy-to-clipboard { 216 | background: rgba(255, 255, 255, var(--icons-opacity)); 217 | border-radius: var(--block-border-radius); 218 | } 219 | 220 | .swagger-ui .opblock .opblock-summary-method { 221 | border-radius: var(--innner-block-border-radius); 222 | } 223 | 224 | .swagger-ui input[type="email"], 225 | .swagger-ui input[type="file"], 226 | .swagger-ui input[type="password"], 227 | .swagger-ui input[type="search"], 228 | .swagger-ui input[type="text"], 229 | .swagger-ui textarea { 230 | background: var(--secondary-bg-color); 231 | border: 1px solid var(--block-border-color); 232 | border-radius: var(--block-border-radius); 233 | color: var(--primary-text-color); 234 | outline: none; 235 | } 236 | 237 | .swagger-ui .dialog-ux .modal-ux-header { 238 | border-bottom: 1px solid var(--block-border-color); 239 | } 240 | 241 | .swagger-ui .btn { 242 | border: 2px solid var(--block-border-color); 243 | border-radius: var(--block-border-radius); 244 | color: var(--primary-text-color); 245 | } 246 | 247 | .swagger-ui .dialog-ux .modal-ux { 248 | background: var(--block-bg-color); 249 | border: 1px solid var(--block-border-color); 250 | border-radius: var(--block-border-radius); 251 | } 252 | 253 | .swagger-ui .auth-btn-wrapper { 254 | justify-content: left; 255 | } 256 | 257 | .swagger-ui .opblock-tag { 258 | border-bottom: 1px solid var(--block-border-color); 259 | } 260 | 261 | .swagger-ui section.models.is-open h4 { 262 | border-bottom: 1px solid var(--block-border-color); 263 | } 264 | 265 | .swagger-ui .opblock { 266 | border-radius: var(--block-border-radius); 267 | } 268 | 269 | .swagger-ui section.models { 270 | border-radius: var(--block-border-radius); 271 | } 272 | 273 | /* button white outline fix */ 274 | 275 | .swagger-ui .model-box-control:focus, 276 | .swagger-ui .models-control:focus, 277 | .swagger-ui .opblock-summary-control:focus { 278 | outline: none; 279 | } 280 | 281 | /* icons */ 282 | 283 | .swagger-ui .model-toggle::after { 284 | opacity: var(--icons-opacity); 285 | filter: var(--black-icons-filter); 286 | } 287 | 288 | .swagger-ui svg:not(:root) { 289 | fill: var(--primary-icon-color); 290 | } 291 | 292 | .swagger-ui .opblock-summary-control svg:not(:root) { 293 | opacity: var(--secondary-icon-opacity); 294 | } 295 | 296 | /* text */ 297 | 298 | .swagger-ui { 299 | color: var(--primary-text-color); 300 | } 301 | 302 | .swagger-ui .info .title { 303 | color: var(--primary-text-color); 304 | } 305 | 306 | .swagger-ui a.nostyle { 307 | color: var(--primary-text-color); 308 | } 309 | 310 | .swagger-ui .model-title { 311 | color: var(--primary-text-color); 312 | } 313 | 314 | .swagger-ui .models-control { 315 | color: var(--primary-text-color); 316 | } 317 | 318 | .swagger-ui .dialog-ux .modal-ux-header h3 { 319 | color: var(--primary-text-color); 320 | } 321 | 322 | .swagger-ui .dialog-ux .modal-ux-content h4 { 323 | color: var(--primary-text-color); 324 | } 325 | 326 | .swagger-ui .dialog-ux .modal-ux-content p { 327 | color: var(--secondary-text-color); 328 | } 329 | 330 | .swagger-ui ol { 331 | color: var(--primary-text-color); 332 | } 333 | 334 | .swagger-ui h3 { 335 | color: var(--primary-text-color) !important; 336 | } 337 | 338 | .swagger-ui h4 { 339 | color: var(--primary-text-color) !important; 340 | } 341 | 342 | .swagger-ui h5 { 343 | color: var(--secondary-text-color) !important; 344 | } 345 | 346 | .swagger-ui label { 347 | color: var(--primary-text-color); 348 | } 349 | 350 | .swagger-ui .opblock .opblock-section-header h4 { 351 | color: var(--primary-text-color); 352 | } 353 | 354 | .swagger-ui .tab li button.tablinks { 355 | color: var(--primary-text-color); 356 | } 357 | 358 | .swagger-ui .opblock-description-wrapper p, 359 | .swagger-ui .opblock-external-docs-wrapper p, 360 | .swagger-ui .opblock-title_normal p { 361 | color: var(--primary-text-color); 362 | } 363 | 364 | .opblock-summary-description { 365 | color: var(--secondary-text-color) !important; 366 | } 367 | 368 | .swagger-ui table thead tr td, .swagger-ui table thead tr th { 369 | border-bottom: 1px solid var(--block-border-color); 370 | color: var(--primary-text-color); 371 | } 372 | 373 | .swagger-ui .response-col_status { 374 | color: var(--primary-text-color); 375 | } 376 | 377 | .swagger-ui .response-col_links { 378 | color: var(--secondary-text-color); 379 | } 380 | 381 | .swagger-ui .parameter__name { 382 | color: var(--primary-text-color); 383 | } 384 | 385 | .swagger-ui .parameter__type { 386 | color: var(--secondary-text-color); 387 | } 388 | 389 | .swagger-ui .prop-format { 390 | color: var(--secondary-text-color); 391 | } 392 | 393 | .swagger-ui .info li, 394 | .swagger-ui .info p, 395 | .swagger-ui .info table { 396 | color: var(--secondary-text-color); 397 | } 398 | 399 | .swagger-ui .model { 400 | color: var(--secondary-text-color); 401 | } 402 | } --------------------------------------------------------------------------------