Prune trailing newlines when enums are disabled
Kubernetes-commit: d0967bbe5e78dbcdd5bc189d5fc2becafc4be0f2
This commit is contained in:
parent
8e211636c3
commit
b0b89e7e65
|
|
@ -68,7 +68,7 @@ func pruneEnums(schema *spec.Schema) *spec.Schema {
|
||||||
// note that the new lines before the header should be removed too,
|
// note that the new lines before the header should be removed too,
|
||||||
// thus the slice range.
|
// thus the slice range.
|
||||||
clone()
|
clone()
|
||||||
schema.Description = schema.Description[:headerIndex]
|
schema.Description = strings.TrimSpace(schema.Description[:headerIndex])
|
||||||
}
|
}
|
||||||
if len(schema.Enum) != 0 {
|
if len(schema.Enum) != 0 {
|
||||||
// remove the enum field
|
// remove the enum field
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue