HAKOM.Documentation.Http.Net Assembly
Provides automatic OpenAPI documentation generation and hosting for HAKOM HTTP services.
Remarks
Section titled “Remarks”The HAKOM.Documentation.Http.Net assembly integrates Swashbuckle (Swagger) into
ASP.NET Core services built on the HAKOM HTTP infrastructure. It generates versioned OpenAPI
specification documents, applies custom Swagger UI styling and adds several Swashbuckle
filters that improve the quality of generated specifications.
Call AddDocumentation(this IMvcBuilder, string, string, string, string, string, string, Action<SwaggerGenOptions>) during service setup and UseDocumentation(this WebApplication, Action<SwaggerOptions>) on the built application.
protected override void ConfigureMvc(IMvcBuilder mvcBuilder){ mvcBuilder.AddDocumentation( title: "My API", description: "Manages time series data." );}
protected override void ConfigureApplication(WebApplication application){ base.ConfigureApplication(application); application.UseDocumentation();}- MvcBuilderExtensions – registers Swagger generation, tag descriptions and XML comment inclusion.
- WebApplicationExtension – configures routing for the generated specification and Swagger UI.
- SwaggerGenOptionsExtensions – registers operation filters for custom model binder documentation.
- IDocumentationConfiguration – defines the documentation layout (versions, file names, base path).
- CustomSchemaNameAttribute – allows types to override the schema name used in the OpenAPI specification.
- ObsoleteParameterAttribute – marks individual action parameters as deprecated in the specification.
- DocumentationController – exposes endpoints for listing and redirecting to specification documents.
| Namespaces | |
|---|---|
| HAKOM.Documentation.Http.Net.Api | Contains the public API surface for configuring and hosting OpenAPI documentation in HAKOM HTTP services. |
| HAKOM.Documentation.Http.Net.Api.Exceptions | Contains exception types raised by the documentation infrastructure during service startup. |
| HAKOM.Documentation.Http.Net.Api.Extensions | Provides extension methods for adding and configuring automatically generated OpenAPI documentation. |
Was this page helpful?Thanks for your feedback!