AppSurface Search
API Reference

Scalar

Type

AppSurfaceWebScalarOptions

Source

Configures AppSurface's Scalar API reference endpoint mapping behavior.

Remarks

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.

Property

ExposeEndpoint

AppSurfaceApiDocumentationEndpointExposure ExposeEndpoint { get; set; } Source

Gets or sets when the Scalar API reference endpoint should be mapped.

Type

AppSurfaceWebScalarModule

Source

A web module that integrates Scalar API reference documentation into the application.

Remarks

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.

Method

ConfigureServices

void ConfigureServices(StartupContext context, IServiceCollection services)

Configures services needed for Scalar, including endpoint exposure options.

Parameters

  • context
    The startup context.
  • services
    The service collection.
Method

RegisterDependentModules

void RegisterDependentModules(ModuleDependencyBuilder builder)

Registers dependencies for this module, specifically AppSurfaceWebOpenApiModule .

Parameters

  • builder
    The module dependency builder.
Method

ConfigureEndpoints

void ConfigureEndpoints(StartupContext context, IEndpointRouteBuilder endpoints)

Maps the Scalar API reference endpoint when Scalar and OpenAPI exposure options both allow it.

Parameters

  • context
    The startup context.
  • endpoints
    The endpoint route builder.
Method

ConfigureHostBeforeServices

void ConfigureHostBeforeServices(StartupContext context, IHostBuilder builder)

Executes pre-service host configuration; currently no implementation is required.

Parameters

  • context
    The startup context.
  • builder
    The host builder.
Method

ConfigureHostAfterServices

void ConfigureHostAfterServices(StartupContext context, IHostBuilder builder)

Executes post-service host configuration; currently no implementation is required.

Parameters

  • context
    The startup context.
  • builder
    The host builder.
Method

ConfigureWebApplication

void ConfigureWebApplication(StartupContext context, IApplicationBuilder app)

Configures the web application pipeline; currently no implementation is required.

Parameters

  • context
    The startup context.
  • app
    The application builder.