[WIP] Add postal code search endpoint and controller integration

Introduced a new API endpoint `/api/1.0/main/address-reference/postal-code/search` for searching postal codes matching a query string. Implemented `PostalCodeForAddressReferenceApiController` to handle requests and integrated with `PostalCodeForAddressReferenceRepository`. Enhanced repository to include `country_name` in results by decoding JSON data. Updated API specifications accordingly.
This commit is contained in:
2025-08-15 23:38:12 +02:00
parent 34b3e290e1
commit aad9c984b1
3 changed files with 69 additions and 1 deletions

View File

@@ -51,7 +51,9 @@ final readonly class PostalCodeForAddressReferenceRepository implements PostalCo
$result = $qb->executeQuery();
return $result->iterateAssociative();
foreach ($result->iterateAssociative() as $row) {
yield [...$row, 'country_name' => json_decode($row['country_name'], true, 512, JSON_THROW_ON_ERROR)];
}
}
private function buildTermsFromSearchString(string $search): array