Skip to content

y-code/template-rest-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Project Template of ASP.NET Core Web API with API Documentation

This is a C# project template for the .NET Core Template Engine. It contains a simple ASP.NET Core Web API with API documentation by NSwag.

Installation

You can install this template via NuGet package.

dotnet new -i Ycode.RestApi

After the installation completes, this command will show a list of templates. You can find restapi in it.

How to use template

You can create a working ASP.NET Core Web API project using this template.

mkdir Example
cd Example
dotnet new restapi --swaggerTitle="My API"
dotnet run

Now, open https://localhost:62182/swagger in your browser, then you will see Swagger UI of your new Web API.

You can try running the API via this web UI. Expand Example and GET /api/v1/Example, and click on Try it out button and Execute button, then you will see the response from the API.

API Document Web UI

About

A C# project template that contains a simple ASP.NET Core Web API with API documentation by NSwag.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages