Skip to content
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

Update Device object handling and description #87

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

eric-murray
Copy link
Collaborator

@eric-murray eric-murray commented Dec 5, 2024

What type of PR is this?

  • enhancement/feature
  • documentation

What this PR does / why we need it:

Other APIs passing a Device object do this by passing a separate parameter named device, even if that is the only object passed in the request. This PR:

  • Updates the Device Identifier API to use this pattern
  • Updates documentation on identifying the device from the access token following the current agreement in Commonalities
  • Updates the API error responses following the current agreement in Commonalities

Which issue(s) this PR fixes:

Fixes # N/A

Special notes for reviewers:

None

Changelog input

 release-note
 - Update Device object handling and description

Additional documentation

None

@eric-murray eric-murray requested a review from Kevsy as a code owner December 5, 2024 21:56
value:
status: 404
code: NOT_FOUND
message: The specified resource is not found.
GENERIC_404_DEVICE_NOT_FOUND:
description: Device identifier not found
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
description: Device identifier not found
description: Some identifier cannot be matched to a device

code: DEVICE_NOT_FOUND
message: Device identifier not found.
code: IDENTIFIER_NOT_FOUND
message: The supplied device identifier cannot be matched to a device.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
message: The supplied device identifier cannot be matched to a device.
message: Device identifier not found.

@@ -437,18 +438,34 @@ components:
schema:
$ref: "#/components/schemas/ErrorResponse"
examples:
GENERIC_422_DEVICE_IDENTIFIERS_MISMATCH:
description: Inconsistency between device identifiers not pointing to the same device
DeviceIdentifiersMismatch:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
DeviceIdentifiersMismatch:
GENERIC_422_IDENTIFIER_MISMATCH:

GENERIC_422_DEVICE_IDENTIFIERS_MISMATCH:
description: Inconsistency between device identifiers not pointing to the same device
DeviceIdentifiersMismatch:
description: Inconsistency between device identifiers not identifying the same device
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
description: Inconsistency between device identifiers not identifying the same device
description: Inconsistency between identifiers not pointing to the same device

value:
status: 404
code: NOT_FOUND
message: The specified resource is not found.
GENERIC_404_DEVICE_NOT_FOUND:
Copy link
Collaborator

@Kevsy Kevsy Dec 20, 2024

Choose a reason for hiding this comment

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

Suggested change
GENERIC_404_DEVICE_NOT_FOUND:
GENERIC_404_IDENTIFIER_NOT_FOUND:

value:
status: 422
code: DEVICE_IDENTIFIERS_MISMATCH
code: IDENTIFIER_MISMATCH
message: Provided device identifiers are not consistent.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
message: Provided device identifiers are not consistent.
message: Provided identifiers are not consistent.

message: Provided device identifiers are not consistent.
GENERIC_422_DEVICE_NOT_APPLICABLE:
description: Service is not available for the provided device
ServiceNotApplicableForDevice:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
ServiceNotApplicableForDevice:
GENERIC_422_SERVICE_NOT_APPLICABLE:

GENERIC_422_DEVICE_NOT_APPLICABLE:
description: Service is not available for the provided device
ServiceNotApplicableForDevice:
description: Service is not available for the identified device
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
description: Service is not available for the identified device
description: Service not applicable for the provided identifier

code: SERVICE_NOT_APPLICABLE
message: The service is not applicable to the identified device.
UnsupportedDeviceIdentifier:
description: Service is not available for the identified device
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
description: Service is not available for the identified device
description: The service is not available for the provided identifier.

status: 422
code: SERVICE_NOT_APPLICABLE
message: The service is not applicable to the identified device.
UnsupportedDeviceIdentifier:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
UnsupportedDeviceIdentifier:
GENERIC_422_UNSUPPORTED_IDENTIFIER:

value:
status: 422
code: UNSUPPORTED_IDENTIFIER
message: None of the provided device identifiers is supported by the implementation.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
message: None of the provided device identifiers is supported by the implementation.
message: None of the provided identifiers is supported by the implementation.

status: 422
code: UNSUPPORTED_IDENTIFIER
message: None of the provided device identifiers is supported by the implementation.
UnnecessaryDeviceIdentifier:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
UnnecessaryDeviceIdentifier:
GENERIC_422_UNNECESSARY_IDENTIFIER:

value:
status: 422
code: UNNECESSARY_IDENTIFIER
message: The device is already identified by the access token
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
message: The device is already identified by the access token
message: An explicit identifier is provided when a device or phone number has already been identified from the access token

status: 422
code: UNNECESSARY_IDENTIFIER
message: The device is already identified by the access token
MissingIdentifier:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
MissingIdentifier:
GENERIC_422_MISSING_IDENTIFIER:

code: DEVICE_NOT_APPLICABLE
message: The service is not available for the provided device.
code: MISSING_IDENTIFIER
message: The device cannot be identified
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
message: The device cannot be identified
message: An identifier is not included in the request and the device or phone number identification cannot be derived from the 3-legged access token

code: DEVICE_NOT_APPLICABLE
message: The service is not available for the provided device.
code: MISSING_IDENTIFIER
message: The device cannot be identified

429TooManyRequests:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
429TooManyRequests:
Generic429:

Copy link
Collaborator

@Kevsy Kevsy left a comment

Choose a reason for hiding this comment

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

Added suggestions inline to match the latest common.yaml changes for the error names/descriptions

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.

2 participants