Web API Project Template
Create Your First Arcus Web API Project
First, install the template from NuGet:
> dotnet new --install Arcus.Templates.WebApi
When installed, the template can be created with shortname:
> dotnet new arcus-webapi --name Arcus.Demo.WebAPI
Creates a starter web API project with by default configured:
- Exception middleware to log unhandled exceptions thrown during request processing.
- Content negotiation that only supports
- OpenAPI docs generation and UI (only available locally).
- Provides basic health endpoint with ASP.NET Core health checks with OpenAPI support.
- Docker building file.
- Default console logger.
And additional features available with options:
false): includes a
appsettings.jsonfile to the web API project.
false): excludes the capability to correlate between HTTP requests/responses from the API project.
false): exclude the ASP.NET OpenAPI docs generation and UI from API project.
Console: no extra logging mechanism except for the default console logging will be added to the web API project.
Serilog: adds Serilog as logging mechanism with request logging to the web API project.
As part of this template the following HTTP header(s) are removed for security sake:
Serverheader * Provides information concerning the Web API runtime