HubDocs 0.0.9

dotnet add package HubDocs --version 0.0.9
                    
NuGet\Install-Package HubDocs -Version 0.0.9
                    
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="HubDocs" Version="0.0.9" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="HubDocs" Version="0.0.9" />
                    
Directory.Packages.props
<PackageReference Include="HubDocs" />
                    
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 HubDocs --version 0.0.9
                    
#r "nuget: HubDocs, 0.0.9"
                    
#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 HubDocs@0.0.9
                    
#: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=HubDocs&version=0.0.9
                    
Install as a Cake Addin
#tool nuget:?package=HubDocs&version=0.0.9
                    
Install as a Cake Tool

HubDocs

A Swagger-like UI for exploring and documenting SignalR hubs in ASP.NET Core applications.

Features

  • 🔍 Automatic discovery of SignalR hubs and strongly-typed client interfaces
  • 📝 Method documentation with parameters and return types
  • 🎨 Beautiful Swagger-inspired dark theme UI
  • 🔌 Easy integration with minimal configuration
  • 📡 Live view of client method invocations from server (via strongly-typed interfaces)

🎥 Live Demo

HubDocs Demo

The HubDocs UI in action — exploring hubs, invoking methods, and seeing real-time client logs.


🖼️ Screenshots

<p align="center"> <img src="https://raw.githubusercontent.com/mberrishdev/HubDocs/main/docs/screenshots/screenshot1.png" alt="HubDocs Screenshot 1" width="800"/> <br/><em>📌 SignalR Hub list</em> </p>

<p align="center"> <img src="https://raw.githubusercontent.com/mberrishdev/HubDocs/main/docs/screenshots/screenshot2.png" alt="HubDocs Screenshot 2" width="800"/> <br/><em>🔍 Interactive method parameter inputs with "Try it" support</em> </p>

<p align="center"> <img src="https://raw.githubusercontent.com/mberrishdev/HubDocs/main/docs/screenshots/screenshot4.png" alt="HubDocs Screenshot 4" width="800"/> <br/><em>📡 Live client method logging with JSON preview</em> </p>

<p align="center"> <img src="https://raw.githubusercontent.com/mberrishdev/HubDocs/main/docs/screenshots/screenshot3.png" alt="HubDocs Screenshot 3" width="800"/> <br/><em>📭 No methods found — HubDocs will show helpful instructions if a hub is registered without a route.</em> </p>

Installation

dotnet add package HubDocs

Quick Start

  1. Mark your SignalR hubs with the [HubDocs] attribute:
using HubDocs;

[HubDocs]
public class ChatHub : Hub<IChatClient>
{
    // ... your hub methods
}
  1. Register your hubs and add HubDocs in your ASP.NET Core application:
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddSignalR();

var app = builder.Build();

// Register your SignalR hubs
app.MapHub<ChatHub>("/hubs/chat");

// Add HubDocs - discovers hubs with [HubDocs] attribute
app.AddHubDocs();

app.Run();
  1. Access the HubDocs UI at /hubdocs/index.html or /hubdocs/ in your browser.

Example

public interface IChatClient
{
    Task ReceiveMessage(string user, string message);
    Task Connected(string connectionId);
}

[HubDocs]  // Mark for documentation
public class ChatHub : Hub<IChatClient>
{
    public async Task SendMessage(string user, string message)
    {
        await Clients.All.ReceiveMessage(user, message);
    }

    public override async Task OnConnectedAsync()
    {
        await Clients.Caller.Connected(Context.ConnectionId);
    }
}

Note: To fully leverage HubDocs, your hubs should implement Hub<T> with a strongly-typed client interface (T) that defines the client-callable methods. HubDocs will automatically extract and render both hub and client method metadata in the UI.

HubDocs will automatically discover and display:

  • Hub name and full type name
  • Route where the hub is registered
  • All public methods with parameters and return types
  • Client methods from strongly-typed interface
  • Interactive UI for exploring the hub

Configuration

Basic Configuration

// Register hubs with MapHub
app.MapHub<ChatHub>("/hubs/chat");

// Add HubDocs
app.AddHubDocs();

Custom Assemblies

Scan specific assemblies for hubs:

app.AddHubDocs(typeof(ExternalHub).Assembly);

Document Metadata Options

You can configure project metadata (Swagger-like info) for HubDocs JSON and UI:

app.AddHubDocs(options =>
{
  options.Title = "My SignalR API";
  options.Version = "1.0.0";
  options.Description = "Realtime messaging API docs.";
  options.ProjectUrl = "https://example.com/project";
  options.TermsOfService = "https://example.com/terms";

  options.Contact.Name = "API Support";
  options.Contact.Email = "support@example.com";
  options.Contact.Url = "https://example.com/support";

  options.License.Name = "MIT";
  options.License.Url = "https://example.com/license";
});

You can also combine metadata options with explicit assemblies:

app.AddHubDocs(options =>
{
  options.Title = "External Hubs API";
  options.Version = "2.0.0";
}, typeof(ExternalHub).Assembly);

Opt-in with Attribute

Only hubs marked with [HubDocs] attribute are documented. This provides control over which hubs appear in the UI.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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.
  • net10.0

    • No dependencies.

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 81 4/19/2026
0.0.8 86 4/16/2026
0.0.7 78 4/16/2026
0.0.6 1,486 11/17/2025
0.0.5 426 6/21/2025
0.0.4 346 6/9/2025
0.0.3 297 6/9/2025
0.0.2 198 6/6/2025
0.0.2-alpha 181 6/6/2025
0.0.1 189 6/6/2025