Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Open more actions menu

Repository files navigation

ChristmasWishList 🎄 🎅 🎁

This and a demonstration API for managing Christmas gifts

Overview

In this project I built a REST CRUD API from scratch, using .NET 6. As you would expect, the backend system supports Creating, Reading, Updating and Deleting Christmas gifts.

Technologies

  • .NET6
  • FluentValidation
  • Swagger

Swagger UI

The ChristmasWishList project will open up the Swagger UI once it starts. Here you can browse the documentation for each endpoint, making it easy to test all of the endpoints.

Swagger UI

API Definition

Get Gifts

Get Gift Request

GET /gifts

Get Gift Response

200 Ok
{
  "total": 1,
  "totalAmount": 40
  "totalSpent": 0,
  "totalToSpent": 40,
  "result": [
    {
      "id": "e6a9bc8a-4707-4e1a-8380-7541ea0f1a4a",
      "firstName": "string",
      "nameGift": "string",
      "price": 1,
      "isPurchased": false,
      "createdDate": "2022-12-13T09:22:07.8675507+01:00",
      "lastModifiedDate": null
    }
  ]
}

Get Gift

Get Gift Request

GET /gifts/{id}

Get Gift Response

200 Ok

or

404 Not Found
{
  "id": "e6a9bc8a-4707-4e1a-8380-7541ea0f1a4a",
  "firstName": "John",
  "nameGift": "Book C# 11 and .NET 7",
  "price": 40,
  "isPurchased": false,
  "createdDate": "2022-12-13T09:22:07.867550+01:00",
  "lastModifiedDate": null
}

Create Gift

Create Gift Request

POST /Gifts
{
  "firstName": "John",
  "nameGift": "Book C# 11 and .NET 7",
  "price": 40,
  "isPurchased": false,
}

Create Gift Response

201 Created
Location: {{url}}/Breakfasts/{{id}}

or

400 Bad Request

Update Gift

Update Gift Request

PUT /gifts/{{id}}
{
  "firstName": "John",
  "nameGift": "Book C# 11 and .NET 7",
  "price": 40,
  "isPurchased": true,
}

Update Gift Response

204 No Content

or

404 Not Found

or

400 Bad Request

Delete Gift

Delete Gift Request

DELETE /gifts/{{id}}

Delete Gift Response

204 No Content

or

404 Not Found

or

400 Bad Request

Delete All Gifts

Delete All Gifts Request

DELETE /gifts/

Delete All Gifts Response

204 No Content

or

400 Bad Request

About

A REST API which supports Creating, Reading, Updating and Deleting of Christmas gifts

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.