SwaggerController

Swagger UI controller.

Inherits: ISwaggerController, IConfigurable, IReferenceable, IInitializable

Description

The SwaggerController class allows you to create a Swagger UI controller.

Fields

_endpoint

The HTTP endpoint that exposes this controller.

protected _endpoint: HttpEndpoint

_dependencyResolver

The dependency resolver.

protected _dependencyResolver: DependencyResolver

_routes

Routes with swagger doc

protected _routes: Dictionary<string, string>

Instance methods

Configure

Configures a component by its passing configuration parameters.

public virtual void Configure(ConfigParams config)

  • config: ConfigParams - configuration parameters to be set.

Initialize

TODO: add description

public void Initialize(IApplicationBuilder applicationBuilder)

  • applicationBuilder: IApplicationBuilder - TODO: add description

RegisterOpenApiSpec

Performs the required Swagger registration steps.

public void RegisterOpenApiSpec(string baseRoute, string swaggerRoute)

  • baseRoute: string - base route
  • swaggerRoute: string - Swagger route

SetReferences

Sets references to dependent components.

public virtual void SetReferences(IReferences references)

  • references: IReferences - references to locate the component dependencies.