-
-
Notifications
You must be signed in to change notification settings - Fork 66
Open
Labels
Description
Is your feature request related to a problem? Please describe.
Allow id field to be set outside the attributes object.
In the main API I operate, idempotence on create is handled by just setting the id of the resource. It's one of the joys of using UUIDs. Ash currently works with this:
{
"data": {
"attributes": {
"id": "d67fc7b1-24d1-4c3a-9129-97ece194cbc8"
}
}
}But not this:
{
"data": {
"id": "d67fc7b1-24d1-4c3a-9129-97ece194cbc8"
}Describe the solution you'd like
Simply accept id as a direct child of data. (I would say if the client provided it in two spots, an error is returned rather than argue about which has precedence.)
Express the feature either with a change to resource syntax, or with a change to the resource interface
Accepting IDs shouldn't require any actual DSL unless you wanted to support returning errors on id being a direct child of data.