Skip to content

Commit

Permalink
Update request parameters for Ruleset API
Browse files Browse the repository at this point in the history
* `ShareableEntitlementName` cannot be used in requests using the public
  API.

* `Version` cannot be specified in requests as it is computed by the
  API.

* `Name` and `Kind` are not necessary when updating entry point
  rulesets. They are populated automatically by the API.
  • Loading branch information
zakcutner committed Aug 1, 2023
1 parent 89d0efc commit 3da9dcb
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions rulesets.go
Original file line number Diff line number Diff line change
Expand Up @@ -716,13 +716,11 @@ type UpdateRulesetResponse struct {
type ListRulesetsParams struct{}

type CreateRulesetParams struct {
Name string `json:"name,omitempty"`
Description string `json:"description,omitempty"`
Kind string `json:"kind,omitempty"`
Version *string `json:"version,omitempty"`
Phase string `json:"phase,omitempty"`
Rules []RulesetRule `json:"rules"`
ShareableEntitlementName string `json:"shareable_entitlement_name,omitempty"`
Name string `json:"name,omitempty"`
Description string `json:"description,omitempty"`
Kind string `json:"kind,omitempty"`
Phase string `json:"phase,omitempty"`
Rules []RulesetRule `json:"rules"`
}

type UpdateRulesetParams struct {
Expand All @@ -732,11 +730,8 @@ type UpdateRulesetParams struct {
}

type UpdateEntrypointRulesetParams struct {
Name string `json:"name,omitempty"`
Description string `json:"description,omitempty"`
Kind string `json:"kind,omitempty"`
Version *string `json:"version,omitempty"`
Phase string `json:"-"`
Description string `json:"description,omitempty"`
Rules []RulesetRule `json:"rules"`
}

Expand Down

0 comments on commit 3da9dcb

Please sign in to comment.