Add project README with setup and usage instructions
This commit is contained in:
52
README.md
Normal file
52
README.md
Normal file
@@ -0,0 +1,52 @@
|
||||
# EndavaTask
|
||||
|
||||
ASP.NET Core Web API project for product listing (filtering + pagination) and product updates.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- .NET SDK `10.0` (the projects target `net10.0`)
|
||||
|
||||
## Project Structure
|
||||
|
||||
- `EndavaTask` - main Web API
|
||||
- `EndavaTask.Tests` - unit tests
|
||||
- `EndavaTask.sln` - solution file
|
||||
|
||||
## Run the API
|
||||
|
||||
From the repository root:
|
||||
|
||||
```bash
|
||||
dotnet restore EndavaTask.sln
|
||||
dotnet run --project EndavaTask
|
||||
```
|
||||
|
||||
Default local URLs (from launch settings):
|
||||
|
||||
- `http://localhost:5262`
|
||||
- `https://localhost:7079`
|
||||
|
||||
Swagger UI (Development):
|
||||
|
||||
- `http://localhost:5262/swagger`
|
||||
- `https://localhost:7079/swagger`
|
||||
|
||||
## Run tests
|
||||
|
||||
```bash
|
||||
dotnet test EndavaTask.sln
|
||||
```
|
||||
|
||||
## Example API calls
|
||||
|
||||
You can use the included `EndavaTask/EndavaTask.http` file, or run:
|
||||
|
||||
```bash
|
||||
curl "http://localhost:5262/api/v1/products?pageNumber=1&pageSize=10"
|
||||
```
|
||||
|
||||
```bash
|
||||
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}'
|
||||
```
|
||||
Reference in New Issue
Block a user