-
Notifications
You must be signed in to change notification settings - Fork 37
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
Initial implementation to support bulk extension #218
base: master
Are you sure you want to change the base?
Conversation
@joukevandermaas do you think something like this could be a reasonable approach to support the bulk extension? |
@bjornharrtell looks like a good approach. It's not very clear from the examples on the page you linked, but it seems that you should be able to post/patch/delete resources of different types in a single request? That doesn't seem feasible with this solution, because the enumerable has a fixed type in the action method's parameter. Perhaps we could create a type like this: class JsonApiType
{
string Type { get; }
T ConvertTo<T>();
} Then force action methods with |
I don't think it makes sense to support different types, as the bulk extension works explicitly on a specific resource collection? Unrelated, I note that there is a requirement for extension negotiation described at http://springbot.github.io/json-api/extensions/#extension-negotiation. |
Seems I jumped the gun here and that heterogeneous resource collections are indeed supported by JSON-API (although that's a bit of a surprise to me..), at least that's my interpretation of the discussion at json-api/json-api#278. However if Saule currently assumes homogenous resource collections (which I think it does?) I think it's reasonable to have the same limitation here. |
And yet another realization is that this and other extensions have been deprecated (https://jsonapi.org/extensions/#prior-extensions). However, it still does seem quite useful anyway and it doesn't look like the upcoming JSON API 1.1 will include what seemed to be the intended replacement (Operations, json-api/json-api#1254). |
This is an initial spike to implement #215.