This guide contains examples about using the Auxiliaries in Customizing Resource Representations.
Implementation Tips
The resource representations can be improved via the following tips:
Applying of representation constraints implies that certain fields may not be included in the resulting representation, thus they should not be set in the Java object that represent the resource and will be passed for serialization. Such resource fields should not be defined as required and should be of a referent Java type which allows null values.
Constrains can be applied to resource representations transferred with operation RETRIEVE, but also with operations UPDATE and CREATE – do not limit this feature to RETRIEVE operation only, do not forget to describe the expected HTTP headers and query parameters for defining representation constraints in the documentation.
Always include HTTP headers defining the applied representation constraints in HTTP responses that contain customized resource representations.