Update openapi to use kube-openapi code

This commit is contained in:
Antoine Pelisse
2017-10-18 15:19:56 -07:00
parent 875a72fed2
commit 3ed58475c4
61 changed files with 1028 additions and 816 deletions

View File

@@ -15,6 +15,7 @@ go_library(
"//vendor/github.com/googleapis/gnostic/compiler:go_default_library",
"//vendor/gopkg.in/yaml.v2:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
"//vendor/k8s.io/kube-openapi/pkg/util/proto:go_default_library",
],
)

View File

@@ -22,6 +22,7 @@ import (
"sync"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/kube-openapi/pkg/util/proto"
"k8s.io/kubernetes/pkg/kubectl/cmd/util/openapi"
yaml "gopkg.in/yaml.v2"
@@ -109,7 +110,7 @@ func NewFakeResources(path string) *FakeResources {
// LookupResource will read the schema, parse it and return the
// resources. It doesn't return errors and will panic instead.
func (f *FakeResources) LookupResource(gvk schema.GroupVersionKind) openapi.Schema {
func (f *FakeResources) LookupResource(gvk schema.GroupVersionKind) proto.Schema {
s, err := f.fake.OpenAPISchema()
if err != nil {
panic(err)