To run using docker:
docker-compose up
GET
: returns a list of users
[
{
"id": 1,
"name": "first"
},
{
"id": 2,
"name": "second"
}
]
This is an example of implement builder design pattern.
GET
: returns a list of computers
[
{
"cpu": "LaptopCPU",
"mark": "",
"gpu": "LaptopGPU",
"ram": "16GB",
"color": "LaptopBlack",
"resolution": "LaptopResolution"
},
{
"cpu": "SuperCPU",
"mark": "",
"gpu": "SuperGPU",
"ram": "256GB",
"color": "SuperBlack",
"resolution": "SuperResolution"
}
]
This is an example of implement adapter design pattern.
GET
: returns a list of temperature conversions
[
"100 in Fahrenheit is 37.7777777777778 in Celsius",
"0 in Celsius is 32 in Fahrenheit"
]
This is an example of implement factory design pattern.
GET
:/api/pizza
to reutrn list of pizzasGET
:/api/pizza/{id}
to reutrn pizza with idPOST
:/api/pizza
to add pizza to the list Request body:
{
"id": 5,
"name": "new Pizza",
"category": "new Category"
}
PUT
:/api/pizza/{id}
to update pizza in the list Request body:
{
"id": 5,
"name": "modified name",
"category": "modified category"
}
DELETE
:/api/pizza/{id}
to remove pizza with id from the list