pandoc -f docbook -t asciidoc api.xml -o api.txt
Maven/ Spring/ JPA(Hibernate)/ Spring MVC/ REST(Jackson)/ JUnit/ Spring rest docs.
Maven/ Spring/ JPA(Hibernate)/ Spring MVC/ REST(Jackson)/ JUnit/ Spring rest docs.
Design and implement a JSON API using Hibernate/Spring/SpringMVC without frontend.
Build a voting system for deciding where to have lunch.
- 2 types of users: admin and regular users
- Admin can input a restaurant and it's lunch menu of the day (2-5 items usually, just a dish name and price)
- Menu changes each day (admins do the updates)
- Users can vote on which restaurant they want to have lunch at
- Only one vote counted per user
- If user votes again the same day:
- If it is before 11:00 we asume that he changed his mind.
- If it is after 11:00 then it is too late, vote can't be changed
Each restaurant provides new menu each day.
P.S.: Asume that your API will used by a frontend developer to build frontend on top of that.
RESTful notes tries to adhere as closely as possible to standard HTTP and REST conventions in its use of HTTP verbs.
| Verb | Usage |
|---|---|
|
Used to retrieve a resource |
|
Used to create a new resource |
|
Used to update an existing resource, including partial updates |
|
Used to delete an existing resource |
RESTful notes tries to adhere as closely as possible to standard HTTP and REST conventions in its use of HTTP status codes.
| Status code | Usage |
|---|---|
|
The request completed successfully |
|
A new resource has been created successfully. The
resource’s URI is available from the response’s |
|
An update to an existing resource has been applied successfully |
|
The request was malformed. The response body will include an error providing further information |
|
The requested resource did not exist |
RESTful Notes uses hypermedia and resources include links to other
resources in their responses. Responses are in
Hypertext Application from
resource to resource. Language (HAL) format. Links can be found beneath
the _links key. Users of the API should not create URIs themselves,
instead they should use the above-described links to navigate
The Notes resources is used to create and list notes
A POST request is used to cratee a restaurant
$ curl 'http://localhost:8080/rest/admin/restaurants/' -i -X POST -H 'Content-Type: application/json;charset=UTF-8' -d '{
"name" : "Шотиииииии"
}'