Skip to content

Commit 682f174

Browse files
committed
change template name.
update README doc.
1 parent 17652dc commit 682f174

File tree

3 files changed

+22
-2
lines changed

3 files changed

+22
-2
lines changed

README.md

+21-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,22 @@
1-
# ASP.NET Core Web API with API documentation
1+
# Project Template of ASP.NET Core Web API with API documentation
22
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.
3+
4+
## Installation
5+
You can install this template via NuGet package.
6+
```
7+
dotnet new -i Ycode.RestApi
8+
```
9+
After the installation completes, this command will show a list of templates. You can find `restapi` in it.
10+
11+
## How to use template
12+
You can create a working ASP.NET Core Web API project using this template.
13+
```
14+
mkdir Example
15+
cd Example
16+
dotnet new restapi --swaggerTitle="My API"
17+
dotnet run
18+
```
19+
Now, open [https://localhost:62182/swagger](https://localhost:62182/swagger) in your browser, then you will see Swagger UI of your new Web API.
20+
21+
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.
22+
![API Document Web UI](https://github.com/y-code/RestApi/raw/master/doc/images/swagger-ui.png)

RestApi/.template.config/template.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"author": "Yas Ikeda <[email protected]>",
44
"classifications": [ "Web", "WebAPI" ],
55
"identity": "Y-code.restapi",
6-
"name": "ASP.NET Core Web API with Swagger",
6+
"name": "ASP.NET Core Web API with API Documentation",
77
"shortName": "restapi",
88
"sourceName": "RestApi",
99
"guids": [ "a4f8c1fe-0ae9-49fd-aa9f-4409951594a2" ],

doc/images/swagger-ui.png

136 KB
Loading

0 commit comments

Comments
 (0)