You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a relationship is provided in the relationships member of the resource object, its value MUST be a relationship object with a data member. The value of this key represents the linkage the new resource is to have.
When inside a POST controller such as: [Route] [HttpPost] public IHttpActionResult Post([FromBody]Delta<MyResource> resourceDelta) {
There is no way to get at the relationships, they are ignored. The UpdateDocument class must include the relationships and in turn they should be accessible through the Delta<>. These are just links, the system should not attempt to automatically load them, it is should assumed that the API implementer knows what to do with these links.
The text was updated successfully, but these errors were encountered:
The not-very-good way around this is to pass the Id of the linked object as another attribute. This would mean that POST and GET would be different and not in the spirit of the json:api but is a workaround until this feature can be implemented.
As per the spec:
When inside a POST controller such as:
[Route] [HttpPost] public IHttpActionResult Post([FromBody]Delta<MyResource> resourceDelta) {
There is no way to get at the relationships, they are ignored. The
UpdateDocument
class must include the relationships and in turn they should be accessible through theDelta<>
. These are just links, the system should not attempt to automatically load them, it is should assumed that the API implementer knows what to do with these links.The text was updated successfully, but these errors were encountered: