Add optional validation to kubecfg/kubectl.

This commit is contained in:
Brendan Burns
2014-11-19 21:25:24 -08:00
parent 9f5ebef3d8
commit acf6d82800
9 changed files with 130 additions and 19 deletions

View File

@@ -30,12 +30,12 @@ import (
fuzz "github.com/google/gofuzz"
)
func LoadSchemaForTest(file string) (*Schema, error) {
func LoadSchemaForTest(file string) (Schema, error) {
data, err := ioutil.ReadFile(file)
if err != nil {
return nil, err
}
return NewSchemaFromBytes(data)
return NewSwaggerSchemaFromBytes(data)
}
// TODO: this is cloned from serialization_test.go, refactor to somewhere common like util