1.0 KiB
1.0 KiB
EndavaTask
ASP.NET Core Web API project for product listing (filtering + pagination) and product updates.
Prerequisites
- .NET SDK
10.0(the projects targetnet10.0)
Project Structure
EndavaTask- main Web APIEndavaTask.Tests- unit testsEndavaTask.sln- solution file
Run the API
From the repository root:
dotnet restore EndavaTask.sln
dotnet run --project EndavaTask
Default local URLs (from launch settings):
http://localhost:5262https://localhost:7079
Swagger UI (Development):
http://localhost:5262/swaggerhttps://localhost:7079/swagger
Run tests
dotnet test EndavaTask.sln
Example API calls
You can use the included EndavaTask/EndavaTask.http file, or run:
curl "http://localhost:5262/api/v1/products?pageNumber=1&pageSize=10"
curl -X PUT "http://localhost:5262/api/v1/products/55555555-5555-5555-5555-555555555555" \
-H "Content-Type: application/json" \
-d '{"name":"Ultra Monitor","price":349.99}'