Skip to content

Commit 0680b08

Browse files
committed
enhance: raml08/raml08openapi3: wrap properties with TrimSpace()
1 parent fb2bf3f commit 0680b08

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

raml08/raml08openapi3/operations.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -102,14 +102,14 @@ func operationMoresFromPathItem(opPath string, opPathItem map[string]any) ([]ope
102102
opMSA := valAny.(map[string]any)
103103
if descAny, ok := opMSA[RAMLKeyDescription]; ok {
104104
if descStr, ok := descAny.(string); ok {
105-
om.Operation.Description = descStr
105+
om.Operation.Description = strings.TrimSpace(descStr)
106106
} else {
107107
return oms, ErrRAMLDescriptionNotString
108108
}
109109
}
110110
if dispNameAny, ok := opMSA[RAMLKeyDisplayName]; ok {
111111
if dispNameStr, ok := dispNameAny.(string); ok {
112-
om.Operation.Summary = dispNameStr
112+
om.Operation.Summary = strings.TrimSpace(dispNameStr)
113113
} else {
114114
return oms, ErrRAMLDispNameNotString
115115
}

0 commit comments

Comments
 (0)