-
Notifications
You must be signed in to change notification settings - Fork 40
implemented _links property to hold link and relationship links while… #17
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
base: master
Are you sure you want to change the base?
Conversation
… not breaking the _relationships array interface
Hi @amwmedia, thanks for your work (again ;)). A few remarks I'd like to hear your thoughts about:
|
Hey @beauby, I didn't want to finalize this too much (with tests and such) before I got your take on the actual implementation. Currently _links is created, and relationships links fall into a _links.relationshipName object. I think this works so long as the spec does not allow for relationships within relationships (which I don't believe is the case). The only possible conflict with this approach would be if you have a relationship named "self" or something unlikely like that. We could prefix a relationship link property with _ as well. so you'd end up with _links._relationshipName Thoughts? |
hey, @amwmedia thanks for this, I'm keen to use the links functionality so am willing to help out with this if you need it (write tests etc). I've just checked it out locally and it seemingly works with my heavily linked dataset. on the discussion about _links vs. links, I vote to stay with _links as it's the internals of the model than the first class attributes. cc/ @beauby |
Hi there! Sorry I took so long (again) to get back. So, after giving it a thought, I definitely agree that |
the possibility of a relationship link collision was my only reservation on this as well. I can try to get this change in soon. We are closing out a milestone today at work, so possibly early next week. |
Awesome @amwmedia! |
Hi @amwmedia, any news on this front? |
Sorry, things did not slow down as I had hoped after that week. In fact, they got more busy :-). This is still on my radar, but if anyone else wants to make this last small change, feel free. I've just been swamped lately. |
Hey @amwmedia, Did you get a chance to check this out? |
Here's a possible implementation for _links. There may be a better way to do this, but this was the most obvious solution I could think of that doesn't break backwards compatibility by turning the relationships array into an array of objects (or something like that).