Prune trailing newlines when enums are disabled

This commit is contained in:
Jordan Liggitt 2023-01-06 00:58:23 -05:00
parent d78de56d76
commit d0967bbe5e
No known key found for this signature in database

View File

@ -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