Basic REST backend application using Spring-boot for test purposes.
This application will serve as an example for a quick cloud microservice environment bootstrap.
The application will provide [at least] the following endpoints:
- POST /users
- GET /users
- GET /users/{id}
- PUT /users
Moreover:
- User information are served from memory
- The application context endpoint is /basic-rest-users
- You get responses with state information defined by HATEOAS
- Pagination is supported
Using any HTTP client application, you can try the below.
POST <URL>/basic-rest-users/users
{
"id" : "gumol",
"lastName" : "almo",
"location" : "somewhere in mtl"
}
201 Created
{
"firstName": null,
"lastName": "almo",
"email": null,
"location": "somewhere in mtl",
"_links": {
"self": {
"href": "<URL>/basic-rest-users/users/gumol"
},
"user": {
"href": "<URL>/basic-rest-users/users/gumol"
}
}
}
GET <URL>/basic-rest-users/users/gumol
200 OK
{
"firstName": null,
"lastName": "almo",
"email": null,
"location": "somewhere in mtl",
"_links": {
"self": {
"href": "<URL>/basic-rest-users/users/gumol"
},
"user": {
"href": "<URL>/basic-rest-users/users/gumol"
}
}
}