ForgeTrust.AppSurface.Web.OpenApi
0.1.0
See the version list below for details.
dotnet add package ForgeTrust.AppSurface.Web.OpenApi --version 0.1.0
NuGet\Install-Package ForgeTrust.AppSurface.Web.OpenApi -Version 0.1.0
<PackageReference Include="ForgeTrust.AppSurface.Web.OpenApi" Version="0.1.0" />
<PackageVersion Include="ForgeTrust.AppSurface.Web.OpenApi" Version="0.1.0" />
<PackageReference Include="ForgeTrust.AppSurface.Web.OpenApi" />
paket add ForgeTrust.AppSurface.Web.OpenApi --version 0.1.0
#r "nuget: ForgeTrust.AppSurface.Web.OpenApi, 0.1.0"
#:package ForgeTrust.AppSurface.Web.OpenApi@0.1.0
#addin nuget:?package=ForgeTrust.AppSurface.Web.OpenApi&version=0.1.0
#tool nuget:?package=ForgeTrust.AppSurface.Web.OpenApi&version=0.1.0
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 publishes the coordinated v0.1.0 release as one package-facing story. Before installing this package from a package feed, read the v0.1.0 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 whenAppSurfaceWebOpenApiOptions.ExposeEndpointallows the active environment. - Production-Safe Default: Maps
/openapi/{documentName}.jsonin 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 whenStartupContext.IsDevelopmentistrue. 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.
| Product | Versions 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. |
-
net10.0
- CliWrap (>= 3.10.1)
- ForgeTrust.AppSurface.Web (>= 0.1.0)
- Microsoft.AspNetCore.OpenApi (>= 10.0.8)
- Microsoft.Extensions.Hosting (>= 10.0.8)
- Microsoft.Extensions.Logging.Console (>= 10.0.8)
- Microsoft.Extensions.Options (>= 10.0.8)
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.2.0-preview.4 | 39 | 7/18/2026 |
| 0.2.0-preview.2 | 53 | 7/3/2026 |
| 0.2.0-preview.1 | 56 | 6/28/2026 |
| 0.1.0 | 114 | 7/2/2026 |
| 0.1.0-rc.4 | 72 | 6/16/2026 |
| 0.1.0-rc.3 | 68 | 6/8/2026 |
| 0.1.0-rc.2 | 63 | 6/3/2026 |
| 0.1.0-rc.1 | 66 | 5/31/2026 |
| 0.1.0-preview.4 | 72 | 5/25/2026 |
| 0.1.0-preview.3 | 70 | 5/20/2026 |
| 0.1.0-preview.2 | 69 | 5/14/2026 |