Updating the schema validation code

This commit is contained in:
nikhiljindal
2016-04-05 18:08:46 -07:00
parent 8bb7c80f9d
commit 6eae11e166
2 changed files with 5 additions and 4 deletions

View File

@@ -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))
}