From 28ad220c5cd26e5528c8f7a9d51b25faa0255b9b Mon Sep 17 00:00:00 2001 From: Ruben van der Linde Date: Thu, 5 Nov 2026 23:48:52 +0100 Subject: [PATCH 1/4] docs(objects): no closing PHP tag in the counts() doc comment The sequence in `` ended the PHP block for lizard, so gate 122 read none of the 74 units below counts(). Those units are measured from here on. Assisted-by: ClaudeCode:claude-opus-5-5 --- lib/Controller/ObjectsController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Controller/ObjectsController.php b/lib/Controller/ObjectsController.php index a01fbab6c829..d80ac63dc376 100644 --- a/lib/Controller/ObjectsController.php +++ b/lib/Controller/ObjectsController.php @@ -2127,7 +2127,7 @@ private function indexFromObjectService(array $listing, ObjectOperationsInterfac * Batched object-count endpoint — POST /api/objects/counts. * * Accepts a JSON body of the shape - * `{ "counts": [ { "register": , "schema": , "filter": } ] }` + * `{ "counts": [ { "register": , "schema": , "filter": } ] }` * and returns `{ "results": [ { "register": ..., "schema": ..., "count": } ] }` * with exactly one result per input entry, in the same order as the * request array. Identical `(register, schema, filter)` triples are From 4549ad8e000b2adcbfd86f838967e34c09e1c155 Mon Sep 17 00:00:00 2001 From: Ruben van der Linde Date: Fri, 6 Nov 2026 00:10:06 +0100 Subject: [PATCH 2/4] test(objects): pin how ObjectsController stamps urls on relation records Assisted-by: ClaudeCode:claude-opus-5-5 --- ...bjectsControllerRelationUrlsGoldenTest.php | 169 ++++++ .../objects-relation-urls-golden.json | 509 ++++++++++++++++++ 2 files changed, 678 insertions(+) create mode 100644 tests/Unit/Controller/ObjectsControllerRelationUrlsGoldenTest.php create mode 100644 tests/Unit/Controller/fixtures/objects-relation-urls-golden.json diff --git a/tests/Unit/Controller/ObjectsControllerRelationUrlsGoldenTest.php b/tests/Unit/Controller/ObjectsControllerRelationUrlsGoldenTest.php new file mode 100644 index 000000000000..13d7cc158512 --- /dev/null +++ b/tests/Unit/Controller/ObjectsControllerRelationUrlsGoldenTest.php @@ -0,0 +1,169 @@ + */ + private array $calls = []; + + /** @var array|null */ + private static ?array $recorded = null; + + /** @var array */ + private static array $golden = []; + + /** + * @return array}> + */ + public static function cases(): array { + $row = ['title' => 't', '@self' => ['id' => 'u1', 'register' => 1, 'schema' => '2']]; + $flat = ['id' => 'u2', '@self' => ['register' => '3', 'schema' => 4]]; + return [ + 'no results key' => [['result' => ['total' => 0]]], + 'results not an array' => [['result' => ['results' => 'x']]], + 'no resolver' => [['resolver' => 'none', 'result' => ['results' => [$row]]]], + 'resolved' => [['resolver' => 'url', 'result' => ['results' => [$row], 'total' => 1]]], + 'id outside @self' => [['resolver' => 'url', 'result' => ['results' => [$flat]]]], + 'row keeps its own keys' => [['resolver' => 'url', 'result' => ['results' => ['k' => $row + ['register' => 'x', 'uuid' => 'y', 'url' => 'old']]]]], + 'no id' => [['resolver' => 'url', 'result' => ['results' => [['@self' => ['register' => 1, 'schema' => 2]]]]]], + 'text register' => [['resolver' => 'url', 'result' => ['results' => [['@self' => ['id' => 'u', 'register' => 'r', 'schema' => 2]]]]]], + 'text schema' => [['resolver' => 'url', 'result' => ['results' => [['@self' => ['id' => 'u', 'register' => 1, 'schema' => 's']]]]]], + 'no @self' => [['resolver' => 'url', 'result' => ['results' => [['id' => 'u']]]]], + 'scalar rows' => [['resolver' => 'url', 'result' => ['results' => ['a', 5, null]]]], + 'route fallback' => [['resolver' => 'null', 'result' => ['results' => [$row]]]], + 'no url at all' => [['resolver' => 'null', 'generator' => 'none', 'result' => ['results' => [$row]]]], + 'resolver throws' => [['resolver' => 'throw', 'result' => ['results' => [$row, $flat]]]], + 'generator throws' => [['resolver' => 'null', 'generator' => 'throw', 'result' => ['results' => [$row]]]], + 'serializable row' => [['resolver' => 'url', 'serializable' => $row, 'result' => ['results' => []]]], + 'row serializing to text stays' => [['resolver' => 'url', 'serializable' => 'text', 'result' => ['results' => []]]], + 'plain object stays' => [['resolver' => 'url', 'plain' => true, 'result' => ['results' => []]]], + ]; + } + + #[DataProvider('cases')] + public function testStampedEnvelopeMatchesTheRecording(array $case): void { + $this->calls = []; + $result = $case['result']; + if (array_key_exists('serializable', $case) === true) { + $result['results'][] = new class($case['serializable']) implements JsonSerializable { + public function __construct(private mixed $value) { + } + + public function jsonSerialize(): mixed { + return $this->value; + } + }; + } + + if (isset($case['plain']) === true) { + $result['results'][] = (object)['kept' => true]; + } + + $actual = $this->stamp( + linkedData: new LinkedDataServices( + deepLinkRegistry: $this->resolver(mode: $case['resolver'] ?? 'url'), + relationUrlGenerator: $this->generator(mode: $case['generator'] ?? 'url') + ), + result: $result + ); + + $this->compare(key: $this->dataName(), actual: ['calls' => $this->calls, 'result' => $actual]); + } + + private function resolver(string $mode): ?DeepLinkRegistryService { + if ($mode === 'none') { + return null; + } + + $resolver = $this->createMock(DeepLinkRegistryService::class); + $resolver->method('resolveUrl')->willReturnCallback(function (int $registerId, int $schemaId, array $objectData) use ($mode): ?string { + $this->calls[] = ['resolveUrl' => [$registerId, $schemaId, $objectData, array_keys($objectData)]]; + if ($mode === 'throw') { + throw new RuntimeException('no resolver'); + } + + if ($mode === 'null') { + return null; + } + + return 'https://app/' . $registerId . '/' . $schemaId; + }); + return $resolver; + } + + private function generator(string $mode): ?IURLGenerator { + if ($mode === 'none') { + return null; + } + + $generator = $this->createMock(IURLGenerator::class); + $generator->method('linkToRoute')->willReturnCallback(function (string $route, array $parameters) use ($mode): string { + $this->calls[] = ['linkToRoute' => [$route, $parameters]]; + if ($mode === 'throw') { + throw new RuntimeException('no route'); + } + + return 'https://route/' . $parameters['id']; + }); + return $generator; + } + + private function stamp(LinkedDataServices $linkedData, array $result): array { + $logger = $this->createMock(LoggerInterface::class); + $logger->method('debug')->willReturnCallback(function (string|\Stringable $message): void { + $this->calls[] = ['debug' => (string)$message]; + }); + + $reflection = new ReflectionClass(ObjectsController::class); + $controller = $reflection->newInstanceWithoutConstructor(); + $reflection->getProperty('linkedData')->setValue($controller, $linkedData); + $reflection->getProperty('logger')->setValue($controller, $logger); + return $reflection->getMethod('stampObjectUrls')->invoke($controller, $result); + } + + private function compare(string $key, mixed $actual): void { + $actual = json_decode((string)json_encode($actual), true); + if (getenv('UPDATE_GOLDEN') === '1') { + self::$recorded ??= []; + self::$recorded[$key] = $actual; + ksort(self::$recorded); + file_put_contents(self::FIXTURE, json_encode(self::$recorded, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) . "\n"); + self::$golden = self::$recorded; + } + + if (self::$golden === []) { + self::$golden = json_decode((string)file_get_contents(self::FIXTURE), true); + } + + $this->assertArrayHasKey($key, self::$golden); + $this->assertSame(self::$golden[$key], $actual); + } +} diff --git a/tests/Unit/Controller/fixtures/objects-relation-urls-golden.json b/tests/Unit/Controller/fixtures/objects-relation-urls-golden.json new file mode 100644 index 000000000000..1bbda51c9fd2 --- /dev/null +++ b/tests/Unit/Controller/fixtures/objects-relation-urls-golden.json @@ -0,0 +1,509 @@ +{ + "generator throws": { + "calls": [ + { + "resolveUrl": [ + 1, + 2, + { + "title": "t", + "@self": { + "id": "u1", + "register": 1, + "schema": "2" + }, + "uuid": "u1", + "id": "u1", + "register": 1, + "schema": "2" + }, + [ + "title", + "@self", + "uuid", + "id", + "register", + "schema" + ] + ] + }, + { + "linkToRoute": [ + "openregister.objects.show", + { + "register": 1, + "schema": "2", + "id": "u1" + } + ] + }, + { + "debug": "Relation URL resolution failed: no route" + } + ], + "result": { + "results": [ + { + "title": "t", + "@self": { + "id": "u1", + "register": 1, + "schema": "2" + } + } + ] + } + }, + "id outside @self": { + "calls": [ + { + "resolveUrl": [ + 3, + 4, + { + "id": "u2", + "@self": { + "register": "3", + "schema": 4 + }, + "uuid": "u2", + "register": "3", + "schema": 4 + }, + [ + "id", + "@self", + "uuid", + "register", + "schema" + ] + ] + } + ], + "result": { + "results": [ + { + "id": "u2", + "@self": { + "register": "3", + "schema": 4 + }, + "url": "https://app/3/4" + } + ] + } + }, + "no @self": { + "calls": [], + "result": { + "results": [ + { + "id": "u" + } + ] + } + }, + "no id": { + "calls": [], + "result": { + "results": [ + { + "@self": { + "register": 1, + "schema": 2 + } + } + ] + } + }, + "no resolver": { + "calls": [], + "result": { + "results": [ + { + "title": "t", + "@self": { + "id": "u1", + "register": 1, + "schema": "2" + } + } + ] + } + }, + "no results key": { + "calls": [], + "result": { + "total": 0 + } + }, + "no url at all": { + "calls": [ + { + "resolveUrl": [ + 1, + 2, + { + "title": "t", + "@self": { + "id": "u1", + "register": 1, + "schema": "2" + }, + "uuid": "u1", + "id": "u1", + "register": 1, + "schema": "2" + }, + [ + "title", + "@self", + "uuid", + "id", + "register", + "schema" + ] + ] + } + ], + "result": { + "results": [ + { + "title": "t", + "@self": { + "id": "u1", + "register": 1, + "schema": "2" + } + } + ] + } + }, + "plain object stays": { + "calls": [], + "result": { + "results": [ + { + "kept": true + } + ] + } + }, + "resolved": { + "calls": [ + { + "resolveUrl": [ + 1, + 2, + { + "title": "t", + "@self": { + "id": "u1", + "register": 1, + "schema": "2" + }, + "uuid": "u1", + "id": "u1", + "register": 1, + "schema": "2" + }, + [ + "title", + "@self", + "uuid", + "id", + "register", + "schema" + ] + ] + } + ], + "result": { + "results": [ + { + "title": "t", + "@self": { + "id": "u1", + "register": 1, + "schema": "2" + }, + "url": "https://app/1/2" + } + ], + "total": 1 + } + }, + "resolver throws": { + "calls": [ + { + "resolveUrl": [ + 1, + 2, + { + "title": "t", + "@self": { + "id": "u1", + "register": 1, + "schema": "2" + }, + "uuid": "u1", + "id": "u1", + "register": 1, + "schema": "2" + }, + [ + "title", + "@self", + "uuid", + "id", + "register", + "schema" + ] + ] + }, + { + "debug": "Relation URL resolution failed: no resolver" + }, + { + "resolveUrl": [ + 3, + 4, + { + "id": "u2", + "@self": { + "register": "3", + "schema": 4 + }, + "uuid": "u2", + "register": "3", + "schema": 4 + }, + [ + "id", + "@self", + "uuid", + "register", + "schema" + ] + ] + }, + { + "debug": "Relation URL resolution failed: no resolver" + } + ], + "result": { + "results": [ + { + "title": "t", + "@self": { + "id": "u1", + "register": 1, + "schema": "2" + } + }, + { + "id": "u2", + "@self": { + "register": "3", + "schema": 4 + } + } + ] + } + }, + "results not an array": { + "calls": [], + "result": { + "results": "x" + } + }, + "route fallback": { + "calls": [ + { + "resolveUrl": [ + 1, + 2, + { + "title": "t", + "@self": { + "id": "u1", + "register": 1, + "schema": "2" + }, + "uuid": "u1", + "id": "u1", + "register": 1, + "schema": "2" + }, + [ + "title", + "@self", + "uuid", + "id", + "register", + "schema" + ] + ] + }, + { + "linkToRoute": [ + "openregister.objects.show", + { + "register": 1, + "schema": "2", + "id": "u1" + } + ] + } + ], + "result": { + "results": [ + { + "title": "t", + "@self": { + "id": "u1", + "register": 1, + "schema": "2" + }, + "url": "https://route/u1" + } + ] + } + }, + "row keeps its own keys": { + "calls": [ + { + "resolveUrl": [ + 1, + 2, + { + "title": "t", + "@self": { + "id": "u1", + "register": 1, + "schema": "2" + }, + "register": 1, + "uuid": "u1", + "url": "old", + "id": "u1", + "schema": "2" + }, + [ + "title", + "@self", + "register", + "uuid", + "url", + "id", + "schema" + ] + ] + } + ], + "result": { + "results": { + "k": { + "title": "t", + "@self": { + "id": "u1", + "register": 1, + "schema": "2" + }, + "register": "x", + "uuid": "y", + "url": "https://app/1/2" + } + } + } + }, + "row serializing to text stays": { + "calls": [], + "result": { + "results": [ + "text" + ] + } + }, + "scalar rows": { + "calls": [], + "result": { + "results": [ + "a", + 5, + null + ] + } + }, + "serializable row": { + "calls": [ + { + "resolveUrl": [ + 1, + 2, + { + "title": "t", + "@self": { + "id": "u1", + "register": 1, + "schema": "2" + }, + "uuid": "u1", + "id": "u1", + "register": 1, + "schema": "2" + }, + [ + "title", + "@self", + "uuid", + "id", + "register", + "schema" + ] + ] + } + ], + "result": { + "results": [ + { + "title": "t", + "@self": { + "id": "u1", + "register": 1, + "schema": "2" + }, + "url": "https://app/1/2" + } + ] + } + }, + "text register": { + "calls": [], + "result": { + "results": [ + { + "@self": { + "id": "u", + "register": "r", + "schema": 2 + } + } + ] + } + }, + "text schema": { + "calls": [], + "result": { + "results": [ + { + "@self": { + "id": "u", + "register": 1, + "schema": "s" + } + } + ] + } + } +} From 9f2470886209d093b1b586622548e39188cc8ff2 Mon Sep 17 00:00:00 2001 From: Ruben van der Linde Date: Fri, 6 Nov 2026 00:11:27 +0100 Subject: [PATCH 3/4] refactor(objects): RelationUrlStamper stamps relation records, in units of 15 lines or fewer Assisted-by: ClaudeCode:claude-opus-5-5 --- lib/Controller/ObjectsController.php | 69 +------ lib/Controller/Support/RelationUrlStamper.php | 171 ++++++++++++++++++ ...bjectsControllerRelationUrlsGoldenTest.php | 1 + 3 files changed, 174 insertions(+), 67 deletions(-) create mode 100644 lib/Controller/Support/RelationUrlStamper.php diff --git a/lib/Controller/ObjectsController.php b/lib/Controller/ObjectsController.php index d80ac63dc376..4435892ed071 100644 --- a/lib/Controller/ObjectsController.php +++ b/lib/Controller/ObjectsController.php @@ -34,6 +34,7 @@ use OCA\OpenRegister\Controller\Support\LinkedDataServices; use OCA\OpenRegister\Controller\Support\GeoServices; use OCA\OpenRegister\Controller\Support\ObjectsControllerServices; +use OCA\OpenRegister\Controller\Support\RelationUrlStamper; use OCA\OpenRegister\Controller\Trait\ResolvesRegisterAndSchemaTrait; use OCA\OpenRegister\Db\AuditTrailMapperInterface; use OCA\OpenRegister\Db\ObjectEntity; @@ -4893,73 +4894,7 @@ public function contracts(string $id, string $register, string $schema, ObjectOp * @return array The same envelope with `url` stamped on each resolvable record. */ private function stampObjectUrls(array $result): array { - if ($this->linkedData->deepLinkRegistry === null - || isset($result['results']) === false - || is_array($result['results']) === false - ) { - return $result; - } - - foreach ($result['results'] as $index => $record) { - // Normalise entities to their serialized array form. - if (is_object($record) === true && method_exists($record, 'jsonSerialize') === true) { - $record = $record->jsonSerialize(); - } - - if (is_array($record) === false) { - continue; - } - - $self = ($record['@self'] ?? []); - $uuid = ($self['id'] ?? ($record['id'] ?? null)); - $registerId = ($self['register'] ?? null); - $schemaId = ($self['schema'] ?? null); - - if ($uuid === null || is_numeric($registerId) === false || is_numeric($schemaId) === false) { - $result['results'][$index] = $record; - continue; - } - - try { - $flat = array_merge( - $record, - [ - 'uuid' => $uuid, - 'id' => $uuid, - 'register' => $registerId, - 'schema' => $schemaId, - ] - ); - - $url = $this->linkedData->deepLinkRegistry->resolveUrl( - registerId: (int)$registerId, - schemaId: (int)$schemaId, - objectData: $flat - ); - - if ($url === null && $this->linkedData->relationUrlGenerator !== null) { - $url = $this->linkedData->relationUrlGenerator->linkToRoute( - 'openregister.objects.show', - [ - 'register' => $registerId, - 'schema' => $schemaId, - 'id' => $uuid, - ] - ); - } - - if ($url !== null) { - $record['url'] = $url; - } - } catch (\Throwable $e) { - // Defensive: never let URL resolution break the relation response. - $this->logger->debug('Relation URL resolution failed: ' . $e->getMessage()); - }//end try - - $result['results'][$index] = $record; - }//end foreach - - return $result; + return (new RelationUrlStamper(linkedData: $this->linkedData, logger: $this->logger))->stamped(result: $result); }//end stampObjectUrls() /** diff --git a/lib/Controller/Support/RelationUrlStamper.php b/lib/Controller/Support/RelationUrlStamper.php new file mode 100644 index 000000000000..87a5a2b204fc --- /dev/null +++ b/lib/Controller/Support/RelationUrlStamper.php @@ -0,0 +1,171 @@ + + * @copyright 2026 Conduction B.V. + * @license EUPL-1.2 https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12 + * + * @version GIT: + * + * @link https://www.OpenRegister.nl + */ + +declare(strict_types=1); + +namespace OCA\OpenRegister\Controller\Support; + +use Psr\Log\LoggerInterface; + +/** + * Stamps the url an object opens at on each record of a relation envelope. + * + * Asks the deep link registry, the resolver the unified-search provider uses, + * and falls back to OpenRegister's own object route. A failure omits the url + * of that record and leaves the record itself as it is. + * + * @spec openspec/specs/object-interactions/spec.md + */ +final class RelationUrlStamper { + + /** + * Constructor. + * + * @param LinkedDataServices $linkedData The deep link registry and url generator. + * @param LoggerInterface $logger The logger. + * + * @return void + */ + public function __construct( + private readonly LinkedDataServices $linkedData, + private readonly LoggerInterface $logger, + ) { + }//end __construct() + + /** + * The envelope with a url on each record that has one. + * + * @param array $result The relation envelope ({results, total, ...}). + * + * @return array The envelope, its serializable records as arrays. + * + * @spec openspec/specs/object-interactions/spec.md + */ + public function stamped(array $result): array { + if ($this->linkedData->deepLinkRegistry === null || is_array($result['results'] ?? null) === false) { + return $result; + } + + foreach ($result['results'] as $index => $record) { + $row = $this->rowOf(record: $record); + if ($row !== null) { + $result['results'][$index] = $this->stampedRow(row: $row); + } + } + + return $result; + }//end stamped() + + /** + * A record as an array. + * + * @param mixed $record The record: an array, or an entity that serializes. + * + * @return array|null The row, or null for anything else. + */ + private function rowOf(mixed $record): ?array { + if (is_object($record) === true && method_exists($record, 'jsonSerialize') === true) { + $record = $record->jsonSerialize(); + } + + if (is_array($record) === true) { + return $record; + } + + return null; + }//end rowOf() + + /** + * A row with its url, when it identifies an object and a url resolves. + * + * @param array $row The row. + * + * @return array The row. + */ + private function stampedRow(array $row): array { + $identity = $this->identityOf(row: $row); + if ($identity === null) { + return $row; + } + + try { + $url = $this->urlOf(row: $row, identity: $identity); + if ($url !== null) { + $row['url'] = $url; + } + } catch (\Throwable $e) { + $this->logger->debug('Relation URL resolution failed: '.$e->getMessage()); + } + + return $row; + }//end stampedRow() + + /** + * The uuid, register and schema of a row. + * + * @param array $row The row. + * + * @return array{uuid: mixed, id: mixed, register: mixed, schema: mixed}|null Null when one is missing. + */ + private function identityOf(array $row): ?array { + $self = ($row['@self'] ?? []); + $uuid = ($self['id'] ?? ($row['id'] ?? null)); + $register = ($self['register'] ?? null); + $schema = ($self['schema'] ?? null); + + if ($uuid === null || is_numeric($register) === false || is_numeric($schema) === false) { + return null; + } + + return ['uuid' => $uuid, 'id' => $uuid, 'register' => $register, 'schema' => $schema]; + }//end identityOf() + + /** + * The url of a row: the registered deep link, or else the object route. + * + * @param array $row The row. + * @param array{uuid: mixed, id: mixed, register: mixed, schema: mixed} $identity The row's identity. + * + * @return string|null The url. + */ + private function urlOf(array $row, array $identity): ?string { + $url = $this->linkedData->deepLinkRegistry->resolveUrl( + registerId: (int)$identity['register'], + schemaId: (int)$identity['schema'], + objectData: array_merge($row, $identity) + ); + + return ($url ?? $this->routeUrl(identity: $identity)); + }//end urlOf() + + /** + * The url of OpenRegister's own object route. + * + * @param array{uuid: mixed, id: mixed, register: mixed, schema: mixed} $identity The row's identity. + * + * @return string|null The url, or null without a url generator. + */ + private function routeUrl(array $identity): ?string { + return $this->linkedData->relationUrlGenerator?->linkToRoute( + 'openregister.objects.show', + ['register' => $identity['register'], 'schema' => $identity['schema'], 'id' => $identity['uuid']] + ); + }//end routeUrl() +}//end class diff --git a/tests/Unit/Controller/ObjectsControllerRelationUrlsGoldenTest.php b/tests/Unit/Controller/ObjectsControllerRelationUrlsGoldenTest.php index 13d7cc158512..6ace6d984ee8 100644 --- a/tests/Unit/Controller/ObjectsControllerRelationUrlsGoldenTest.php +++ b/tests/Unit/Controller/ObjectsControllerRelationUrlsGoldenTest.php @@ -26,6 +26,7 @@ * Set UPDATE_GOLDEN=1 to rewrite the fixture. * * @covers \OCA\OpenRegister\Controller\ObjectsController + * @covers \OCA\OpenRegister\Controller\Support\RelationUrlStamper * @uses \OCA\OpenRegister\Controller\Support\LinkedDataServices */ class ObjectsControllerRelationUrlsGoldenTest extends TestCase { From 17bb3ada249b6dd67fbf797a627be8390a587406 Mon Sep 17 00:00:00 2001 From: Ruben van der Linde Date: Fri, 6 Nov 2026 00:21:18 +0100 Subject: [PATCH 4/4] refactor(objects): keep the import apart from the other Support imports Assisted-by: ClaudeCode:claude-opus-5-5 --- lib/Controller/ObjectsController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Controller/ObjectsController.php b/lib/Controller/ObjectsController.php index 4435892ed071..9554b28b8501 100644 --- a/lib/Controller/ObjectsController.php +++ b/lib/Controller/ObjectsController.php @@ -32,9 +32,9 @@ use OCA\OpenRegister\Controller\Support\ControllerSession; use OCA\OpenRegister\Controller\Support\ObjectGovernanceServices; use OCA\OpenRegister\Controller\Support\LinkedDataServices; +use OCA\OpenRegister\Controller\Support\RelationUrlStamper; use OCA\OpenRegister\Controller\Support\GeoServices; use OCA\OpenRegister\Controller\Support\ObjectsControllerServices; -use OCA\OpenRegister\Controller\Support\RelationUrlStamper; use OCA\OpenRegister\Controller\Trait\ResolvesRegisterAndSchemaTrait; use OCA\OpenRegister\Db\AuditTrailMapperInterface; use OCA\OpenRegister\Db\ObjectEntity;