Fudie.OpenApi 1.0.12

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

Fudie.OpenApi

Auto-discovers OpenAPI YAML contracts from the file system and configures SwaggerUI with development-mode serving and no-cache headers.

Quick Start

app.UseFudieOpenApi();

Scans the OpenApi/ folder for *.yaml files and registers them in Swagger UI. Only active in Development environment.

Configuration

All settings are optional. Add them under Fudie:OpenApi in appsettings.json:

{
    "Fudie": {
        "OpenApi": {
            "Folder": "OpenApi",
            "RequestPath": "OpenApi",
            "RoutePrefix": "swagger"
        }
    }
}
Setting Default Description
Folder "OpenApi" Physical directory where YAML files are located
RequestPath same as Folder URL path where YAML files are served
RoutePrefix "swagger" URL path where Swagger UI is available

Usage behind an API Gateway

When a microservice runs behind a reverse proxy (e.g., YARP) that routes by path prefix, the URLs need to include the service prefix so the gateway can forward the requests correctly.

Example: a Plans service routed through the gateway via /plans/{**catch-all}.

{
    "Fudie": {
        "OpenApi": {
            "RequestPath": "plans/OpenApi",
            "RoutePrefix": "plans/swagger"
        }
    }
}

This produces:

What URL
Swagger UI /plans/swagger/index.html
YAML contracts /plans/OpenApi/plan-api.yaml
Root redirect //plans/swagger

The physical files stay in OpenApi/ (the default Folder). No need to move or rename anything.

Why it works in all environments

  • Local development (http://localhost:7003): the files are in ContentRootPath/OpenApi/, Swagger UI and YAML are served at the prefixed URLs. Everything resolves locally.
  • Docker via gateway (http://gateway:5176): the gateway matches /plans/{**catch-all} and forwards to the Plans service. The service responds with Swagger UI and YAML at the same prefixed URLs.

By default, SwaggerUI is configured to send cookies with every request (credentials: 'include'). This ensures cookie-based authentication works seamlessly during development.

To disable this behavior:

app.UseFudieOpenApi(withCredentials: false);

Dependencies

  • Swashbuckle.AspNetCore (>= 6.4.0)
  • Microsoft.AspNetCore.App (framework reference)
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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.  net9.0 was computed.  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 (1)

Showing the top 1 NuGet packages that depend on Fudie.OpenApi:

Package Downloads
Fudie

Fudie framework — all packages in one reference. Install this to get the full framework.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.12 133 3/8/2026
1.0.11 118 3/7/2026
1.0.10 122 3/5/2026
1.0.9 120 3/5/2026
1.0.8 120 3/5/2026
1.0.7 121 3/4/2026
1.0.6 112 3/4/2026
1.0.5 115 3/4/2026
1.0.4 124 3/3/2026
1.0.3 127 3/3/2026
1.0.2 119 3/3/2026
1.0.1 125 3/2/2026
1.0.0 119 3/2/2026