ForgeTrust.AppSurface.Web.OpenApi 0.1.0-rc.1

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

ForgeTrust.AppSurface.Web.OpenApi

This package provides a modular integration for OpenAPI (Swagger) document generation in AppSurface web applications.

Overview

The AppSurfaceWebOpenApiModule simplifies the configuration of OpenAPI by:

  • Registering the necessary services via AddOpenApi.
  • Configuring the EndpointsApiExplorer.
  • Mapping the OpenAPI documentation endpoint when endpoint exposure options allow it.
  • Providing default document and operation transformers to clean up and brand the generated documentation based on the StartupContext.

Release Guidance

AppSurface has cut the first coordinated v0.1.0 release candidate. Before installing this package from a prerelease feed, read the v0.1.0 RC 1 release note for current release risk, migration guidance, and package readiness.

Usage

To enable OpenAPI support in your application, add the AppSurfaceWebOpenApiModule as a dependency in your root module:

public class MyModule : IAppSurfaceWebModule
{
    public void RegisterDependentModules(ModuleDependencyBuilder builder)
    {
        builder.AddModule<AppSurfaceWebOpenApiModule>();
    }
    
    // ...
}

Features

  • Document Transformation: Automatically updates the API title and tags based on the application name defined in the StartupContext.
  • Controlled Endpoint Mapping: Calls endpoints.MapOpenApi() during endpoint configuration only when AppSurfaceWebOpenApiOptions.ExposeEndpoint allows the active environment.
  • Production-Safe Default: Maps /openapi/{documentName}.json in Development and hides it in non-development environments unless the host opts in.

Endpoint Exposure

AppSurfaceWebOpenApiOptions binds from the AppSurfaceWebOpenApi configuration section.

{
  "AppSurfaceWebOpenApi": {
    "ExposeEndpoint": "DevelopmentOnly"
  }
}

ExposeEndpoint uses AppSurfaceApiDocumentationEndpointExposure:

  • DevelopmentOnly (0): maps the OpenAPI endpoint only when StartupContext.IsDevelopment is true. This is the default.
  • Always (1): maps the endpoint in every environment.
  • Never (2): never maps the endpoint, including in Development.

Use Always only when the host intentionally exposes API metadata and protects it with host-owned controls such as authorization, private networking, or a reverse proxy policy. AppSurface only decides whether to map the endpoint; it does not add authentication or authorization.

Code-first configuration is also supported:

services.Configure<AppSurfaceWebOpenApiOptions>(options =>
{
    options.ExposeEndpoint = AppSurfaceApiDocumentationEndpointExposure.Always;
});

Invalid enum values fail options validation at startup when the options are read.


📂 Back to Web List | 🏠 Back to Root

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.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on ForgeTrust.AppSurface.Web.OpenApi:

Package Downloads
ForgeTrust.AppSurface.Web.Scalar

ForgeTrust.AppSurface.Web.Scalar package for AppSurface application composition.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0-rc.1 27 5/31/2026
0.1.0-preview.4 58 5/25/2026
0.1.0-preview.3 55 5/20/2026
0.1.0-preview.2 59 5/14/2026