mirror of
https://github.com/kubernetes/sample-controller.git
synced 2026-04-12 00:00:26 +08:00
Merge pull request #57059 from ericchiang/client-go/remove-openapi-import
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. client-go: remove open-api import from types This builds off of https://github.com/kubernetes/kube-openapi/pull/21 and removes the following imports from `k8s.io/client-go/kubernetes`: ``` github.com/PuerkitoBio/purell github.com/PuerkitoBio/urlesc github.com/emicklei/go-restful github.com/emicklei/go-restful/log github.com/go-openapi/jsonpointer github.com/go-openapi/jsonreference github.com/go-openapi/spec github.com/go-openapi/swag github.com/mailru/easyjson/buffer github.com/mailru/easyjson/jlexer github.com/mailru/easyjson/jwriter golang.org/x/text/cases golang.org/x/text/internal golang.org/x/text/internal/tag golang.org/x/text/language golang.org/x/text/runes golang.org/x/text/secure/precis golang.org/x/text/width k8s.io/kube-openapi/pkg/common ``` /assign @sttts /assign @mbohlool cc @kubernetes/sig-api-machinery-pr-reviews ```release-note NONE ``` Kubernetes-commit: f6d0632bbbf8428bfec0ca72db5103916e6248b4
This commit is contained in:
+9
-13
@@ -27,9 +27,7 @@ import (
|
||||
|
||||
flag "github.com/spf13/pflag"
|
||||
|
||||
"github.com/go-openapi/spec"
|
||||
inf "gopkg.in/inf.v0"
|
||||
openapi "k8s.io/kube-openapi/pkg/common"
|
||||
)
|
||||
|
||||
// Quantity is a fixed-point representation of a number.
|
||||
@@ -399,17 +397,15 @@ func (q Quantity) DeepCopy() Quantity {
|
||||
return q
|
||||
}
|
||||
|
||||
// OpenAPIDefinition returns openAPI definition for this type.
|
||||
func (_ Quantity) OpenAPIDefinition() openapi.OpenAPIDefinition {
|
||||
return openapi.OpenAPIDefinition{
|
||||
Schema: spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"string"},
|
||||
Format: "",
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
// OpenAPISchemaType is used by the kube-openapi generator when constructing
|
||||
// the OpenAPI spec of this type.
|
||||
//
|
||||
// See: https://github.com/kubernetes/kube-openapi/tree/master/pkg/generators
|
||||
func (_ Quantity) OpenAPISchemaType() []string { return []string{"string"} }
|
||||
|
||||
// OpenAPISchemaFormat is used by the kube-openapi generator when constructing
|
||||
// the OpenAPI spec of this type.
|
||||
func (_ Quantity) OpenAPISchemaFormat() string { return "" }
|
||||
|
||||
// CanonicalizeBytes returns the canonical form of q and its suffix (see comment on Quantity).
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user