Skip to content

Fix inconsistencies in sim-swap-subscriptions.yaml#280

Open
rartych wants to merge 3 commits into
camaraproject:mainfrom
rartych:fix-subscriptions
Open

Fix inconsistencies in sim-swap-subscriptions.yaml#280
rartych wants to merge 3 commits into
camaraproject:mainfrom
rartych:fix-subscriptions

Conversation

@rartych

@rartych rartych commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

What type of PR is this?

  • correction

What this PR does / why we need it:

Fixes schema/example drift in code/API_definitions/sim-swap-subscriptions.yaml around the Config schema and the subscription lifecycle event payloads.

  • Restore local Config schema: replaced the allOf extension of the shared CAMARA_event_common.yaml#/components/schemas/Config with a fully-local Config schema (subscriptionDetail, subscriptionExpireTime, subscriptionMaxEvents), matching the historical r3.3 definition. The shared Config schema also carries an initialEvent property that this API does not use; extending it silently pulled that property in. Since the local Config no longer inherits initialEvent, the stray initialEvent: true was also removed from the Subscription schema's inline example.
  • Fix subscriptionDetail example nesting: the same Subscription example incorrectly nested phoneNumber under an extra device key (subscriptionDetail.device.phoneNumber), which doesn't match the CreateSubscriptionDetail schema (a flat phoneNumber property) and was inconsistent with every other example in the file. Corrected to subscriptionDetail.phoneNumber.
  • Simplify EventSubscriptionStarted/Updated/Ended: these previously wrapped the shared SubscriptionStarted/Updated/Ended payload schemas in an extra allOf that injected a local device/DeviceResponse field. Simplified all three to a direct $ref, matching the template.
  • Fix SUBSCRIPTION_ENDS example: removed the invalid phoneNumber field from the notification payload under data. The SubscriptionEnded schema (from CAMARA_event_common.yaml) only defines terminationReason, subscriptionId, and terminationDescription; the example now matches the schema exactly.

Verified against the r3.3 release 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:

  • No changes were made to the /subscriptions or /subscriptions/{subscriptionId} path operations, security schemes, or response definitions — this PR is scoped to the Config, Subscription example, and EventSubscriptionStarted/Updated/Ended schemas only.
  • The Config restoration aligns with the r3.3 release tag.
  • The EventSubscriptionStarted/Updated/Ended simplification aligns with the current Commonalities template (sample-service-subscriptions.yaml) and the r3.3 release tag.
  • The SUBSCRIPTION_ENDS example fix aligns the notification payload with the SubscriptionEnded schema from CAMARA_event_common.yaml.

Validation errors are resolved within #278 (should be merged first).

Changelog input

 release-note
Restore local Config schema in the SIM Swap Subscriptions API and align EventSubscriptionStarted/Updated/Ended with the Commonalities subscription template.

Additional documentation

rartych added 2 commits July 24, 2026 00:12
- 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.
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.

Schema/example inconsistencies in sim-swap-subscriptions.yaml

1 participant