Skip to content
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

RC2: Reformat top-level links #58

Open
csantero opened this issue Feb 10, 2015 · 3 comments
Open

RC2: Reformat top-level links #58

csantero opened this issue Feb 10, 2015 · 3 comments
Milestone

Comments

@csantero
Copy link
Collaborator

https://github.com/dgeb/json-api/blob/v1rc2/format/index.md#top-level-links-

The top-level links object MAY contain the following members:

  • "self" - a link for fetching the data in the response document.
  • Pagination links for the primary data, as described below.

I believe we aren't even using this key yet, correct? Since this is a MAY requirement, we technically don't need to do anything here, although paging is something we absolutely ought to support eventually, and the self key is nice to have and probably easy to add.

@SphtKr
Copy link
Collaborator

SphtKr commented Feb 10, 2015

self may be easy or not ... For the top-level, is it simply sufficient to return the link at which the resource was accessed? I'm not sure how easy it is to reverse-resolve the URL--especially in a canonical fashion--for any given object. We could add something like LinkTemplate on a class, which might be the way we have to go to enable reliable self links in each resource.

@SphtKr
Copy link
Collaborator

SphtKr commented Feb 10, 2015

Oh, and I love the idea of pagination and it should be fairly simple to support the same way as we do filtering... I have yet to see how Ember Data is going to leverage paging at all though. They'd have to make promise chunks and provide some kind of API that would be used by a scrolling table component or something.

@csantero
Copy link
Collaborator Author

Yeah I don't know how paging is meant to work in ember data either. But one can always make a raw AJAX request against the API and use store.pushMany().

I think we can milestone this for after 0.4.0.

@csantero csantero added this to the 1.0.0 milestone Feb 19, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants