Skip to content

Comments

Update API and municipality code format#100

Draft
mhieta wants to merge 3 commits intomainfrom
RATYK-163/municipality-code-updates
Draft

Update API and municipality code format#100
mhieta wants to merge 3 commits intomainfrom
RATYK-163/municipality-code-updates

Conversation

@mhieta
Copy link
Contributor

@mhieta mhieta commented Feb 23, 2026

Updates:

  • BREAKING CHANGE: Detail endpoints removed for address, municipality and postal code area resources. Clients must use list endpoints with filters instead of retrieving resources by ID.
  • Convert municipality codes from integers to 3-character strings with leading zeros to ensure proper representation and consistency across the codebase.
  • Add municipality filter parameters to MunicipalityViewSet with OpenAPI documentation

Refs: RATYK-158, RATYK-163

Convert municipality codes from integers to 3-character strings
with leading zeros to ensure proper representation and
consistency across the codebase.

Changes:
- Update MUNICIPALITIES constant to use 3-char string codes
  (e.g., 91 → "091")
- Modify municipality and address import services to convert
  codes using str(int(code)).zfill(3)
- Update all factories and tests to use 3-character string
  codes consistently

Refs: RATYK-163
- Add municipality filter parameters to MunicipalityViewSet
  with OpenAPI documentation
- Add comprehensive tests for municipality filtering by name
  and code

Refs: RATYK-163
BREAKING CHANGE: Detail endpoints removed for address,
municipality and postal code area resources. Clients must
use list endpoints with filters instead of retrieving
resources by ID.

Remove retrieve/detail endpoints from AddressViewSet,
MunicipalityViewSet and PostalCodeAreaViewSet, leaving
only the list endpoint available for each resource.

Update postal code area translation test to use list
endpoint with postalcode filter instead of detail
endpoint.

Refs: RATYK-158
@sonarqubecloud
Copy link

@azure-pipelines
Copy link

PAIKKATIETOHAKU-API branch is deployed to platta: https://paikkatietohaku-api-pr100.api.dev.hel.ninja 🚀🚀🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant