Skip to content

Commit

Permalink
Merge pull request #137 from ConductionNL/feature/CONNECTOR-50/endpoi…
Browse files Browse the repository at this point in the history
…nts-object

Add dynamic endpoints
  • Loading branch information
rjzondervan authored Dec 19, 2024
2 parents 772fe63 + f35e9f3 commit c061113
Show file tree
Hide file tree
Showing 11 changed files with 994 additions and 260 deletions.
12 changes: 6 additions & 6 deletions appinfo/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

return [
'resources' => [
'Endpoints' => ['url' => 'api/endpoints'],
'Sources' => ['url' => 'api/sources'],
'Mappings' => ['url' => 'api/mappings'],
'Jobs' => ['url' => 'api/jobs'],
'Synchronizations' => ['url' => 'api/synchronizations'],
'Endpoints' => ['url' => 'api/endpoints'],
'Consumers' => ['url' => 'api/consumers'],
],
'routes' => [
Expand All @@ -24,10 +24,10 @@
['name' => 'mappings#test', 'url' => '/api/mappings/test', 'verb' => 'POST'],
['name' => 'mappings#saveObject', 'url' => '/api/mappings/objects', 'verb' => 'POST'],
['name' => 'mappings#getObjects', 'url' => '/api/mappings/objects', 'verb' => 'GET'],
// Running endpoints
['name' => 'endpoints#run', 'url' => '/api/v1/{endpoint}', 'verb' => 'GET'],
['name' => 'endpoints#run', 'url' => '/api/v1/{endpoint}', 'verb' => 'PUT'],
['name' => 'endpoints#run', 'url' => '/api/v1/{endpoint}', 'verb' => 'POST'],
['name' => 'endpoints#run', 'url' => '/api/v1/{endpoint}', 'verb' => 'DELETE'],
// Running endpoints - allow any path after /api/endpoints/
['name' => 'endpoints#handlePath', 'url' => '/api/endpoint/{_path}', 'verb' => 'GET', 'requirements' => ['_path' => '.+']],
// ['name' => 'endpoints#handlePath', 'url' => '/api/endpoint/{path}', 'verb' => 'PUT', 'requirements' => ['path' => '.+']],
// ['name' => 'endpoints#handlePath', 'url' => '/api/endpoint/{path}', 'verb' => 'POST', 'requirements' => ['path' => '.+']],
// ['name' => 'endpoints#handlePath', 'url' => '/api/endpoint/{path}', 'verb' => 'DELETE', 'requirements' => ['path' => '.+']],
],
];
Loading

0 comments on commit c061113

Please sign in to comment.