()
| 76 | } |
| 77 | |
| 78 | func (s *Spec) Validate() error { |
| 79 | if len(s.Brokers) == 0 { |
| 80 | return errors.New("at least one broker is required") |
| 81 | } |
| 82 | |
| 83 | // required for s.FileSpec.Validate call |
| 84 | err := s.FileSpec.UnmarshalSpec() |
| 85 | if err != nil { |
| 86 | return err |
| 87 | } |
| 88 | s.FileSpec.SetDefaults() |
| 89 | |
| 90 | return s.FileSpec.Validate() |
| 91 | } |
no test coverage detected