AppSurfaceApiDocumentationEndpointExposure ExposeEndpoint { get; set; }
Source
Gets or sets when the Scalar API reference endpoint should be mapped.
A web module that integrates Scalar API reference documentation into the application.
The Scalar UI is available in development by default and hidden in non-development environments unless both Scalar and the AppSurface-owned OpenAPI document are explicitly exposed. Exposing Scalar does not add authentication or authorization; production hosts must protect the route separately when it is reachable by untrusted users.
void ConfigureServices(StartupContext context, IServiceCollection services)
Source
Configures services needed for Scalar, including endpoint exposure options.
contextThe startup context.servicesThe service collection.void RegisterDependentModules(ModuleDependencyBuilder builder)
Source
Registers dependencies for this module, specifically AppSurfaceWebOpenApiModule.
builderThe module dependency builder.void ConfigureEndpoints(StartupContext context, IEndpointRouteBuilder endpoints)
Source
Maps the Scalar API reference endpoint when Scalar and OpenAPI exposure options both allow it.
contextThe startup context.endpointsThe endpoint route builder.void ConfigureHostBeforeServices(StartupContext context, IHostBuilder builder)
Source
Executes pre-service host configuration; currently no implementation is required.
contextThe startup context.builderThe host builder.void ConfigureHostAfterServices(StartupContext context, IHostBuilder builder)
Source
Executes post-service host configuration; currently no implementation is required.
contextThe startup context.builderThe host builder.void ConfigureWebApplication(StartupContext context, IApplicationBuilder app)
Source
Configures the web application pipeline; currently no implementation is required.
contextThe startup context.appThe application builder.Configures AppSurface's Scalar API reference endpoint mapping behavior.
Scalar depends on the AppSurface-owned OpenAPI document in the default integration. The Scalar UI is mapped only when this option allows Scalar exposure and AppSurfaceWebOpenApiOptions.ExposeEndpoint also allows the backing OpenAPI endpoint in the same environment. This option does not add authentication or authorization.
AppSurfaceApiDocumentationEndpointExposure ExposeEndpoint { get; set; }
Source
Gets or sets when the Scalar API reference endpoint should be mapped.