Open alelom opened 4 years ago
This will be simplified when the fork of SpeckleServer by @PaulPoinet will then implement the right Delta format.
This is done and documented here.
The diffing response (between Revision_A and Revision_B) as specified in the REST API has been implemented here. Calling http://{server.com}/api/streams/{streamId}/delta/{streamId}
produces the following response:
{
"success": true,
"revision_datetime": "2/4/2020, 4:15:41 PM",
"autor": {
"name": "Paul",
"surname": "Poinet",
"_id": "5dfa34188b094663fcd94381",
"email": "poinetp@gmail.com",
"company": "UCL"
},
"delta": {
"created": [530 items],
"deleted": [],
"common": [3401 items]
},
"revision_A": {
"id": "Zt0Jg36lp",
"updatedAt": "2/4/2020, 3:08:00 PM",
"sender": "Grasshopper"
},
"revision_B": {
"id": "F9UVibS-C",
"updatedAt": "2/4/2020, 3:08:00 PM",
"sender": "Grasshopper"
}
}
Description:
Currently Speckle already has an Endpoint to get the diff of two streams. The current response is similar in format to the AEC deltas specification, but it will need to match it exactly.
As a first step, implement a Read that receives the current JSON diff format.
This will be simplified when the fork of SpeckleServer by @PaulPoinet will then implement the right Delta format.
Additional note
As feature requires a way for the user to specify the Stream Revisions to diff, this should be tackled together with https://github.com/BHoM/Speckle_Toolkit/issues/9