diff --git a/go.mod b/go.mod index 29368da..57c8693 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,6 @@ replace ( ) require ( - github.com/googleapis/gnostic v0.2.0 github.com/gorilla/mux v1.7.3 github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect github.com/rancher/norman v0.0.0-20190704000224-043a1c919df3 diff --git a/vendor/github.com/rancher/norman/pkg/parse/parse.go b/vendor/github.com/rancher/norman/pkg/parse/parse.go index 8e4d101..313fb66 100644 --- a/vendor/github.com/rancher/norman/pkg/parse/parse.go +++ b/vendor/github.com/rancher/norman/pkg/parse/parse.go @@ -105,7 +105,7 @@ func Parse(apiOp *types.APIRequest, urlParser URLParser) error { return err } - if apiOp.Schema == nil { + if apiOp.Schema == nil && apiOp.Schemas != nil { apiOp.Schema = apiOp.Schemas.Schema(apiOp.Type) } diff --git a/vendor/github.com/rancher/norman/pkg/store/proxy/proxy_store.go b/vendor/github.com/rancher/norman/pkg/store/proxy/proxy_store.go index ab722d1..574a90f 100644 --- a/vendor/github.com/rancher/norman/pkg/store/proxy/proxy_store.go +++ b/vendor/github.com/rancher/norman/pkg/store/proxy/proxy_store.go @@ -319,5 +319,6 @@ func (s *Store) fromInternal(apiOp *types.APIRequest, schema *types.Schema, data schema.Mapper.FromInternal(data) } + data["type"] = schema.ID return data } diff --git a/vendor/github.com/rancher/norman/pkg/types/mapper.go b/vendor/github.com/rancher/norman/pkg/types/mapper.go index 847d935..cf18af3 100644 --- a/vendor/github.com/rancher/norman/pkg/types/mapper.go +++ b/vendor/github.com/rancher/norman/pkg/types/mapper.go @@ -90,12 +90,6 @@ func (t *typeMapper) FromInternal(data map[string]interface{}) { } } - if t.root { - if _, ok := data["type"]; !ok { - data["type"] = t.typeName - } - } - Mappers(t.Mappers).FromInternal(data) } diff --git a/vendor/modules.txt b/vendor/modules.txt index c38ab17..5ca85c4 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -43,21 +43,21 @@ github.com/rancher/norman/pkg/authorization github.com/rancher/norman/pkg/types github.com/rancher/norman/pkg/types/convert github.com/rancher/norman/pkg/store/empty +github.com/rancher/norman/pkg/store/proxy +github.com/rancher/norman/pkg/subscribe github.com/rancher/norman/pkg/types/values github.com/rancher/norman/pkg/api/builtin -github.com/rancher/norman/pkg/store/proxy github.com/rancher/norman/pkg/api -github.com/rancher/norman/pkg/subscribe github.com/rancher/norman/pkg/urlbuilder github.com/rancher/norman/pkg/httperror github.com/rancher/norman/pkg/types/slice github.com/rancher/norman/pkg/data github.com/rancher/norman/pkg/types/definition -github.com/rancher/norman/pkg/store/schema github.com/rancher/norman/pkg/types/convert/merge +github.com/rancher/norman/pkg/api/writer +github.com/rancher/norman/pkg/store/schema github.com/rancher/norman/pkg/api/access github.com/rancher/norman/pkg/api/handler -github.com/rancher/norman/pkg/api/writer github.com/rancher/norman/pkg/httperror/handler github.com/rancher/norman/pkg/parse github.com/rancher/norman/pkg/parse/builder @@ -193,10 +193,10 @@ k8s.io/apimachinery/pkg/runtime/serializer/streaming k8s.io/apimachinery/pkg/runtime/serializer/versioning k8s.io/apimachinery/pkg/api/errors k8s.io/apimachinery/pkg/util/sets -k8s.io/apimachinery/pkg/util/httpstream -k8s.io/apimachinery/third_party/forked/golang/netutil k8s.io/apimachinery/pkg/util/json k8s.io/apimachinery/pkg/version +k8s.io/apimachinery/pkg/util/httpstream +k8s.io/apimachinery/third_party/forked/golang/netutil k8s.io/apimachinery/pkg/api/validation/path k8s.io/apimachinery/pkg/apis/meta/internalversion k8s.io/apimachinery/pkg/util/wait @@ -221,8 +221,8 @@ k8s.io/apiserver/pkg/apis/audit # k8s.io/client-go v11.0.1-0.20190409021438-1a26190bd76a+incompatible k8s.io/client-go/dynamic k8s.io/client-go/rest -k8s.io/client-go/transport k8s.io/client-go/discovery +k8s.io/client-go/transport k8s.io/client-go/kubernetes k8s.io/client-go/informers/rbac/v1 k8s.io/client-go/kubernetes/typed/rbac/v1 @@ -235,8 +235,8 @@ k8s.io/client-go/tools/clientcmd/api k8s.io/client-go/tools/metrics k8s.io/client-go/util/cert k8s.io/client-go/util/flowcontrol -k8s.io/client-go/tools/clientcmd k8s.io/client-go/kubernetes/scheme +k8s.io/client-go/tools/clientcmd k8s.io/client-go/informers k8s.io/client-go/informers/rbac k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1