Enhancement for data relation hateoas #1186 #1204
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes:
Supports returning optional hateoas for fields with data relation,
allowing the user to navigate to different resource and item endpoints.
Now the returned "_links'' dictionary may have a "related'' dictionary inside
and each key-value pair yields the related links for a data relation field.
Updates XML renderer which now supports data field tag
attributes such as "href" and "title"
data field tags with data relation may be rendered as (according to Adding HATEOAS support for data relation fields #1186):
Makes some minor changes on functions field_definition and resource_link
when retrieving fields and resources to support this enhancement.
Updates documentation that "related" hateoas items will only be included when appropriate.
Includes tests for this feature and XML renderer.