Skip to content

Commit 8da9b50

Browse files
committed
apiextensions: use canonical empty OpenAPI type
1 parent e67d5f2 commit 8da9b50

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

staging/src/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/types_jsonschema.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ type JSON struct {
6868
// See: https://github.com/kubernetes/kube-openapi/tree/master/pkg/generators
6969
func (_ JSON) OpenAPISchemaType() []string {
7070
// TODO: return actual types when anyOf is supported
71-
return []string{}
71+
return nil
7272
}
7373

7474
// OpenAPISchemaFormat is used by the kube-openapi generator when constructing
@@ -91,7 +91,7 @@ type JSONSchemaPropsOrArray struct {
9191
// See: https://github.com/kubernetes/kube-openapi/tree/master/pkg/generators
9292
func (_ JSONSchemaPropsOrArray) OpenAPISchemaType() []string {
9393
// TODO: return actual types when anyOf is supported
94-
return []string{}
94+
return nil
9595
}
9696

9797
// OpenAPISchemaFormat is used by the kube-openapi generator when constructing
@@ -111,7 +111,7 @@ type JSONSchemaPropsOrBool struct {
111111
// See: https://github.com/kubernetes/kube-openapi/tree/master/pkg/generators
112112
func (_ JSONSchemaPropsOrBool) OpenAPISchemaType() []string {
113113
// TODO: return actual types when anyOf is supported
114-
return []string{}
114+
return nil
115115
}
116116

117117
// OpenAPISchemaFormat is used by the kube-openapi generator when constructing
@@ -133,7 +133,7 @@ type JSONSchemaPropsOrStringArray struct {
133133
// See: https://github.com/kubernetes/kube-openapi/tree/master/pkg/generators
134134
func (_ JSONSchemaPropsOrStringArray) OpenAPISchemaType() []string {
135135
// TODO: return actual types when anyOf is supported
136-
return []string{}
136+
return nil
137137
}
138138

139139
// OpenAPISchemaFormat is used by the kube-openapi generator when constructing

0 commit comments

Comments
 (0)