Refactor openAPI

Refactor global openapi
This commit is contained in:
Phani Teja Marupaka
2020-11-10 12:50:24 -08:00
parent b2ba82a0bd
commit b6a4dd446a
27 changed files with 178 additions and 503 deletions

View File

@@ -252,7 +252,6 @@ spec:
t.Run(test.name, func(t *testing.T) {
// reset the openAPI afterward
defer openapi.ResetOpenAPI()
initSchema(t, test.openapi)
f, err := ioutil.TempFile("", "k8s-cli-")
if !assert.NoError(t, err) {
@@ -275,7 +274,7 @@ spec:
}
// invoke the setter
instance := &List{Name: test.setter}
instance := &List{Name: test.setter, SettersSchema: SettersSchema(t, test.openapi)}
err = instance.ListSetters(f.Name(), r.Name())
if !assert.NoError(t, err) {
t.FailNow()