Skip to content

Commit

Permalink
Merge pull request #92 from ConductionNL/feature/xxllnc-suite-mapping
Browse files Browse the repository at this point in the history
Xxllnc suite config
  • Loading branch information
bbrands02 authored Nov 26, 2024
2 parents 6712f6a + d161898 commit fa2b6ec
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "Xxllnc suite to Publication",
"description": "",
"version": "",
"reference": "",
"mapping": {
"title": "omschrijving",
"summary": "statustoelichting",
"description": "statusomschrijving"
},
"unset": [],
"cast": [],
"passThrough": false
}
20 changes: 20 additions & 0 deletions configurations/sharepoint-woo/sources/xxllnc-suite.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "Xxllnc suite API",
"description": "Xxllnc suite API",
"reference": null,
"version": "0.0.0",
"location": "",
"isEnabled": true,
"type": "api",
"authorizationHeader": null,
"auth": "none",
"authorizationPassthroughMethod": "header",
"authenticationConfig": [],
"configuration": {
"auth.0": "username",
"auth.1": "password"
},
"logRetention": 3600,
"errorRetention": 86400,
"test": false
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "Xxllnc suite to Publications",
"description": "",
"version": "0.0.1",
"sourceId": "1",
"sourceType": "api",
"sourceHash": "",
"sourceTargetMapping": "1",
"sourceConfig": {
"idPosition": "id",
"resultsPosition": "results",
"endpoint": "/tlb/zaaksysteem/api/v1/zaken",
"headers": [],
"query.startdatum__gte": "2024-07-06",
"query.einddatum__lt": "2024-08-01"
},
"targetId": "1/1",
"targetType": "register/schema"
}
2 changes: 1 addition & 1 deletion lib/Service/CallService.php
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ private function sourceRateLimit(Source $source, array $headers): array
*
* @return array The updated config array.
*/
private function applyConfigDot(array $config): array
public function applyConfigDot(array $config): array
{
$dotConfig = new Dot($config);
$unsetKeys = [];
Expand Down
2 changes: 1 addition & 1 deletion lib/Service/SynchronizationService.php
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ public function getAllObjectsFromApi(Synchronization $synchronization, ?bool $is
$source = $this->sourceMapper->find(id: $synchronization->getSourceId());

// Lets get the source config
$sourceConfig = $synchronization->getSourceConfig();
$sourceConfig = $this->callService->applyConfigDot($synchronization->getSourceConfig());
$endpoint = $sourceConfig['endpoint'] ?? '';
$headers = $sourceConfig['headers'] ?? [];
$query = $sourceConfig['query'] ?? [];
Expand Down

0 comments on commit fa2b6ec

Please sign in to comment.