diff --git a/staging/src/k8s.io/apiserver/pkg/util/openapi/enablement.go b/staging/src/k8s.io/apiserver/pkg/util/openapi/enablement.go index 693821ac025..b1db3c42b05 100644 --- a/staging/src/k8s.io/apiserver/pkg/util/openapi/enablement.go +++ b/staging/src/k8s.io/apiserver/pkg/util/openapi/enablement.go @@ -68,7 +68,7 @@ func pruneEnums(schema *spec.Schema) *spec.Schema { // note that the new lines before the header should be removed too, // thus the slice range. clone() - schema.Description = schema.Description[:headerIndex] + schema.Description = strings.TrimSpace(schema.Description[:headerIndex]) } if len(schema.Enum) != 0 { // remove the enum field