Description
This extension allows to create a .NET Core 3.1 REST API ready to use solution taking into account:
- DI according to .NET Core 3.1 practices (without external dependencies)
- exception handling settings according to .NET Core 3.1 practices
- AppSettings
- mapping settings (based on Automapper)
- OpenAPI basic configuration (can be enabled/disabled by configuration)
- API Versioning (based on URL routes)
- automatic OpenAPI versioning according to code
- XML Comments included in Swagger
The created solution is layered according to business practices in order to make it ready to be used in "real life".
You will find here the .NET Core 2.x version.
Besides the .NET Core 3.x upgrade, this version includes many improvements.
A new .NET 5 version has been released here (preview).
You will find more information about how to install and use the extension following the link below:
jmidotnetfr.wordpress.com/2020/08/21/how-to-use-the-net-core-3-x-rest-api-template-for-visual-studio
(sorry for omitting the hyperlink to the post. Recent updates in the marketplace do not allow certain types of external references. Blog posts are being migrated to avoid the issue.).
.NET CLI
In addition to this Visual Studio version, you can find here the .NET CLI version.
Release notes
v3.1.999
- code comments (XML Comments type) at DataContract level are included in the Swagger/OpenAPI generation.
v3.1.903
- fix related to AppSettings not being loaded properly by DI (thanks Devwulf for having reported the issue).
- default file opened at the editor level
v3.1.693
- default Unit Tests samples included at controllers level.
v3.1.594.1
- bug fix on XML comments file
v3.1.592.1
- End of preview after the last "rc" dependency upgrade (Swashbuckle).
- Small fixes on tags and project metadata.
- .NET Core 3.1 upgrade.
- all dependencies upgrade (last available version).
v3.0.570.1
Microsoft.AspNetCore.Mvc.Versioning and Microsoft.AspNetCore.Mvc.Versioning.ApiExplorer have been upgraded from preview to 4.0.0 release version. Swashbuckle.AspNetCore packages remain in "rc".
v3.0
- Versioning has been aligned with .NET Core version
- API returns JSON-based exceptions
- XML comments have been improved to go deeper in specifications (return types descriptions, etc)
- the API produces JSON by default
- global error management and logging based on two alternatives (documented in the code)
- small fixes