Skip to content

Commit

Permalink
enhance: raml08/raml08openapi3: wrap properties with TrimSpace()
Browse files Browse the repository at this point in the history
  • Loading branch information
grokify committed Oct 27, 2022
1 parent fb2bf3f commit 0680b08
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions raml08/raml08openapi3/operations.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,14 @@ func operationMoresFromPathItem(opPath string, opPathItem map[string]any) ([]ope
opMSA := valAny.(map[string]any)
if descAny, ok := opMSA[RAMLKeyDescription]; ok {
if descStr, ok := descAny.(string); ok {
om.Operation.Description = descStr
om.Operation.Description = strings.TrimSpace(descStr)
} else {
return oms, ErrRAMLDescriptionNotString
}
}
if dispNameAny, ok := opMSA[RAMLKeyDisplayName]; ok {
if dispNameStr, ok := dispNameAny.(string); ok {
om.Operation.Summary = dispNameStr
om.Operation.Summary = strings.TrimSpace(dispNameStr)
} else {
return oms, ErrRAMLDispNameNotString
}
Expand Down

0 comments on commit 0680b08

Please sign in to comment.