JMI.DotNet5.REST.API.Template.CSharp 5.0.962

There is a newer version of this package available.
See the version list below for details.
dotnet new install JMI.DotNet5.REST.API.Template.CSharp::5.0.962
This package contains a .NET Template Package you can call from the shell/command line.

VSIX version for Visual Studio available here.

Description

This extension helps you to create a .NET 5 REST API ready to be used solution taking into account:

  • DI according to .NET 5 practices (without external dependencies)
  • exception handling settings according to .NET 5 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 OpenAPI

The created solution is layered according to some business practices. The purpose is to make the solution ready to be used and compliant with "real life" constraints.

How to install the package?

You only need to type the next command: dotnet new --install JMI.DotNet5.REST.API.Template.CSharp::[version]

How the package works?

Check if the new template has been installed properly: dotnet new --list

You should see a new template called webapi5.

To create a new solution based on this template, you have to type the command below: dotnet new webapi5 -n [solution-name]

New parameters have been added:

  • -t | --title, string: API title
  • -d | --description, string: API description
  • -oa | --enable-openapi, boolean: enable OpenAPI (default true)

Example:

dotnet new webapi5 -n "name" -t "API title" -d "API description" -oa true

To visualize the extension help:

dotnet new webapi5 -h

  • net5.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
5.0.1011 2,641 11/11/2020
5.0.1008 462 11/10/2020
5.0.1000 538 11/8/2020
5.0.962 605 10/31/2020
5.0.917 635 10/19/2020