Provide Ember Data REST endpoint for easy example creation


#1

I wanted to scaffold a small Ember Data example in JSFiddle/JS Bin which utilizes RESTAdapter. It turned out to be not as easy as expected: I couldn’t find a public API endpoint that follows Ember Data’s conventions.

Is there

  • an Ember Data JS Bin/JSFiddle template which includes a working REST adapter, that the community can use to start developing Ember Data samples?
  • a public REST endpoint that can be easily used for Ember Data examples? I tried GitHub’s REST API (e.g. https://api.github.com/orgs/emberjs/repos ), but it doesn’t seem to follow Ember Data’s expected conventions.

What about serving a simple poster child REST endpoint for use in samples? An endpoint such as //discuss.emberjs.com/api comes to my mind.


#2

Take a look at http://emberjs.com/guides/models/the-fixture-adapter/


#3

@billybonks I think that @abdull was suggesting that an external, publicly available REST endpoint would be useful for working out issues that arise with the REST adapter only (i.e. where the issue doesn’t present itself when using the fixture adapter).


#4

Take a look at Fortune.js (a framework for prototyping hypermedia APIs) You can get a working a example pretty quickly. It conforms to JSON API out of the box.


#5

Fortune.js is great, but the problem is that ember-data does not follow the JSON API conventions. Thus a custom adapter is needed to actually make it work:


#6

If you use EAK maybe the api-stub will work.