MbSoftLab.SwaggerUiHeaderBuilder 0.0.9-preview

This is a prerelease version of MbSoftLab.SwaggerUiHeaderBuilder.
There is a newer version of this package available.
See the version list below for details.
dotnet add package MbSoftLab.SwaggerUiHeaderBuilder --version 0.0.9-preview                
NuGet\Install-Package MbSoftLab.SwaggerUiHeaderBuilder -Version 0.0.9-preview                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="MbSoftLab.SwaggerUiHeaderBuilder" Version="0.0.9-preview" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MbSoftLab.SwaggerUiHeaderBuilder --version 0.0.9-preview                
#r "nuget: MbSoftLab.SwaggerUiHeaderBuilder, 0.0.9-preview"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install MbSoftLab.SwaggerUiHeaderBuilder as a Cake Addin
#addin nuget:?package=MbSoftLab.SwaggerUiHeaderBuilder&version=0.0.9-preview&prerelease

// Install MbSoftLab.SwaggerUiHeaderBuilder as a Cake Tool
#tool nuget:?package=MbSoftLab.SwaggerUiHeaderBuilder&version=0.0.9-preview&prerelease                

MbSoftLab.SwaggerUiHeaderBuilder

BuildFromDevelop

Der SwaggerUiHeaderBuilder erstellt einen Spezial-Header für das Swagger Ui

    public class SwaggerUiHeaderBuilder
    { 
		ISwaggerUiHeaderBuilder AddCustomLink(string caption, Uri href);
		ISwaggerUiHeaderBuilder UseConfig(ISwaggerUiCustomHeaderConfig value);
		ISwaggerUiHeaderBuilder ForHeaderBgColor(string value);
		ISwaggerUiHeaderBuilder ForHeaderFontColor(string value);
		ISwaggerUiHeaderBuilder ForHoverBgColor(string value);
		ISwaggerUiHeaderBuilder ForHoverFontColor(string value);
		ISwaggerUiHeaderBuilder ForImageSrc(string value);
		ISwaggerUiHeaderBuilder ForTitel(string value);
		ISwaggerUiHeaderBuilder ForVersion(string value);
		string Build();
    }

Beispiele:

Beispiel 1

            app.UseSwaggerUI(c =>
                {
                    c.SwaggerEndpoint("/swagger/v1/swagger.json", "MyApi V1");

                    c.UseCustomHeader(header => header
                                          .ForTitel("MyTestTitel")
                                          .ForVersion("v1.0.0.1")
                                          .AddCustomLink("MyCustomLink1", new Uri("https://myCutom1.url"))
                                          .AddCustomLink("MyCustomLink2", new Uri("https://myCutom2.url"))
                                          .ForHeaderBgColor("#fff9f3")
                                          .ForHoverBgColor("#d66b00")
                                          .ForHeaderFontColor("black"));

                });
            }

Beispiel 2

           app.UseSwaggerUI(c =>
            {
                c.SwaggerEndpoint("/swagger/v1/swagger.json", "MyApi V1");
         
                c.HeadContent = new SwaggerUiHeaderBuilder()
                               .ForTitel("MyTestTitel")
                               .ForVersion("v1.0.0.1")
                               .AddCustomLink("MyCustomLink1", new System.Uri("https://myCutom1.url"))
                               .AddCustomLink("MyCustomLink2", new System.Uri("https://myCutom2.url"))
                               .ForHeaderBgColor("#fff9f3")
                               .ForHoverBgColor("#d66b00")
                               .ForHeaderFontColor("black")
                               .Build();
               
            });

Beispiel 3

           app.UseSwaggerUI(c =>
            {
                c.SwaggerEndpoint("/swagger/v1/swagger.json", "MyApi V1");
         
                //Example 3
                c.UseCustomHeader(header => header
                                          .UseConfig(_swaggerUiCustomHeaderConfig)
                                          .AddCustomLink("MyCustomLink1", new Uri("https://myCutom1.url"))
                                          .AddCustomLink("MyCustomLink2", new Uri("https://myCutom2.url")));
               
            });

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp3.1 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.0.9 447 5/6/2021
0.0.9-preview2 431 12/25/2020
0.0.9-preview 290 12/13/2020
0.0.9-beta 350 12/6/2020
0.0.8 527 11/8/2020