The project is meant to be a Proof of Concept implementation of a RESTful web service.
It focuses on topics such as:
- Java based Spring Configuration
- Usage of new concepts introduced with Spring 3.1
- Spring MVC for the REST web service
- Security of the REST web service with Spring Security 3.1
- Basic and Digest authentication for the same URI mapping of the RESTful service
- Driving API discoverability with integration test
- Implementation of Discoverability with Spring
- REST advanced content type negotiation
- Integration testing of the REST service
- Comprehensive unit testing of the web tier, focusing on relevant behaviors to avoid brittleness
Implementation of a RESTfull web API, using:
- Spring 3.1 with Jackson, JAXB
- Hibernate 3.6 (to be moved to Hibernate 4.0 soon)
- Testing: Junit, Mockito, Hamcrest, rest-assured
GET /api/helloWorld/{id}
- http response codes: 200, 404, 500
- json (request/response): none/single resource
- retrieves the resource by id
POST /api/helloWorld
- http response codes: 201, 415, 500
- json (request/response): single resource/none
- creates a new resource
PUT /api/helloWorld
- http response codes: 200, 400, 404, 500
- json (request/response): single resource/none
- updates an existing resource
DELETE /api/helloWorld/{id}
- http response codes: 200, 404, 500
- json (request/response): none/none
- delete an existing resource by id
GET /api/helloWorld
- http response codes: 200, 500
- json (request/response): none/multiple resources
- retrieves all resources of that type
-
single resource: { "name": "Dvthix", "id": 1 }
-
multiple resources: [ { "name": "Dvthix", "id": 1 }, { "name": "cPfCwV", "id": 2 }, ]
===================
======================
- improvements in validation and HTTP response codes
- improving the marshaling of the server stack trace
- improve the discoverability of the REST API - make good use of the Location HTTP header for returning full URLs (not just ids) so that the client doesn't have to construct his own URLs; introduce a /about URL to make discoverability better
- expand on the design document, covering: details of the transaction strategy