Skip to content

Update OAS and test definitions to remove IDENTIFIER_MISMATCH error code#22

Merged
akoshunyadi merged 12 commits intocamaraproject:mainfrom
eric-murray:eric-murray-patch-1
Jul 4, 2025
Merged

Update OAS and test definitions to remove IDENTIFIER_MISMATCH error code#22
akoshunyadi merged 12 commits intocamaraproject:mainfrom
eric-murray:eric-murray-patch-1

Conversation

@eric-murray
Copy link
Contributor

@eric-murray eric-murray commented Jun 17, 2025

What type of PR is this?

  • correction

What this PR does / why we need it:

Commonalities has removed the IDENTIFIER_MISMATCH error for Fall25. Instead, a device identifier should not normally be included in responses. It should only be included to disambiguate the identity of the device when:

  • the endpoint is being accessed using a 2-legged access token; and
  • the endpoint allows for a device identifier to be provided in the request; and
  • the API consumer has included multiple device identifiers

The response then includes the device identifier that was used by the implementation

This PR:

  • Updates documentation in each OAS
  • Adds relevant examples both for when device disambiguation is required, and when it is not required
  • Uses DeviceResponse object for the device-roaming-status API and for events in the device-roaming-status-subscriptions API to limit device identifiers in responses to exactly one when used
  • Removes the IDENTIFIER_MISMATCH error code option from 422 responses

Note; For subscriptions, the CreateSubscriptionDetail schema is used in both requests and responses, so modifying the responses to use the DeviceResponse would require a general update of the subscription schema in Commonalities. For the moment, the existing schema is left unmodified, which means that multiple device identifiers could be provided in responses, but should not.

Which issue(s) this PR fixes:

Fixes #23

Special notes for reviewers:

I think both GET endpoints should never return a device identifier in the responses, but haven't thought through all possible scenarios, so will raise this as a separate issue.

Changelog input

 release-note
 - Update documentation in each OAS
 - Add relevant examples both for when device disambiguation is required, and when it is not required
-  Use `DeviceResponse` object for the device-roaming-status API and for events in the device-roaming-status-subscriptions API to limit device identifiers in responses to exactly one when used
- Remove the IDENTIFIER_MISMATCH error code option from 422 responses

Additional documentation

None

bigludo7
bigludo7 previously approved these changes Jun 18, 2025
Copy link
Contributor

@bigludo7 bigludo7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

sachinvodafone
sachinvodafone previously approved these changes Jun 18, 2025
@eric-murray eric-murray dismissed stale reviews from sachinvodafone and bigludo7 via a567a00 June 19, 2025 10:01
Copy link
Contributor

@akoshunyadi akoshunyadi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eric-murray your initial comment regarding common CreateSubscriptionDetail, so that DeviceResponse can't be used in the subscription is not valid, right?

@eric-murray
Copy link
Contributor Author

@eric-murray your initial comment regarding common CreateSubscriptionDetail, so that DeviceResponse can't be used in the subscription is not valid, right?

I modified the events themselves to use DeviceResponse rather than Device, but the responses to the event management endpoints (POST /subscriptions, GET /subscriptions and GET /subscriptions/{subscriptionId}) still use the Device schema. So multiple device identifiers could be included in the responses to those endpoints, even though a maximum of one should be provided.

Changing it to DeviceResponse would require substantial changes to the event schema, which I'd prefer was done by Commonalities (if at all).

@akoshunyadi akoshunyadi merged commit 3ab99d6 into camaraproject:main Jul 4, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove IDENTIFIER_MISMATCH error and associated test cases

4 participants