Coder Social home page Coder Social logo

gaetanoru / christmaswishlist Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 32 KB

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

License: MIT License

C# 100.00%
aspnetcorewebapi csharp net6 demostration practice practice-project swagger asp-net-core rest-api christmas

christmaswishlist's Introduction

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

christmaswishlist's People

Contributors

gaetanoru avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.