You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This ticket in Spring HATEOAS makes obvious that the spec is currently not entirely clear which URI is to be assumed the default target for all state transitions described using templates.
The description of target mentions that the value should be ignored if missing or invalid. However, it doesn't mention that it's the self link's value that should be used as target. Neither the description of the _links element not the section of the _template section explicitly state that either.
The text was updated successfully, but these errors were encountered:
No change in behavior, I assume. This came up in a ticket in which we discussed whether extra links would need to be added to the HAL part of the HAL FORMS document to connect a named template to a request destination. I would've liked to point to the spec to claim, that unless target is defined, the state transition is supposed to be triggered on the self link, but unfortunately no section of the spec actually explicitly states that.
Unless I misunderstood and what I assume isn't the actual intent of the spec, I suggest changing:
This is an OPTIONAL property. If this property is not understood by the recipient, left blank, or contains an invalid URL string, it SHOULD be ignored.
in the section on the target attribute to:
… it SHOULD be ignored. In that case, the target URL for requests to be submitted is the href attribute of the self link contained in the _links collection.
The very latter probably deserves a link to the corresponding section (_links). Within that, it's declared that a self SHOULD be present but there's no description of what should happen if we neither find a self link nor a target attribute for a template. I'd personally fine with considering the form invalid then or recommend the client to ignore it entirely.
This ticket in Spring HATEOAS makes obvious that the spec is currently not entirely clear which URI is to be assumed the default target for all state transitions described using templates.
The description of
target
mentions that the value should be ignored if missing or invalid. However, it doesn't mention that it's the self link's value that should be used as target. Neither the description of the_links
element not the section of the_template
section explicitly state that either.The text was updated successfully, but these errors were encountered: