Http-mock and JSONAPI


#1

Hi!
I would like to use http-mock to test my JSONAPI implementation.
I created correctly with ember-cli the resource I want to serve, let’s say bands. I created actually 3 example objects inside a variable called bands. So for the list of objects I have:

  bandsRouter.get('/', function(req, res) {
    res.send({
      'bands': bands
    });
  });

To have the dynamic segment of the URL responded well, I am dubious about the default response provided by http-mock that is:

  bandsRouter.get('/:id', function(req, res) {
    res.send({
      'bands': {
        id: req.params.id
      }
    });
  });

The structure here seems to be not ready out-of-the-box to work with JSONAPI which should be the default. How to achieve that?

Thank you!