RESTAPI built with ASP.NET7 for a breakfast website. It offers all CRUD functionality for the website such as creating breakfast, reading breakfast, updating breakfast and deleting breakfast.
- ASP.NET 7
- dotnet CLI (runtime and sdk)
- Neovim (code editor)
- Omnisharp Language server (LSP)
- Null_ls for formatting (neovim plugin)
- Clone the repository
git clone https://github.com/Clinton-Nmereole/BraiseBreakfast/
- Go to project Directory
cd BraiseBreakfast
- Run Project
dotnet run --project ./BuberBreakfast
- Test results with Postman
OR
firefox https://www.postman.com/
google-chrome https://www.postman.com/
POST /breakfasts
{
"name": "Morning Rainbow",
"description": "A tasteful rainbow first thing in the morning to kickstart your day",
"imageUrl": "https://www.google.com/url?sa=i&url=https%3A%2F%2Funsplash.com%2Fs%2Fphotos%2Fimage&psig=AOvVaw2M6eqVspNa6CElVfa14-fP&ust=1698866021724000&source=images&cd=vfe&opi=89978449&ved=0CBEQjRxqFwoTCPC72J__oIIDFQAAAAAdAAAAABAE",
"startDateTime": "2022-04-08T08:00:00",
"endDateTime": "2022-04-08T11:00:00",
"savory": [
"Oatmeal",
"Avocado Toast",
"Omelette",
"Salad"
],
"Sweet": [
"Cookie"
]
}
201 Created
Location: {{host}}/Breakfasts/{{id}}
{
"id": "00000000-0000-0000-0000-000000000000",
"name": "Morning Rainbow",
"description": "A tasteful rainbow first thing in the morning to kickstart your day",
"imageUrl": "some Img's url",
"startDateTime": "2022-04-08T08:00:00",
"endDateTime": "2022-04-08T11:00:00",
"lastModifiedDateTime": "2022-04-06T12:00:00",
"savory": [
"Oatmeal",
"Avocado Toast",
"Omelette",
"Salad"
],
"Sweet": [
"Cookie"
]
}
GET /breakfasts/{{id}}
200 Ok
{
"id": "00000000-0000-0000-0000-000000000000",
"name": "Morning Rainbow",
"description": "A tasteful rainbow first thing in the morning to kickstart your day",
"imageUrl": "some Img's url",
"startDateTime": "2022-04-08T08:00:00",
"endDateTime": "2022-04-08T11:00:00",
"lastModifiedDateTime": "2022-04-06T12:00:00",
"savory": [
"Oatmeal",
"Avocado Toast",
"Omelette",
"Salad"
],
"Sweet": [
"Cookie"
]
}
PUT /breakfasts/{{id}}
{
"name": "Morning Rainbow",
"description": "A tasteful rainbow first thing in the morning to kickstart your day",
"imageUrl": "some Img's url",
"startDateTime": "2022-04-08T08:00:00",
"endDateTime": "2022-04-08T11:00:00",
"savory": [
"Oatmeal",
"Avocado Toast",
"Omelette",
"Salad"
],
"Sweet": [
"Cookie"
]
}
204 No Content
or
201 Created
Location: {{host}}/Breakfasts/{{id}}
DELETE /breakfasts/{{id}}
204 No Content
- FreeCodeCamp youtube channel and website: https://www.youtube.com/@freecodecamp and https://www.freecodecamp.org/
- Buber-breakfast by https://github.com/amantinband: Link to project: https://github.com/amantinband/buber-breakfast/tree/main
- Video tutorial for project: https://www.youtube.com/watch?v=PmDJIooZjBE&list=PLbHoFtW5JkYZZ_aawNaCoZ05Qi5fCPVY-&index=289
- ErrorOr - A simple, fluent discriminated union of an error or a result.