Skip to content

Commit c89dd21

Browse files
author
Matt Welke
authored
fix: embedding structs related to validationrule.Interface (#346)
## 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>
1 parent d828bcd commit c89dd21

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

api/v1alpha1/vspherevalidator_types.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ type VsphereAuth struct {
4343

4444
// NTPValidationRule defines the NTP validation rule
4545
type NTPValidationRule struct {
46-
validationrule.ManuallyNamed `json:"-"`
46+
validationrule.ManuallyNamed `json:",inline"`
4747

4848
// RuleName is the name of the NTP validation rule
4949
RuleName string `json:"name" yaml:"name"`
@@ -67,7 +67,7 @@ func (r *NTPValidationRule) SetName(name string) {
6767

6868
// ComputeResourceRule defines the compute resource validation rule
6969
type ComputeResourceRule struct {
70-
validationrule.ManuallyNamed `json:"-"`
70+
validationrule.ManuallyNamed `json:",inline"`
7171

7272
// RuleName is the name of the compute resource validation rule
7373
RuleName string `json:"name" yaml:"name"`
@@ -95,7 +95,7 @@ func (r *ComputeResourceRule) SetName(name string) {
9595

9696
// EntityPrivilegeValidationRule defines the entity privilege validation rule
9797
type EntityPrivilegeValidationRule struct {
98-
validationrule.ManuallyNamed `json:"-"`
98+
validationrule.ManuallyNamed `json:",inline"`
9999

100100
// RuleName is the name of the entity privilege validation rule
101101
RuleName string `json:"name" yaml:"name"`
@@ -125,7 +125,7 @@ func (r *EntityPrivilegeValidationRule) SetName(name string) {
125125

126126
// GenericRolePrivilegeValidationRule defines the generic role privilege validation rule
127127
type GenericRolePrivilegeValidationRule struct {
128-
validationrule.AutomaticallyNamed `json:"-"`
128+
validationrule.AutomaticallyNamed `json:",inline"`
129129

130130
// Username is the username to validate against
131131
Username string `json:"username" yaml:"username"`
@@ -142,7 +142,7 @@ func (r GenericRolePrivilegeValidationRule) Name() string {
142142

143143
// TagValidationRule defines the tag validation rule
144144
type TagValidationRule struct {
145-
validationrule.ManuallyNamed `json:"-"`
145+
validationrule.ManuallyNamed `json:",inline"`
146146

147147
// RuleName is the name of the tag validation rule
148148
RuleName string `json:"name" yaml:"name"`

0 commit comments

Comments
 (0)