Skip to content
This repository has been archived by the owner on Mar 3, 2022. It is now read-only.

Add rationale to some guidelines. #40

Open
Koded opened this issue Dec 11, 2014 · 3 comments
Open

Add rationale to some guidelines. #40

Koded opened this issue Dec 11, 2014 · 3 comments

Comments

@Koded
Copy link

Koded commented Dec 11, 2014

I have found this a great resource when defining REST APIs. One small thing.

In the responses section, it is stated that "No values in keys". Whilst I agree with this, and get some way in being able to clearly articulate why, it would be good to ensure that the rationale behind the standard is captured and documented.

@adam-lynch
Copy link

I agree. Why is this a good practice by the way? What if it was an object with each sub-object still containing an id property as well?

@smrgeoinfo
Copy link

Can you provide an example of some JSON for the situation you suggest? In general, I think its a good idea not to put values in keys under the interpretation that they keys are supposed to provide some indication of what the value means.

@adam-lynch
Copy link

@smrgeoinfo It's easier to get something by ID, etc. then. See json-api/json-api#1170 for an example.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants