New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support HAL-FORMS target template element property #1427
Comments
I wonder what would be best. Media type specific annotations you can apply to domain objects? I would favor that. And because annotations don’t support null, we’d need a separate annotation for each custom attribute we support. |
I think it essentially just allows us to bind other link targets rather than only working on the (self) link the affordances are bound to from the start. |
I think that would be a good idea so we could have the "target link" in the generic model and render it at runtime for the used media type. |
We now explicitly set the target attribute of HAL FORMS templates if the target of the affordance does not equal the target of the self link.
The latest snapshots render the target element for all affordances not pointing to the URI of the self link you usually start with to build up affordances. Do you think that'll work? |
thx, I will check. |
I've got a pretty similar use case and I think this will work out quite nicely. I was finding it a bit awkward that you could only have affordances on the self link with the latest 1.2.3 release even though you could specify a target other than self (it just wouldn't be rendered). It's good to see that affordances will be able to have a target other than self. Is there a rough estimate around when 1.3.0 might be available for consumption? |
The milestone containing this functionality is already available from our repositories. We're shooting for a GA release right before the Spring Data 2021.0.0 one as it consumes Spring HATEOAS as dependency. The former is scheduled for mid April roundabout. |
In the HAL-FORMS Spec (see https://rwcbook.github.io/hal-forms/#_code_target_code), an optional target property could be defined for each template element. It would be great if Spring HATEOAS would support this when creating a HAL-FORMS affordance.
An example would look like:
The text was updated successfully, but these errors were encountered: