-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix issue 383 - Wrong sync API deserialization
* adjust models to match sync API response for deserialization * add runtime type resolution support, adjust method descriptions
- Loading branch information
Showing
12 changed files
with
182 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
using System.Collections.Generic; | ||
|
||
namespace Kontent.Ai.Delivery.Abstractions; | ||
|
||
/// <summary> | ||
/// Represents a delta update. | ||
/// </summary> | ||
public interface ISyncItemData : IContentItem | ||
{ | ||
/// <summary> | ||
/// Retrieves key:value pairs representing content item elements. | ||
/// </summary> | ||
Dictionary<string, object> Elements { get; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 37 additions & 11 deletions
48
Kontent.Ai.Delivery.Tests/Fixtures/DeliveryClient/sync.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,48 @@ | ||
{ | ||
"items": [ | ||
{ | ||
"codename": "hello_world", | ||
"id": "7adfb82a-1386-4228-bcc2-45073a0355f6", | ||
"type": "article", | ||
"language": "default", | ||
"collection": "default", | ||
"data": { | ||
"system": { | ||
"codename": "hello_world", | ||
"name": "Hello world!", | ||
"id": "7adfb82a-1386-4228-bcc2-45073a0355f6", | ||
"type": "article", | ||
"language": "default", | ||
"collection": "default", | ||
"workflow_step": "published" | ||
}, | ||
"elements": { | ||
"title": { | ||
"type": "text", | ||
"name": "Title", | ||
"value": "Hello world!" | ||
} | ||
} | ||
}, | ||
"change_type": "changed", | ||
"timestamp": "2022-10-06T08:38:40.0088127Z" | ||
}, | ||
{ | ||
"codename": "bye__world", | ||
"id": "42a3cfbd-4967-43e7-987b-e1e69c483e26", | ||
"type": "article", | ||
"language": "default", | ||
"collection": "default", | ||
"data": { | ||
"system": { | ||
"codename": "bye_world", | ||
"name": "Bye world!", | ||
"id": "42a3cfbd-4967-43e7-987b-e1e69c483e26", | ||
"type": "article", | ||
"language": "default", | ||
"collection": "default", | ||
"workflow_step": "published" | ||
}, | ||
"elements": { | ||
"title": { | ||
"type": "text", | ||
"name": "Title", | ||
"value": "Bye world!" | ||
} | ||
} | ||
}, | ||
"change_type": "deleted", | ||
"timestamp": "2022-10-06T08:38:47.3613558Z" | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.