Fix inconsistencies in sim-swap-subscriptions.yaml#280
Open
rartych wants to merge 3 commits into
Open
Conversation
- Restore Config schema to its fully-local form (subscriptionDetail, subscriptionExpireTime, subscriptionMaxEvents) instead of extending the shared CAMARA_event_common.yaml Config via allOf, per r3.3. Drop the initialEvent property that only existed via the shared schema and was not part of the local r3.3 Config. - Remove the now-invalid initialEvent: true from the Subscription schema's inline example, and fix that same example's subscriptionDetail.device.phoneNumber nesting to the flat subscriptionDetail.phoneNumber shape defined by CreateSubscriptionDetail, consistent with every other example in the file. - Simplify EventSubscriptionStarted/Updated/Ended to directly the shared SubscriptionStarted/Updated/Ended schemas from CAMARA_event_common.yaml, removing the local device/DeviceResponse field injection. That injection deviated from the canonical Commonalities event-subscription template (sample-service-subscriptions.yaml), which references these Commonalities-owned lifecycle payload schemas directly with no local device field.
…iptionEnded payload The SUBSCRIPTION_ENDS example's notification data included a phoneNumber field, but the SubscriptionEnded schema (from CAMARA_event_common.yaml) has never defined that property. SubscriptionEnded only contains: - terminationReason (required) - subscriptionId (required) - terminationDescription (optional) Removed the extraneous phoneNumber line so the example now conforms to the shared schema.
rartych
requested review from
bigludo7,
fernandopradocabrillo and
maxl2287
as code owners
July 24, 2026 12:44
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.
What type of PR is this?
What this PR does / why we need it:
Fixes schema/example drift in
code/API_definitions/sim-swap-subscriptions.yamlaround theConfigschema and the subscription lifecycle event payloads.Configschema: replaced theallOfextension of the sharedCAMARA_event_common.yaml#/components/schemas/Configwith a fully-localConfigschema (subscriptionDetail,subscriptionExpireTime,subscriptionMaxEvents), matching the historicalr3.3definition. The sharedConfigschema also carries aninitialEventproperty that this API does not use; extending it silently pulled that property in. Since the localConfigno longer inheritsinitialEvent, the strayinitialEvent: truewas also removed from theSubscriptionschema's inline example.subscriptionDetailexample nesting: the sameSubscriptionexample incorrectly nestedphoneNumberunder an extradevicekey (subscriptionDetail.device.phoneNumber), which doesn't match theCreateSubscriptionDetailschema (a flatphoneNumberproperty) and was inconsistent with every other example in the file. Corrected tosubscriptionDetail.phoneNumber.EventSubscriptionStarted/Updated/Ended: these previously wrapped the sharedSubscriptionStarted/Updated/Endedpayload schemas in an extraallOfthat injected a localdevice/DeviceResponsefield. Simplified all three to a direct$ref, matching the template.SUBSCRIPTION_ENDSexample: removed the invalidphoneNumberfield from the notification payload underdata. TheSubscriptionEndedschema (fromCAMARA_event_common.yaml) only definesterminationReason,subscriptionId, andterminationDescription; the example now matches the schema exactly.Verified against the
r3.3release tag and the current Commonalities event-subscription template that these are genuine drift/inconsistencies rather than intentional SimSwap-specific extensions.Which issue(s) this PR fixes:
Fixes #279
Special notes for reviewers:
/subscriptionsor/subscriptions/{subscriptionId}path operations, security schemes, or response definitions — this PR is scoped to theConfig,Subscriptionexample, andEventSubscriptionStarted/Updated/Endedschemas only.Configrestoration aligns with the r3.3 release tag.EventSubscriptionStarted/Updated/Endedsimplification aligns with the current Commonalities template (sample-service-subscriptions.yaml) and the r3.3 release tag.SUBSCRIPTION_ENDSexample fix aligns the notification payload with theSubscriptionEndedschema fromCAMARA_event_common.yaml.Validation errors are resolved within #278 (should be merged first).
Changelog input
Additional documentation