Update kube-openapi and gnostic dependencies

Pulling in https://github.com/kubernetes/kube-openapi/pull/220
This commit is contained in:
John Howard
2021-03-23 08:33:15 -07:00
parent bd67aeff26
commit a849c8998c
84 changed files with 10250 additions and 5702 deletions

View File

@@ -21,9 +21,6 @@ import (
"os"
"sync"
yaml "gopkg.in/yaml.v2"
"github.com/googleapis/gnostic/compiler"
openapi_v2 "github.com/googleapis/gnostic/openapiv2"
)
@@ -50,13 +47,7 @@ func (f *Fake) OpenAPISchema() (*openapi_v2.Document, error) {
f.err = err
return
}
var info yaml.MapSlice
err = yaml.Unmarshal(spec, &info)
if err != nil {
f.err = err
return
}
f.document, f.err = openapi_v2.NewDocument(info, compiler.NewContext("$root", nil))
f.document, f.err = openapi_v2.ParseDocument(spec)
})
return f.document, f.err
}