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

Specification next/previous modelled as lists #21

Closed
darobin opened this issue Aug 7, 2015 · 3 comments
Closed

Specification next/previous modelled as lists #21

darobin opened this issue Aug 7, 2015 · 3 comments
Assignees

Comments

@darobin
Copy link
Member

darobin commented Aug 7, 2015

Currently, the JSON returns for next and previous on specifications are modelled as lists. This may be correct (though I can't find examples) but it's hard to guess since before of #20 they show up as scalars anyway.

If there is only ever one prev/next, these should be exposed as scalars directly and not a pageable result.

If they are meant to be exposed as lists, then it would be very nice if the field name in the list results' _link were called next and previous instead of the current versions. In most of the rest of the API, there is a mapping there, but not here. That means ad hoc code to access these specific fields.

Similar questions apply to supersede(d|s).

@deniak deniak self-assigned this Aug 11, 2015
@deniak
Copy link
Member

deniak commented Aug 11, 2015

It's not common but when you have a specification splits or merges, next and previous will have multiple items, e.g. https://api-test.w3.org/specifications/CSS2/versions/20090423/previous and https://api-test.w3.org/specifications/XMLHttpRequest/superseeds.

I'll rename the fields in the results list.

@deniak
Copy link
Member

deniak commented Aug 11, 2015

@darobin the fix is now deployed

@darobin
Copy link
Member Author

darobin commented Aug 12, 2015

Verified and shipped a new version to match. Thanks!

@darobin darobin closed this as completed Aug 12, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants