8
vendor/sigs.k8s.io/controller-tools/pkg/crd/schema.go
generated
vendored
8
vendor/sigs.k8s.io/controller-tools/pkg/crd/schema.go
generated
vendored
@@ -23,6 +23,7 @@ import (
|
||||
"strings"
|
||||
|
||||
apiext "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
|
||||
crdmarkers "sigs.k8s.io/controller-tools/pkg/crd/markers"
|
||||
|
||||
"sigs.k8s.io/controller-tools/pkg/loader"
|
||||
"sigs.k8s.io/controller-tools/pkg/markers"
|
||||
@@ -378,7 +379,12 @@ func structToSchema(ctx *schemaContext, structType *ast.StructType) *apiext.JSON
|
||||
}
|
||||
}
|
||||
|
||||
propSchema := typeToSchema(ctx.ForInfo(&markers.TypeInfo{}), field.RawField.Type)
|
||||
var propSchema *apiext.JSONSchemaProps
|
||||
if field.Markers.Get(crdmarkers.SchemalessName) != nil {
|
||||
propSchema = &apiext.JSONSchemaProps{}
|
||||
} else {
|
||||
propSchema = typeToSchema(ctx.ForInfo(&markers.TypeInfo{}), field.RawField.Type)
|
||||
}
|
||||
propSchema.Description = field.Doc
|
||||
|
||||
applyMarkers(ctx, field.Markers, propSchema, field.RawField)
|
||||
|
||||
Reference in New Issue
Block a user