mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-06 07:57:35 +00:00
Update openapi to use kube-openapi code
This commit is contained in:
@@ -17,14 +17,14 @@ limitations under the License.
|
||||
package parse
|
||||
|
||||
import (
|
||||
"k8s.io/kube-openapi/pkg/util/proto"
|
||||
"k8s.io/kubernetes/pkg/kubectl/apply"
|
||||
"k8s.io/kubernetes/pkg/kubectl/cmd/util/openapi"
|
||||
)
|
||||
|
||||
// mapElement builds a new mapElement from a mapItem
|
||||
func (v ElementBuildingVisitor) mapElement(meta apply.FieldMetaImpl, item *mapItem) (*apply.MapElement, error) {
|
||||
// Function to return schema type of the map values
|
||||
var fn schemaFn = func(string) openapi.Schema {
|
||||
var fn schemaFn = func(string) proto.Schema {
|
||||
// All map values share the same schema
|
||||
if item.Map != nil && item.Map.SubType != nil {
|
||||
return item.Map.SubType
|
||||
@@ -43,7 +43,7 @@ func (v ElementBuildingVisitor) mapElement(meta apply.FieldMetaImpl, item *mapIt
|
||||
}
|
||||
|
||||
// schemaFn returns the schema for a field or map value based on its name or key
|
||||
type schemaFn func(key string) openapi.Schema
|
||||
type schemaFn func(key string) proto.Schema
|
||||
|
||||
// createMapValues combines the recorded, local and remote values from
|
||||
// data into a map of elements.
|
||||
|
||||
Reference in New Issue
Block a user