type OpenAPIDefinition struct {
Schema spec.Schema
Dependencies []string
}
"k8s.io/sample-apiserver/apis/wardle/v1alpha1.Flunder": {
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
Properties: map[string]spec.Schema{
"kind": {
SchemaProps: spec.SchemaProps{
Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds",
Type: []string{"string"},
Format: "",
},
},
"apiVersion": {
SchemaProps: spec.SchemaProps{
Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources",
Type: []string{"string"},
Format: "",
},
},
"metadata": {
SchemaProps: spec.SchemaProps{
Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"),
},
},
"spec": {
SchemaProps: spec.SchemaProps{
Ref: ref("k8s.io/sample-apiserver/apis/wardle/v1alpha1.FlunderSpec"),
},
},
"status": {
SchemaProps: spec.SchemaProps{
Ref: ref("k8s.io/sample-apiserver/apis/wardle/v1alpha1.FlunderStatus"),
},
},
},
},
},
Dependencies: []string{
"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/sample-apiserver/apis/wardle/v1alpha1.FlunderSpec", "k8s.io/sample-apiserver/apis/wardle/v1alpha1.FlunderStatus"},
spec.VendorExtensible: {
Extensions: spec.Extensions{
"x-kubernetes-api-type": "true",
"x-kubernetes-version": "v1alpha1",
"x-kubernetes-group": "wardle",
"x-kubernetes-kind": "Flunder",
},
},
go build main.go
# k8s.io/sample-apiserver/pkg/openapi
pkg/openapi/openapi_generated.go:7468: unknown openapi.OpenAPIDefinition field 'spec.VendorExtensible' in struct literal
- There is not field of type
spec.VendorExtensible
in the OpenAPIDefinition
type
spec.VendorExtensible: {
is a type, not a field name