Merged
Conversation
🦙 MegaLinter status: ✅ SUCCESS
See detailed report in MegaLinter reports |
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR replaces the legacy UNKNOWN/404 responses with new 422 UNABLE_TO_LOCATE errors for both location verification and retrieval, makes lastLocationTime required in the verification response, and updates tests and API docs accordingly.
- Remove the
UNKNOWNscenario in verification and add a 422LOCATION_VERIFICATION.UNABLE_TO_LOCATEscenario - Change retrieval tests to expect 422
LOCATION_RETRIEVAL.UNABLE_TO_LOCATEinstead of 404 - Update OpenAPI YAMLs: deprecate
UNKNOWN/DEVICE_NOT_FOUND, requirelastLocationTime, and add new 422 error definitions
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| code/Test_definitions/location-verification.feature | Removed old UNKNOWN scenario; added new 422 UNABLE_TO_LOCATE scenario without header/schema checks |
| code/Test_definitions/location-retrieval.feature | Switched expected status from 404 to 422 and updated error code in the retrieval scenario |
| code/API_definitions/location-verification.yaml | Deprecated UNKNOWN responses, added lastLocationTime to required props, and defined new 422 error |
| code/API_definitions/location-retrieval.yaml | Updated docs for maxAge, removed DEVICE_NOT_FOUND from 404 enum, and added new 422 error |
Comments suppressed due to low confidence (2)
code/Test_definitions/location-verification.feature:325
- Add assertions to verify response headers (
Content-Type,x-correlator) and validate the error response body against the OAS error schema to ensure consistency with other scenarios.
@location_verification_422.4_unknown_location_for_device
code/Test_definitions/location-retrieval.feature:68
- Include checks for response headers (
Content-Type,x-correlator) and schema compliance for the new 422 error to match coverage in other retrieval scenarios.
Then the response status code is 422
maxl2287
approved these changes
Jun 23, 2025
Collaborator
Author
|
@bigludo7 please review this one |
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:
location-verification
lastLocationTimebecomes required as UNKNOWN was the only case when it was allowed to not be filledlocation-retrieval
Which issue(s) this PR fixes:
Fixes #308
Special notes for reviewers:
Changelog input