openapi: Fetch protobuf rather than Json

This is much faster.

Kubernetes-commit: 224dba9a136e3e4014d88b3c2546418066bac026
This commit is contained in:
Antoine Pelisse
2017-05-26 14:00:24 -07:00
committed by Kubernetes Publisher
parent 5e440ec3fc
commit 13c848bad2
7 changed files with 89 additions and 50 deletions

View File

@@ -29,7 +29,7 @@ import (
"k8s.io/client-go/rest/fake"
"github.com/emicklei/go-restful-swagger12"
"github.com/go-openapi/spec"
"github.com/googleapis/gnostic/OpenAPIv2"
"github.com/stretchr/testify/assert"
)
@@ -348,6 +348,6 @@ func (c *fakeCachedDiscoveryInterface) SwaggerSchema(version schema.GroupVersion
return &swagger.ApiDeclaration{}, nil
}
func (c *fakeCachedDiscoveryInterface) OpenAPISchema() (*spec.Swagger, error) {
return &spec.Swagger{}, nil
func (c *fakeCachedDiscoveryInterface) OpenAPISchema() (*openapi_v2.Document, error) {
return &openapi_v2.Document{}, nil
}