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

Updating documentation with the default expected API responses. #3257

Open
stefek99 opened this issue Jun 8, 2015 · 7 comments
Open

Updating documentation with the default expected API responses. #3257

stefek99 opened this issue Jun 8, 2015 · 7 comments
Labels
🏷️ doc This PR adds/improves/or fixes documentation

Comments

@stefek99
Copy link

stefek99 commented Jun 8, 2015

I've found this question on SO greatly informative: http://stackoverflow.com/questions/14922623/what-is-the-complete-list-of-expected-json-responses-for-ds-restadapter

ember response

For instance - I didn't know (until I saw that table) that editing model creates PUT request that expects the actual object in response.

  • returning 200 OK with no data is causing parsing error
  • returning 202 Accepted or 204 NoContent seems to be working fine

Is that information somewhere in the docs already?

@fivetanley
Copy link
Member

I think @bmac would be able to point you in the right direction here. I don't know if he has it in his guides updates.

@bmac
Copy link
Member

bmac commented Jun 8, 2015

This info looks great @stefek99. I don't think it exits in any one place in the guides. The table on the the-rest-adapter guide is the closest thing that I know of, however it doesn't have nearly this level of information.

@stefek99
Copy link
Author

stefek99 commented Jun 9, 2015

Thank you for your input.

One thing that I've discovered after 3 weeks of deep dive into Ember and Ember CLI and Ember Data - plenty of jsfiddle / jsbin examples are not working - people linking to 'latest' versions - and in general it is not a good idea as described here: http://blog.jquery.com/2014/07/03/dont-use-jquery-latest-js/

On the same note - many of the blogpost / StackOverflow answers are no longer accurate.

(feel free to close this issue, I just wanted to let you know about the table with expected responses)

@pete-the-pete
Copy link
Contributor

I started working on this in my fork. My plan is to use this twiddle for reference, and save off the pretender request/response to a Gist, with links to the JSON-API docs (for the json-api adapter and serializer). The gists would be linked to from the table in the YUI docs.

Does this seem like a worthwhile approach? The hard part is presenting an example without addressing too many edge cases. There are so many ways to constructor and use endpoints, it is difficult to what would be a meaningful demonstration.

@bmac
Copy link
Member

bmac commented Jan 23, 2017

Seems like a good idea @pete-the-pete.

@locks
Copy link
Contributor

locks commented Jan 23, 2017

There's http://andycrum.github.io/ember-data-model-maker/, might want to enhance it.

@pete-the-pete
Copy link
Contributor

pete-the-pete commented Jan 25, 2017

whoa, ember-data-model-maker is pretty slick...if supported saving or gists it could be pretty handy for reference

@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
Status: No status
Development

No branches or pull requests

7 participants