Skip to content

An example Minimal Api application with OpenAPI, Swashbuckle, and API versioning using clean architecture

License

Notifications You must be signed in to change notification settings

nield/MinimalApiTemplate

Repository files navigation

MinimalApiTemplate

.NET badge

An example Minimal Api application with OpenAPI, Swashbuckle, and API versioning using clean architecture.

It also include the following:

  • Redis OutputCaching
  • .Net 8 ExceptionHandlers
  • CorrelationId handling using HeaderPropagation
  • OpenTelemetry with custom metrics
  • Integration tests using TestContainers
  • Pub Sub using MassTransit
  • API versioning
  • Auditing using Audit.Net

This template is based on Jason Tyler's Template, but contains the list above and uses repositories in command handlers and different unit test and integration test setups.

Getting Started

  1. Git Clone the repo to your device
  2. Open command prompt and set the current folder to the root of the repo
  3. Execute 'dotnet new install .' command in the command prompt
  4. While in command prompt create a folder in the location you want the template code to be created
  5. Execute 'dotnet new ca-template -o "New Micro Service Name here"' command in the command prompt
  6. If you need to uninstall the template
    • Open command prompt and set the current folder to the root of the repo
    • Execute 'dotnet new uninstall .' command in the command prompt

About

An example Minimal Api application with OpenAPI, Swashbuckle, and API versioning using clean architecture

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published