mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-16 07:13:53 +00:00
Remove useless todo notes that handle required fields
This commit is contained in:
parent
45a8b5f98a
commit
4a126e7297
@ -97,7 +97,6 @@ func (s *SwaggerSchema) ValidateBytes(data []byte) error {
|
|||||||
func (s *SwaggerSchema) ValidateObject(obj interface{}, apiVersion, fieldName, typeName string) errs.ValidationErrorList {
|
func (s *SwaggerSchema) ValidateObject(obj interface{}, apiVersion, fieldName, typeName string) errs.ValidationErrorList {
|
||||||
allErrs := errs.ValidationErrorList{}
|
allErrs := errs.ValidationErrorList{}
|
||||||
models := s.api.Models
|
models := s.api.Models
|
||||||
// TODO: handle required fields here too.
|
|
||||||
model, ok := models.At(typeName)
|
model, ok := models.At(typeName)
|
||||||
if !ok {
|
if !ok {
|
||||||
return append(allErrs, fmt.Errorf("couldn't find type: %s", typeName))
|
return append(allErrs, fmt.Errorf("couldn't find type: %s", typeName))
|
||||||
|
Loading…
Reference in New Issue
Block a user