BlazorOpenApi 0.9.8

dotnet add package BlazorOpenApi --version 0.9.8
                    
NuGet\Install-Package BlazorOpenApi -Version 0.9.8
                    
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="BlazorOpenApi" Version="0.9.8" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="BlazorOpenApi" Version="0.9.8" />
                    
Directory.Packages.props
<PackageReference Include="BlazorOpenApi" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add BlazorOpenApi --version 0.9.8
                    
#r "nuget: BlazorOpenApi, 0.9.8"
                    
#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.
#:package BlazorOpenApi@0.9.8
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=BlazorOpenApi&version=0.9.8
                    
Install as a Cake Addin
#tool nuget:?package=BlazorOpenApi&version=0.9.8
                    
Install as a Cake Tool

Blazor OpenAPI UI

Author: unclshura

This is a Blazor implementation of a SwaggerUI-like interface. It allows you to view your OpenAPI specifications in a user-friendly way. The motication of this project is to provide a Blazor component that can be used in Blazor applications to display OpenAPI specifications. Unlike SwaggerUI, this project does not require any JavaScript dependencies. It is a pure Blazor implementation.

Screenshots

Light theme:

Light mode

Dark Theme:

Dark mode

Examples generation:

Examples generation

Installation

You can install the package from NuGet:

dotnet add package BlazorOpenApi

Source code

What Where
Github https://github.com/unclshura/BlazorOpenApi
HTTPS https://github.com/unclshura/BlazorOpenApi.git
SSH git@github.com:unclshura/BlazorOpenApi.git
NuGet https://www.nuget.org/packages/BlazorOpenApi/

Features

  • View OpenAPI specifications in a user-friendly way
  • Dark and light themes
  • Fully customizable color palette
  • Separate CSS styles for every element
  • Examples generation
  • Pure Blazor implementation

Usage

To use the component, add the following line to your _Imports.razor file:

@using BlazorOpenApi
@using BlazorOpenApi.Controls

Then, you can use the component in your Blazor application:

<OpenAPIUIControl Url="https://raw.githubusercontent.com/OAI/OpenAPI-Specification/main/examples/v3.0/petstore.yaml" />

To customize the palette you can use something like this:

<OpenAPIUIControl Url="@Url" Palette="@TestPalette"/>

@code {
    [Parameter]
    [SupplyParameterFromQuery(Name = "url")]
    public string Url { get; set; } = "https://raw.githubusercontent.com/OAI/OpenAPI-Specification/main/examples/v3.0/petstore.json";

    private OpenApiUiPalette TestPalette
    {
        get
        {
            var p = new OpenApiUiPalette().Clone();
            p.Foreground[7] = "blue";

            return p;
        }
    }
}

The demo application is available in the Demo folder - https://github.com/unclshura/BlazorOpenApi/tree/master/Demo.

LICENSE

MIT

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
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.9.8 163 5/25/2025
0.9.7 156 5/25/2025
0.9.6 151 5/5/2025
0.0.5 136 4/27/2025
0.0.3 139 4/27/2025