I've noticed when calling new() you're sending a empty string along with the ID attribute. This goes against the specification and causes headaches on servers expecting nothing.
For example, using a Spring boot backend and Mongo as the datastore, saving the payload will result in the object having "" as it's ID, rather than mongo generating a new one.
A server MAY accept a client-generated ID along with a request to create a resource. An ID MUST be specified with an id key, the value of which MUST be a universally unique identifier.
I've noticed when calling new() you're sending a empty string along with the ID attribute. This goes against the specification and causes headaches on servers expecting nothing.
For example, using a Spring boot backend and Mongo as the datastore, saving the payload will result in the object having
""
as it's ID, rather than mongo generating a new one.See http://jsonapi.org/format/#crud-creating, specifically:
A empty string isn't a UUID ;)