Currently, when HalFormsOptions.Inline#getInline is empty, the JSON inline attribute is excluded from the representation. This is because of:
|
@JsonInclude(Include.NON_EMPTY) |
If we take a look at HAL-FORMS specification, we can read what follows:
If the inline attribute is missing or unparseable and the link (see link) attribute is missing or unparseable, then the options element SHOULD be ignored.
Therefore, IMO, from the spec POV, inline has 3 states:
Spring HATEOAS current behavior reduces this to 2 states:
I think Spring HATEOAS should fix this to correctly represent the 3 states of the specification.
Currently, when
HalFormsOptions.Inline#getInlineis empty, the JSONinlineattribute is excluded from the representation. This is because of:spring-hateoas/src/main/java/org/springframework/hateoas/mediatype/hal/forms/HalFormsOptions.java
Line 39 in d6265fb
If we take a look at HAL-FORMS specification, we can read what follows:
Therefore, IMO, from the spec POV,
inlinehas 3 states:Spring HATEOAS current behavior reduces this to 2 states:
I think Spring HATEOAS should fix this to correctly represent the 3 states of the specification.