Version: 3.2.20200419165537

Documentation (pdf)

This release provides many incremental improvements over 3.1 together with experimental support for versioning and more support for the upcoming JSON:API 1.1.

Versioning Support (experimental) #238

This release brings experimental support for versioning of resources and fields based on content negotiation. Any resource and field can carry a version range to specify its availability. Crnk will disregard any resource and field with a version range that does not intersect with the request version. The HTTP Accept header is used to pass along the desired version as part of general content negotiation. This has the benefit that URLs remain constant across versions, greatly simplifying usability and linking. For a more detailed discussion, see here[https://blog.ploeh.dk/2015/06/22/rest-implies-content-negotiation/]. An example looks like:
@JsonApiResource(type = "versionedTask")
@JsonApiVersion(max = 5)
public class VersionedTask {

    public enum CompletionStatus {

    private Long id;

    private String name;

    @JsonApiVersion(min = 1, max = 3)
    private boolean completed;

    @JsonApiVersion(min = 5)
    private CompletionStatus newCompleted;


For more details have a look here.

Support for Object-based Links

Links can be represented as either simple string or structured objects with href, rel, anchor, params, describedBy and meta. There is a new Link interface and DefaultLink implementation to model such objects. LinksInformation can now either hold Strings or DefaultLink. An example looks like:
"links": {
	"self": "http://example.com/articles/1/relationships/comments",
	"related": {
		"href": "http://example.com/articles/1/comments",
		"describedby": "http://example.com/schemas/article-comments",
		"meta": {
			"count": 10
More information can be found in https://jsonapi.org/format/1.1/#document-resource-object-links and http://www.crnk.io/releases/latest/documentation/#_jsonapilinksinformation.

Misc Improvements


A special thanks to Broad, Ralph, JB, PoffM, Christian, Sebastian, Kokogino, duncanportelli, Luka, Gianin, fjf2002, Tomasz, erjaimin for all the contributions to make this release happen!