File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,10 @@ type Generator struct {
39
39
// Kubernetes API servers. The storage version's schema will be used as
40
40
// the CRD's schema.
41
41
TrivialVersions bool `marker:",optional"`
42
+
43
+ // MaxDescLen is the maximum allowed length for description for each
44
+ // field in CRD's OpenAPI schema.
45
+ // MaxDescLen int64 `marker:",optional"`
42
46
}
43
47
44
48
func (Generator ) RegisterMarkers (into * markers.Registry ) error {
Original file line number Diff line number Diff line change @@ -160,7 +160,9 @@ func (p *Parser) NeedCRDFor(groupKind schema.GroupKind) {
160
160
if typeInfo == nil {
161
161
continue
162
162
}
163
- fullSchema := FlattenEmbedded (p .flattener .FlattenType (typeIdent ), pkg )
163
+ fullSchema := TruncateDescription (
164
+ FlattenEmbedded (p .flattener .FlattenType (typeIdent ), pkg ),
165
+ 0 )
164
166
ver := apiext.CustomResourceDefinitionVersion {
165
167
Name : p .GroupVersions [pkg ].Version ,
166
168
Served : true ,
You can’t perform that action at this time.
0 commit comments