diff --git a/internal/httpclient/models/expand_tree.go b/internal/httpclient/models/expand_tree.go index f76285ca1..986d71d19 100644 --- a/internal/httpclient/models/expand_tree.go +++ b/internal/httpclient/models/expand_tree.go @@ -30,11 +30,7 @@ type ExpandTree struct { // subject set SubjectSet *SubjectSet `json:"subject_set,omitempty"` - // - // union Union - // exclusion Exclusion - // intersection Intersection - // leaf Leaf + // type // Required: true // Enum: [union exclusion intersection leaf] Type *string `json:"type"` @@ -76,8 +72,6 @@ func (m *ExpandTree) validateChildren(formats strfmt.Registry) error { if err := m.Children[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("children" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("children" + "." + strconv.Itoa(i)) } return err } @@ -97,8 +91,6 @@ func (m *ExpandTree) validateSubjectSet(formats strfmt.Registry) error { if err := m.SubjectSet.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("subject_set") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("subject_set") } return err } @@ -182,8 +174,6 @@ func (m *ExpandTree) contextValidateChildren(ctx context.Context, formats strfmt if err := m.Children[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("children" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("children" + "." + strconv.Itoa(i)) } return err } @@ -200,8 +190,6 @@ func (m *ExpandTree) contextValidateSubjectSet(ctx context.Context, formats strf if err := m.SubjectSet.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("subject_set") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("subject_set") } return err } diff --git a/internal/httpclient/models/get_relation_tuples_response.go b/internal/httpclient/models/get_relation_tuples_response.go index e2e257e0d..e83f0dc18 100644 --- a/internal/httpclient/models/get_relation_tuples_response.go +++ b/internal/httpclient/models/get_relation_tuples_response.go @@ -56,8 +56,6 @@ func (m *GetRelationTuplesResponse) validateRelationTuples(formats strfmt.Regist if err := m.RelationTuples[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("relation_tuples" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("relation_tuples" + "." + strconv.Itoa(i)) } return err } @@ -90,8 +88,6 @@ func (m *GetRelationTuplesResponse) contextValidateRelationTuples(ctx context.Co if err := m.RelationTuples[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("relation_tuples" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("relation_tuples" + "." + strconv.Itoa(i)) } return err } diff --git a/internal/httpclient/models/internal_relation_tuple.go b/internal/httpclient/models/internal_relation_tuple.go index fc6445dbb..e17517c99 100644 --- a/internal/httpclient/models/internal_relation_tuple.go +++ b/internal/httpclient/models/internal_relation_tuple.go @@ -102,8 +102,6 @@ func (m *InternalRelationTuple) validateSubjectSet(formats strfmt.Registry) erro if err := m.SubjectSet.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("subject_set") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("subject_set") } return err } @@ -132,8 +130,6 @@ func (m *InternalRelationTuple) contextValidateSubjectSet(ctx context.Context, f if err := m.SubjectSet.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("subject_set") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("subject_set") } return err } diff --git a/internal/httpclient/models/patch_delta.go b/internal/httpclient/models/patch_delta.go index e29ac7336..2a02a7efb 100644 --- a/internal/httpclient/models/patch_delta.go +++ b/internal/httpclient/models/patch_delta.go @@ -97,8 +97,6 @@ func (m *PatchDelta) validateRelationTuple(formats strfmt.Registry) error { if err := m.RelationTuple.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("relation_tuple") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("relation_tuple") } return err } @@ -127,8 +125,6 @@ func (m *PatchDelta) contextValidateRelationTuple(ctx context.Context, formats s if err := m.RelationTuple.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("relation_tuple") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("relation_tuple") } return err } diff --git a/internal/httpclient/models/relation_query.go b/internal/httpclient/models/relation_query.go index 16b082e0f..18e256a82 100644 --- a/internal/httpclient/models/relation_query.go +++ b/internal/httpclient/models/relation_query.go @@ -59,8 +59,6 @@ func (m *RelationQuery) validateSubjectSet(formats strfmt.Registry) error { if err := m.SubjectSet.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("subject_set") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("subject_set") } return err } @@ -89,8 +87,6 @@ func (m *RelationQuery) contextValidateSubjectSet(ctx context.Context, formats s if err := m.SubjectSet.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("subject_set") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("subject_set") } return err } diff --git a/spec/api.json b/spec/api.json index 8fa95aae8..0791079f2 100755 --- a/spec/api.json +++ b/spec/api.json @@ -1069,8 +1069,7 @@ "enum": [ "insert", "delete" - ], - "x-go-enum-desc": "insert ActionInsert\ndelete ActionDelete" + ] }, "relation_tuple": { "$ref": "#/definitions/InternalRelationTuple" @@ -1142,15 +1141,13 @@ "$ref": "#/definitions/SubjectSet" }, "type": { - "description": "\nunion Union\nexclusion Exclusion\nintersection Intersection\nleaf Leaf", "type": "string", "enum": [ "union", "exclusion", "intersection", "leaf" - ], - "x-go-enum-desc": "union Union\nexclusion Exclusion\nintersection Intersection\nleaf Leaf" + ] } } },