A thin template that should give you benefit of having the common stuff setup and couple of extra things that might be useful to people who are learning.
The template is available on Visual Studio Marketplace
In all honesty you don't it's just a template after all, but in case you are frequently building Web APIs you may found it useful, or may found parts that you can re-use to build one for yourself.
In case you are still reading this is what template brings on the table:
- Configuration setup which includes appsettings.{env}.json transformation and reading the data using the Options pattern
- CORS that is configure to allow everyhting, but it should be very easy to configure it for a real world scenario.
- Response caching
- Health check implementation using readiness and liveness probes
- Swagger
- FooController - a simple API controller:
- Routing
- HTTP response messages using IActionResult
- File upload example that support complex models so that you can have metadata around IFormFile property that carries the file content
- Custom middleware example
If you have any issues or suggestion that you believe might make the template better please don't hestitate to let me know and if it's not a big bother please use one of the templates: bug/new feature