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

✨ [REST-API] Add support to query operations by status in GET /{scopeId}/devices/{deviceId}/operations #4121

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

MDeLuise
Copy link
Contributor

Description

This PR implements the capability to search operations by their status using the GET /{scopeId}/devices/{deviceId}/operations endpoint.

Changes Made

  • New Feature: Added functionality to filter operations based on their status.
  • Refactor: Modified the DeviceManagementOperations query method:
    • Deprecation: The current query method has been deprecated. It previously required the @PathParam("deviceId") EntityId deviceId parameter.
    • New Method: Introduced a new query1 method that conforms to the parameters accepted and usage patterns of other query methods. The deviceId parameter was removed, improving consistency across endpoints.
  • Future Plans:
    1. The _query (deprecated) endpoint will be removed in a future release.
    2. The _query1 endpoint will eventually be deprecated in favor of a new _query endpoint with the same behavior but a "correct" name.
    3. _query1 will be deleted in a subsequent release, following a smooth deprecation process.

Impact

These changes are backward-compatible but introduce a new method for querying operations. Users relying on the existing query method should migrate to the new query1 method or prepare for the upcoming changes.

Notes

  • The naming of query1 is provisional and can be adjusted based on feedback. It was chosen to maintain backward compatibility while moving towards a cleaner design.
  • Documentation have been updated to reflect these changes.

…opeId}/devices/{deviceId}/operations`

- Implemented the ability to query operations based on their status via the `GET /{scopeId}/devices/{deviceId}/operations` endpoint.
- Modified `DeviceManagementOperations` query method to support the new functionality:
  - Deprecated the existing `query` method that required `@PathParam("deviceId") EntityId deviceId` parameter.
  - Introduced a new `query1` method to replace the old one, omitting the `deviceId` parameter for consistency across other query methods.
- Updated documentation accordingly.
Copy link

codecov bot commented Oct 18, 2024

Codecov Report

Attention: Patch coverage is 0% with 7 lines in your changes missing coverage. Please review.

Project coverage is 16.80%. Comparing base (3690866) to head (20ef05c).

Files with missing lines Patch % Lines
...urces/v1/resources/DeviceManagementOperations.java 0.00% 7 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #4121      +/-   ##
=============================================
- Coverage      16.81%   16.80%   -0.01%     
  Complexity        22       22              
=============================================
  Files           2019     2019              
  Lines          52437    52443       +6     
  Branches        4423     4425       +2     
=============================================
  Hits            8815     8815              
- Misses         43224    43230       +6     
  Partials         398      398              
Files with missing lines Coverage Δ
...urces/v1/resources/DeviceManagementOperations.java 0.00% <0.00%> (ø)

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.

1 participant