adazol123 / RESTAPI_asp-dot-net

Understanding rest-api with ASP.NET + API documentation with swagger UI

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ASP.NET + REST API + Swagger Doc UI

Understanding REST API with ASP.NET

Adazolhub shop product api endpoints to perform CRUD operation on the backend through REST API.

Implemented Swagger UI for developer friendly test endpoints

swagger

Using terminal console to test API endpoints console


Setup

  1. Initialize Webapi
dotnet new webapi -f net6.0
  1. install HTTP requests tools to test ASP.NET Core web APIs on console/terminal
dotnet tool install -g Microsoft.dotnet-httprepl
  1. Install Local Development Certificate
dotnet dev-certs https --trust
  1. Run Webapi
dotnet run
  1. Start test request to endpoints
# start connection
httprepl https://localhost:{PORT}

# connnect to endpoint
(Disconnected)> connect https://localhost:{PORT}

# navigate to specific endpoint
cd <Name_OF_Endpoint>

# request using "GET" method
get

Author

Daniel Lozada

About

Understanding rest-api with ASP.NET + API documentation with swagger UI


Languages

Language:C# 100.0%