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

SCALRCORE-31246: Add API operations for RunScheduleRule resource #154

Merged
merged 3 commits into from
Jul 2, 2024

Conversation

lyzohub
Copy link
Contributor

@lyzohub lyzohub commented Jun 20, 2024

No description provided.

@lyzohub lyzohub changed the title SCALRCORE-31246 SCALRCORE-31246: Add API operations for RunScheduleRule resource Jun 21, 2024
run_schedule_rule.go Outdated Show resolved Hide resolved
// RunScheduleRuleUpdateOptions represents the options for updating a run schedule rule.
type RunScheduleRuleUpdateOptions struct {
ID string `jsonapi:"primary,run-schedule-rules"`
Schedule string `jsonapi:"attr,schedule"`
Copy link
Member

Choose a reason for hiding this comment

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

Optional parameters should be declared as pointers with omitempty tag, so empty values are not passed in update request.

Comment on lines 133 to 134
Schedule string `jsonapi:"attr,schedule,omitempty"`
ScheduleMode ScheduleMode `jsonapi:"attr,schedule-mode,omitempty"`
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Schedule string `jsonapi:"attr,schedule,omitempty"`
ScheduleMode ScheduleMode `jsonapi:"attr,schedule-mode,omitempty"`
Schedule *string `jsonapi:"attr,schedule,omitempty"`
ScheduleMode *ScheduleMode `jsonapi:"attr,schedule-mode,omitempty"`

@penja penja merged commit b651e55 into master Jul 2, 2024
3 checks passed
@penja penja deleted the SCALRCORE-31246 branch July 2, 2024 11:39
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.

3 participants