Skip to content

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

Notifications You must be signed in to change notification settings

adazol123/RESTAPI_asp-dot-net

Repository files navigation

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

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages