Update openapi to use kube-openapi code

This commit is contained in:
Antoine Pelisse
2017-10-18 15:19:56 -07:00
parent 875a72fed2
commit 3ed58475c4
61 changed files with 1028 additions and 816 deletions

View File

@@ -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.