Updating the schema validation code
This commit is contained in:
@@ -284,8 +284,8 @@ func (s *SwaggerSchema) validateField(value interface{}, fieldName, fieldType st
|
||||
}
|
||||
// API servers before release 1.3 produce swagger spec with `type: "any"` as the fallback type, while newer servers produce spec with `type: "object"`.
|
||||
// We have both here so that kubectl can work with both old and new api servers.
|
||||
case "any":
|
||||
case "object":
|
||||
case "any":
|
||||
default:
|
||||
return append(allErrs, fmt.Errorf("unexpected type: %v", fieldType))
|
||||
}
|
||||
|
Reference in New Issue
Block a user