-
-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Client provided id
handling changes
#276
Comments
I'd also like to add, there are a bunch of open issues for JSON:API. If any make sense to handle while I'm looking at my own pet peeves, lemme know. I'm going to try to work on the docs as I get through this stuff too. |
That would be fine to me. There may be some potential difficulty implementing it, as currently the error struct is the same when a value conflicts vs when a value is invalid for some other reason. So this may involve a change to ash core, and potentially in Please break the the Both of these make sense to me to support, PRs welcome. |
The id one is probably pretty easy :) If we get different values for |
I think we can match on something other than the struct type though, right? I think first I just add the escape hatch you proposed in #277 (that would solve this) and then we consider if there really needs to be any other behavior anyway.
Any issue just keeping it here since I think #277 solves my other issue? We can refine on or after those submissions and use that to create to default behaviors so everyone doesn't have to reinvent the wheel. |
Sure, can we put the details from here on 409 errors into that other issue then? |
Is your feature request related to a problem? Please describe.
Allow
id
field to be set outside theattributes
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:But not this:
Describe the solution you'd like
Simply accept
id
as a direct child ofdata
. (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 ofdata
.The text was updated successfully, but these errors were encountered: