Skip to content

Commit

Permalink
fix: embedding structs related to validationrule.Interface (#276)
Browse files Browse the repository at this point in the history
## Description
Noticed when trying to integrate latest plugin releases with
validatorctl that tests started failing because the CRD couldn't be
applied. It complained about unknown fields. This is because the json
tag used when embedding the struct lacked "inline". This fixes that.

Signed-off-by: Matt Welke <matt.welke@spectrocloud.com>
  • Loading branch information
mattwelke authored Aug 23, 2024
1 parent 7b50486 commit f141e24
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/v1alpha1/ocivalidator_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func (s OciValidatorSpec) ResultCount() int {

// OciRegistryRule defines the validation rule for an OCI registry.
type OciRegistryRule struct {
validationrule.ManuallyNamed `json:"-"`
validationrule.ManuallyNamed `json:",inline"`

// Name is a unique name for the OciRegistryRule.
RuleName string `json:"name" yaml:"name"`
Expand Down

0 comments on commit f141e24

Please sign in to comment.