AM-834 construction work: add subtypes#210
Open
fhaver-amsterdam wants to merge 3 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds explicit subtype support for construction-work notifications and removes the previous enum value “rewriting” behavior, so clients can distinguish notification kinds without relying on legacy type strings. Updates validation/serialization and related tests, plus refreshes dependencies and adds Bruno workspace assets.
Changes:
- Add
context.subtype(article/warning) with conditional validation forconstruction-work:article-message. - Stop overwriting construction-work
NotificationType.valueto legacy strings and add regression coverage for legacy stored notifications. - Update construction_work notification sending to include subtype, and refresh locked/exported dependencies.
Reviewed changes
Copilot reviewed 11 out of 13 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| uv.lock | Dependency lockfile updates. |
| requirements.txt | Regenerated pinned requirements export. |
| notification/tests/views/test_notification_views.py | Adds validation + regression tests around construction-work context typing/subtype. |
| notification/serializers/notification_serializers.py | Adds subtype to context serializer and enforces subtype for construction-work:article-message. |
| core/validators.py | Extends JSON schema to allow subtype and require it for construction-work:article-message. |
| core/tests/test_enums.py | Adds test ensuring construction-work notification types are not rewritten. |
| core/enums.py | Removes legacy mapping/rewriting in NotificationType.value. |
| construction_work/utils/patch_utils.py | Updates mocked push payload context to include new type/subtype fields. |
| construction_work/tests/services/test_notification.py | Asserts scheduled notification type/subtype for construction-work warnings. |
| construction_work/tests/etl/test_send_notification.py | Asserts notification type/subtype for construction-work article ETL flow. |
| construction_work/services/notification.py | Builds explicit contexts and sets subtype for article/warning notifications. |
| .bruno-workspace/collections/Extern/MijnAms/All.yml | Adds Bruno request definition for “services/all”. |
| .bruno-workspace/collections/Extern/environments/A.yml | Adds Bruno environment variable placeholder for API key. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds explicit
subtypesupport for construction-work notifications and removes the previous enum value “rewriting” behavior, so clients can distinguish notification kinds without relying on legacy type strings. Updates validation/serialization and related tests, plus refreshes dependencies and adds Bruno workspace assets.Changes:
context.subtype(article/warning) with conditional validation forconstruction-work:article-message.NotificationType.valueto legacy strings and add regression coverage for legacy stored notifications.Affected services
Definition of done
make openapi-diff)make dev)make requirements)- [ ] Infrastructure config updated (aapp_azure_infra)- [ ] Loadtests for relevant endpoints (aapp_testing_loadtests)After PR created (and deployed on dev):
Other notes
GitHub Copilot was used in writing the code