Releases: arucard21/SimplyRESTful-Framework
Improved Collection resource
This release introduces version 2 of the HALCollection resource. This contains the following improvements:
- Uses offset-based paging for more flexible control over paging
- Allows filtering the fields of the returned resources.
- Allows a query to be provided that can be used to specify exactly which resource the collection should contain.
- Allows a sort order to be provided that can be used to specify exactly which fields the collection should be sorted on.
This version can be retrieved as both HAL+JSON as well as plain JSON. The latter uses a custom media type, application/x.simplyrestful-halcollection-v2+json
and is returned by default.
Version 1 of the HALCollection resource is still provided but it is now deprecated.
Additionally, the persist-springdata library is now also deprecated. This library was intended for resources that did not require mapping to a database-specific entity. However, it turned out that, aside from the simplest resources, some kind of mapping is almost always required. Most notably, the UUID to URI mapping for identifiers seems to always require custom mapping since some additional information is required to convert a UUID from the database to its corresponding URI.
Enable Bean Validation
Enable Bean Validation on the POJOs that are used to deserialize the request body. This allows Bean Validation annotations in these POJOs to be enforced in the API.
Bugfix/Improvement
Change the database identifier from UUID to Long. This fixes a bug with updating the resource but also improves performance.
More client flexibility
Allow custom query parameters and HTTP headers to be included in SimplyRESTfulClient. These may be required to access the API (e.g. an API token in an Authorization header). The resource URI discovery is also fixed by changing it to only be done just before any request. This ensures that any query parameters and HTTP headers required to access the API are also available.
More flexible client
Provide more flexibility in SimplyRESTfulClient, with an injectable factory and allowing a custom ObjectMapper.
Small Improvements
Provides small improvements and updated documentation
Update to Java 11 and client implemented
Aside from some fixes, with this release the framework is updated to Java 11. Additionally, the client implementation is now complete and can be used to access SimplyRESTful APIs.
Remove unnecessary BaseWebResource
The BaseWebResource
turns out to be unnecessary in practice as you can simply override anything in the DefaultWebResource
class. So the BaseWebResource
is now removed.
Improve persistence with Spring Data
Improve persistence by correctly specifying the inheritance strategy on SpringDataHALResource
(used specifically with Spring Data).
Improve method name
The listing
method in the WebResource classes is now renamed to list
which conforms better to the CRUDL naming convention used here.