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

Improve the API docs for the JSONAPI adapter #4652

Merged
merged 1 commit into from
Nov 21, 2016

Conversation

bmac
Copy link
Member

@bmac bmac commented Nov 14, 2016

No description provided.

@@ -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
Copy link
Contributor

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
Copy link
Contributor

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>

Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

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
*/
Copy link
Member Author

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.

@bmac bmac merged commit a4b7b70 into emberjs:master Nov 21, 2016
@bmac bmac deleted the doc-json-api-adapter branch November 21, 2016 13:33
@runspired runspired added 🏷️ doc This PR adds/improves/or fixes documentation and removed Documentation labels Sep 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ doc This PR adds/improves/or fixes documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants