-
Notifications
You must be signed in to change notification settings - Fork 10
refactor: correct dto mapping for GetFeatures and PowerState #708
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
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
There was a problem hiding this 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
GetFeaturesResponseDTO struct with explicit field definitions and JSON tags - Updates the
getFeaturescontroller to use the new DTO instead ofmap[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.
70a06a8 to
e3e2da8
Compare
|
🎉 This PR is included in version 1.14.1 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
No description provided.