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

RulesetRule missing position arguments #1938

Open
2 tasks done
vroy opened this issue May 3, 2024 · 1 comment
Open
2 tasks done

RulesetRule missing position arguments #1938

vroy opened this issue May 3, 2024 · 1 comment
Labels
needs-triage Indicates an issue or PR lacks a `triage: foo` label and requires one.

Comments

@vroy
Copy link

vroy commented May 3, 2024

Confirmation

  • My issue isn't already found on the issue tracker.
  • I have replicated my issue using the latest version of the library and it is still present.

cloudflare-go version

v0.x, v2.x

Expected output

The ability to update a RulesetRule position by PATCH:

https://developers.cloudflare.com/ruleset-engine/rulesets-api/update-rule/#change-the-order-of-a-rule-in-a-ruleset

Looks to be missing from API docs too.

Code demonstrating the issue

RulesetRule struct is missing Position field.

cloudflare-go/rulesets.go

Lines 648 to 663 in 1096abb

// RulesetRule contains information about a single Ruleset Rule.
type RulesetRule struct {
ID string `json:"id,omitempty"`
Version *string `json:"version,omitempty"`
Action string `json:"action"`
ActionParameters *RulesetRuleActionParameters `json:"action_parameters,omitempty"`
Expression string `json:"expression"`
Description string `json:"description,omitempty"`
LastUpdated *time.Time `json:"last_updated,omitempty"`
Ref string `json:"ref,omitempty"`
Enabled *bool `json:"enabled,omitempty"`
ScoreThreshold int `json:"score_threshold,omitempty"`
RateLimit *RulesetRuleRateLimit `json:"ratelimit,omitempty"`
ExposedCredentialCheck *RulesetRuleExposedCredentialCheck `json:"exposed_credential_check,omitempty"`
Logging *RulesetRuleLogging `json:"logging,omitempty"`
}

@vroy vroy added the needs-triage Indicates an issue or PR lacks a `triage: foo` label and requires one. label May 3, 2024
vroy added a commit to vroy/cloudflare-go that referenced this issue May 3, 2024
@vroy vroy mentioned this issue May 3, 2024
9 tasks
@jacobbednarz
Copy link
Member

position is not currently documented within the API schemas so this won't be generating today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-triage Indicates an issue or PR lacks a `triage: foo` label and requires one.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants