enable deltalink, deltadeletelink in delta resource set
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 505
- Forks
- 186
- PR merge metrics
- No merged PRs in 30d
Description
The only time we should receive a link/deletedLink in a request is a PATCH against a collection, which might look something like this:
PATCH http://host/service/$metadata#Customers
{
{
"@context":"#Customers/$deletedLink",
"source":"Customers('ALFKI')",
"relationship":"Orders",
"target":"Orders(10643)"
},
{
"@context":"#Customers/$link",
"source":"Customers('BOTTM')",
"relationship":"Orders",
"target":"Orders(10645)"
}
}
The above request deletes a link from customer('alfki') to orders(10643) and adds a link from customers('bottm') to orders(10645).
This is using the old syntax for links/deletedLinks. The newer, preferred syntax to represent the same request would look like:
PATCH http://host/service/$metadata#Customers
{
{
"@id":"Customers('ALFKI')",
"Orders@delta" :
[
"@removed": {
"reason":"changed"
},
"@id":"Orders(10643)"
]
},
{
"@id":"Customers('BOTTM')",
"Orders@delta" :
[
"@id":"Orders(10645)"
]
}
}
This second request updates customer('alfki') by adding removing orders(10643) and updates customer('bottm') by adding orders(10645). i.e., it's equivalent (but more general than) the first (legacy) scenario.
We should have a common way of representing both the above requests to the WebAPI developer. I don't want the WebAPI developer to have different code to deal with the legacy syntax versus the new syntax – in the object model, the legacy scenario should be handled by the general object model.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how the delta resource set represents legacy links and deletedLinks versus the newer @delta representation. Identify the object-model boundary exposed to WebAPI developers and determine how both request forms can produce the same link updates. Done means the legacy scenario is handled through the general object model without separate developer-facing code.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- api, backend-api-design
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100