-
Notifications
You must be signed in to change notification settings - Fork 16
Update spec according to agreement in Sprint Planning #619
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
a03ba77
e0ac778
42287c8
64d1faf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -784,39 +784,48 @@ components: | |||||||||||||||
| - '278111222' | ||||||||||||||||
| - '278173294' | ||||||||||||||||
| - '234422543' | ||||||||||||||||
| UNLocationCodes: | ||||||||||||||||
| locations: | ||||||||||||||||
| type: array | ||||||||||||||||
| minItems: 1 | ||||||||||||||||
| description: | | ||||||||||||||||
| An array of **UN Location codes** to match with this subscription filter. If the array consists of more than one item - a logical **OR** is used between the values when matching. | ||||||||||||||||
| An array of **UNLocationCode and/or facilitySMDGCode combinations** to match with this subscription filter. If the array consists of more than one item - a logical **OR** is used between the objects when matching. | ||||||||||||||||
|
|
||||||||||||||||
| If this property is empty, you will be notified for all `UNLocationCodes` that have changes you are authorized to see. | ||||||||||||||||
| If this property is empty, you will be notified for all `locations` that have changes you are authorized to see. | ||||||||||||||||
|
||||||||||||||||
| If this property is empty, you will be notified for all `locations` that have changes you are authorized to see. | |
| If this property is omitted, you will be notified for all `locations` that have changes you are authorized to see. |
Copilot
AI
Mar 30, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The locations item schema is an object with no validation to ensure at least one of UNLocationCode or facilitySMDGCode is present, so {} currently satisfies the schema despite the stated condition. Consider encoding the condition with anyOf/oneOf + required (or otherwise enforcing at least one property) to prevent empty objects.
Copilot
AI
Mar 30, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The locations filter item repeats the same UNLocationCode/facilitySMDGCode structure already defined in #/components/schemas/Location (and again in SubscriptionBodyWithSecret). To reduce duplication and keep the two request/response schemas aligned, consider referencing a shared schema (e.g., $ref to Location or a dedicated LocationFilter).
Copilot
AI
Mar 30, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The item schema for locations documents a MUST-condition (“At least one of UNLocationCode and/or facilitySMDGCode MUST be specified”), but the schema does not enforce it (an empty object {} currently validates). Add a schema constraint (e.g., anyOf with required: [UNLocationCode] / required: [facilitySMDGCode], or minProperties: 1) so tooling and validators reflect the documented requirement.
HenrikHL marked this conversation as resolved.
Show resolved
Hide resolved
Copilot
AI
Mar 30, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
locations is defined twice (in Subscription and SubscriptionBodyWithSecret) but only the Subscription variant has minItems: 1. This inconsistency will confuse clients and tooling; align the constraints between the two schemas (and ensure they match the intended ‘empty means all’ semantics).
Copilot
AI
Mar 30, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above: the locations.items schema states a MUST-condition for UNLocationCode/facilitySMDGCode, but the schema does not enforce it, so {} would validate. Add an explicit constraint (anyOf/oneOf with required, or minProperties) so validators and generated clients match the documentation.
| example: ACT | |
| example: ACT | |
| anyOf: | |
| - required: | |
| - UNLocationCode | |
| - required: | |
| - facilitySMDGCode |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change removes the previous
UNLocationCodes/facilitySMDGCodesfilter properties and replaces them withlocations, which is a breaking change for the/subscriptionsrequest and response schemas. If this spec follows SemVer (as indicated by theAPI-Versionheader examples), consider bumping the contract version and/or keeping the old fields as deprecated for backward compatibility.