edgexfoundry / go-mod-core-contracts

Owner: Core/Support WG
Apache License 2.0
27 stars 67 forks source link

fix: Added validation for UpdateScheduleJobRequest #934

Closed jackchenjc closed 1 month ago

jackchenjc commented 1 month ago

refer to https://github.com/edgexfoundry/edgex-go/issues/4925

If your build fails due to your commit message not passing the build checks, please review the guidelines here: https://github.com/edgexfoundry/go-mod-core-contracts/blob/main/.github/Contributing.md

PR Checklist

Please check if your PR fulfills the following requirements:

Testing Instructions

New Dependency Instructions (If applicable)

codecov-commenter commented 1 month ago

:warning: Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 43.60%. Comparing base (4ed9aff) to head (9d7347a).

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #934 +/- ## ========================================== + Coverage 43.52% 43.60% +0.07% ========================================== Files 124 124 Lines 6752 6761 +9 ========================================== + Hits 2939 2948 +9 Misses 3557 3557 Partials 256 256 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

jackchenjc commented 1 month ago

Since there is no Validation func for UpdateScheduleJob dto, the validation should be called in the validation function of UpdateSubscriptionRequest.

If we create a Validation func for UpdateScheduleJob dto, the validation can be called automatically, but that function will be very similar to the one for ScheduleJob dto or the one I just committed.