Tweaks to the JSON-API generator, and make the example into a proper test case