Skip to content

giacoletti/buberbreakfast_api

Repository files navigation

Buber Breakfast API

REST API built in .NET 6


Create Breakfast

Create Breakfast Request

POST /breakfasts
{
    "name": "Vegan Sunshine",
    "description": "Vegan everything! Join us for a healthy breakfast..",
    "startDateTime": "2022-04-08T08:00:00",
    "endDateTime": "2022-04-08T11:00:00",
    "savory": [
        "Oatmeal",
        "Avocado Toast",
        "Omelette",
        "Salad"
    ],
    "Sweet": [
        "Cookie"
    ]
}

Create Breakfast Response

201 Created
Location: {{host}}/Breakfasts/{{id}}
{
    "id": "00000000-0000-0000-0000-000000000000",
    "name": "Vegan Sunshine",
    "description": "Vegan everything! Join us for a healthy breakfast..",
    "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 Breakfast

Get Breakfast Request

GET /breakfasts/{{id}}

Get Breakfast Response

200 Ok
{
    "id": "00000000-0000-0000-0000-000000000000",
    "name": "Vegan Sunshine",
    "description": "Vegan everything! Join us for a healthy breakfast..",
    "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"
    ]
}

Update Breakfast

Update Breakfast Request

PUT /breakfasts/{{id}}
{
    "name": "Vegan Sunshine",
    "description": "Vegan everything! Join us for a healthy breakfast..",
    "startDateTime": "2022-04-08T08:00:00",
    "endDateTime": "2022-04-08T11:00:00",
    "savory": [
        "Oatmeal",
        "Avocado Toast",
        "Omelette",
        "Salad"
    ],
    "Sweet": [
        "Cookie"
    ]
}

Update Breakfast Response

204 No Content

or

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

Delete Breakfast

Delete Breakfast Request

DELETE /breakfasts/{{id}}

Delete Breakfast Response

204 No Content

Acknowledgments

License

The software is available as open source under the terms of the MIT License.

About

.NET 6 REST API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages