toedter / spring-hateoas-jsonapi

A JSON:API media type implementation for Spring HATEOAS
Apache License 2.0
106 stars 15 forks source link

JsonApiObject always enables version information #69

Closed boe7 closed 1 year ago

boe7 commented 1 year ago

In spring-hateoas-jsonapi:2.0.0, the one-argument constructor for JsonApiObject(boolean) disregards the value of the showVersion parameter, and always sets the showVersion value to true when calling the four-argument constructor. The effect is that jsonApiConfiguration.withJsonApiObject(new JsonApiObject(false)) results in the version information being added. As a workaround, jsonApiConfiguration.withJsonApiObject(null) can be used to remove the version information, e.g. with the purpose of overriding the configuration for unit testing.

toedter commented 1 year ago

thx for reporting this, I'll have a look at it.

toedter commented 1 year ago

fix will be in the next release.