Skip to content

Conversation

@sinchubhat
Copy link
Contributor

No description provided.

@codecov
Copy link

codecov bot commented Nov 25, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 42.09%. Comparing base (81f59b7) to head (46a4e9c).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #708      +/-   ##
==========================================
- Coverage   42.29%   42.09%   -0.20%     
==========================================
  Files         102      102              
  Lines        9604     9604              
==========================================
- Hits         4062     4043      -19     
- Misses       5205     5229      +24     
+ Partials      337      332       -5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sinchubhat sinchubhat marked this pull request as ready for review November 25, 2025 04:45
@sinchubhat sinchubhat requested a review from Copilot November 25, 2025 04:45
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors the GetFeatures endpoint to use a structured DTO (Data Transfer Object) instead of a generic map for the response type.

  • Introduces a new GetFeaturesResponse DTO struct with explicit field definitions and JSON tags
  • Updates the getFeatures controller to use the new DTO instead of map[string]interface{}
  • Updates the test to use the structured DTO for response validation

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
internal/entity/dto/v1/getfeatures.go Defines the new GetFeaturesResponse struct with JSON binding tags and examples
internal/controller/http/v1/features.go Replaces map-based response with the structured DTO
internal/controller/http/v1/devicemanagement_test.go Updates test expectations to use the new DTO structure

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@sinchubhat sinchubhat requested review from madhavilosetty-intel and rsdmike and removed request for rsdmike November 25, 2025 04:51
@madhavilosetty-intel madhavilosetty-intel changed the title feat: use dto for GetFeatures refactor: correct dto mapping for GetFeatures and PowerState Dec 2, 2025
@madhavilosetty-intel madhavilosetty-intel enabled auto-merge (squash) December 3, 2025 00:10
@madhavilosetty-intel madhavilosetty-intel merged commit aaad912 into main Dec 3, 2025
23 of 24 checks passed
@madhavilosetty-intel madhavilosetty-intel deleted the dto_GetFeatures branch December 3, 2025 02:24
@RosieAMT
Copy link

RosieAMT commented Dec 3, 2025

🎉 This PR is included in version 1.14.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

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.

3 participants