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] Implement sorting functionality in /{scopeId}/credentials API #4095

Merged
merged 1 commit into from
Aug 6, 2024

Conversation

MDeLuise
Copy link
Contributor

@MDeLuise MDeLuise commented Aug 5, 2024

Summary

This pull request introduces sorting capabilities to the '/{scopeId}/credentials' API endpoint by adding two new query parameters: sortDir and sortParam.

Details

  • sortDir: Accepts NULL/ASCENDING/DESCENDING, and determines the order of sorting.
  • sortParam: Defines the field by which the sorting is applied.

This enhancement mirrors the sorting functionality already available in other API endpoints, such as /devices. By using these parameters, users can now sort the credentials information based on any specified field in either ascending or descending order.

Example Usage

To sort the credentials information in ascending order by a specific field, the request would look like:
GET /{scopeId}/credentials?sortDir=ASCENDING&sortParam=<field_name>
This update enhances the flexibility and usability of the API by providing consistent sorting behavior across different endpoints.

…endpoint

Implemented sorting functionality for the '/{scopeId}/credentials' API by adding query parameters `sortDir` and `sortParam`. This feature allows sorting of credentials information based on the specified field (`sortParam`) in either ascending or descending order
@MDeLuise MDeLuise changed the title ✨ [REST API] Implement sorting functionality in /{scopeId}/credentials API ✨ [REST API] Implement sorting functionality in /{scopeId}/credentials API Aug 5, 2024
Copy link

codecov bot commented Aug 5, 2024

Codecov Report

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

Project coverage is 16.75%. Comparing base (9d86254) to head (5962247).
Report is 4 commits behind head on develop.

Files Patch % Lines
...ua/app/api/resources/v1/resources/Credentials.java 0.00% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #4095      +/-   ##
=============================================
- Coverage      16.75%   16.75%   -0.01%     
  Complexity        22       22              
=============================================
  Files           2016     2016              
  Lines          52357    52359       +2     
  Branches        4417     4418       +1     
=============================================
  Hits            8773     8773              
- Misses         43184    43186       +2     
  Partials         400      400              
Files Coverage Δ
...ua/app/api/resources/v1/resources/Credentials.java 0.00% <0.00%> (ø)

@Coduz Coduz added the Enhancement This PR/Issue improves an part of Kapua label Aug 6, 2024
@Coduz Coduz merged commit d5b679e into eclipse-kapua:develop Aug 6, 2024
32 of 34 checks passed
@MDeLuise MDeLuise deleted the improve-sortCredential branch September 30, 2024 09:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement This PR/Issue improves an part of Kapua
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants