This repository has been archived on 2024-04-25. You can view files and clone it, but cannot push or open issues or pull requests.
golang-rest-example/pkg/openapi/oas_validators_gen.go
2024-02-02 15:39:13 +01:00

32 lines
571 B
Go

// Code generated by ogen, DO NOT EDIT.
package openapi
import (
"github.com/go-faster/errors"
"github.com/ogen-go/ogen/validate"
)
func (s *Group) Validate() error {
if s == nil {
return validate.ErrNilPointer
}
var failures []validate.FieldError
if err := func() error {
if s.UserIds == nil {
return errors.New("nil is invalid value")
}
return nil
}(); err != nil {
failures = append(failures, validate.FieldError{
Name: "user_ids",
Error: err,
})
}
if len(failures) > 0 {
return &validate.Error{Fields: failures}
}
return nil
}