-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Improve the API docs for the JSONAPI adapter #4652
Conversation
@@ -9,6 +9,135 @@ import isEnabled from 'ember-data/-private/features'; | |||
import { instrument, deprecate } from 'ember-data/-private/debug'; | |||
|
|||
/** | |||
The `JSONAPIAdapter` is the default adapter used by Ember Data. It is | |||
responsible for transforming the store's requests into HTTP request |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
HTTP requests
## JSON API Conventions | ||
|
||
The JSONAPIAdapter uses JSON API conventions for building the url | ||
for a record and selecting the HTTP verb to use with a request. The |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra whitespace after period.
</td> | ||
</tr> | ||
</table> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra newline?
Failed responses with status code 422 ("Unprocessable Entity") will | ||
be considered "invalid". The response will be discarded, except for | ||
the `errors` key. The request promise will be rejected with a | ||
`DS.InvalidError`. This error object will encapsulate the saved |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra whitespace after period.
`DS.InvalidError`. This error object will encapsulate the saved | ||
`errors` value. | ||
|
||
Any other status codes will be treated as an "adapter error". The |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why the double quotes here and around invalid
?
@param {Array} ids | ||
@param {Array} snapshots | ||
@return {Promise} promise | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The RESTAdapter has better docs for these apis and these minimal doc blocks in the JSONAPIAdapter are preventing the better docs from being rendered. They will still be listed as public on the doc page.
0c63c80
to
55c34ed
Compare
No description provided.