X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=pkg%2Fmodels%2Fpolicy_type_schema.go;fp=pkg%2Fmodels%2Fpolicy_type_schema.go;h=4a793885db68dfcbd0a11f5dff97d0bf3b97a163;hb=5152bd39551f19139752d89a795327ca9dd189db;hp=1a23d80d0d6e16f30ae519dac88a46d8cbcbacf0;hpb=272fb5b36779f68a944ca317fa6a6159da0128e3;p=ric-plt%2Fa1.git diff --git a/pkg/models/policy_type_schema.go b/pkg/models/policy_type_schema.go index 1a23d80..4a79388 100644 --- a/pkg/models/policy_type_schema.go +++ b/pkg/models/policy_type_schema.go @@ -26,6 +26,8 @@ package models // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" + "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" @@ -83,8 +85,8 @@ func (m *PolicyTypeSchema) Validate(formats strfmt.Registry) error { func (m *PolicyTypeSchema) validateCreateSchema(formats strfmt.Registry) error { - if err := validate.Required("create_schema", "body", m.CreateSchema); err != nil { - return err + if m.CreateSchema == nil { + return errors.Required("create_schema", "body", nil) } return nil @@ -117,6 +119,11 @@ func (m *PolicyTypeSchema) validatePolicyTypeID(formats strfmt.Registry) error { return nil } +// ContextValidate validates this policy type schema based on context it is used +func (m *PolicyTypeSchema) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + // MarshalBinary interface implementation func (m *PolicyTypeSchema) MarshalBinary() ([]byte, error) { if m == nil {