Open HeikoTheissen opened 4 weeks ago
Not possible yet, would need some templating mechanism for constructing request bodies.
Any template media types out there that we can reuse?
Introducing a new variant of the OData bind operation may be simpler than introducing a templating mechanism (although the latter could be useful elsewhere). The proposed @bindurl
accepts the same values as the request URL, so you can write:
{
"id": "2",
"dependsOn": ["1"],
"method": "patch",
"url": "$1",
"body": {
"Manager@bindurl": "$1"
}
}
This would not only allow self-references, but also batch requests that create two entities with a reference between them.
How to create an entity with server-generated entity ID that contains at the same time a self-reference? Can this be done with a JSON batch request?
Can the
$1
reference appear in thebody
in this position? The JSON batch specification contains only examples with$1
inurl
orheaders
.