{
"data": [{
"type": "comments",
"id": "1",
"attributes": {
"text": "HATEOS are the thing!"
},
"links": {
"self": "/comments/1"
},
"relationships": {
"author": {
"links": {
"self": "/comments/1/relationships/author",
"related": "/comments/1/author"
}
},
"articles": {
"links": {
"self": "/comments/1/relationships/articles",
"related": "/comments/1/articles"
}
}
}
}],
"links": {
"self": "/comments"
}
}
Hi! I am quite new to
jsonapiso forgive me if I got something wrong (or asking for something wrong) but looking at the spec examples I see this:Few things I noticed when tried to implement similar relationships:
relatedlink generator unaware of the parent so this lib would generate just/articlesinstead of/comments/1/articles.url_foron the child view gets just the collection and the conn. But anyway I think it makes more sense to do it on the parent view level similar tourl_for_relbut forrelatedlinks.datasection then but still generate the links?