openapi: generate

This commit is contained in:
2025-04-11 12:29:16 -07:00
parent d1ca9bdab9
commit 1ff6bdbd4c
6 changed files with 119 additions and 71 deletions

View File

@@ -227,6 +227,25 @@ func (s *MapfixCreate) Validate() error {
Error: err,
})
}
if err := func() error {
if err := (validate.String{
MinLength: 0,
MinLengthSet: false,
MaxLength: 256,
MaxLengthSet: true,
Email: false,
Hostname: false,
Regex: nil,
}).Validate(string(s.Description)); err != nil {
return errors.Wrap(err, "string")
}
return nil
}(); err != nil {
failures = append(failures, validate.FieldError{
Name: "Description",
Error: err,
})
}
if len(failures) > 0 {
return &validate.Error{Fields: failures}
}