Skip to content

Commit

Permalink
enhance: `raml08/raml08openapi3: use parsed HTTP method
Browse files Browse the repository at this point in the history
  • Loading branch information
grokify committed Oct 27, 2022
1 parent 0680b08 commit c44b14e
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 @@ -91,13 +91,13 @@ func operationMoresFromPathItem(opPath string, opPathItem map[string]any) ([]ope
oms := []openapi3edit.OperationMore{}
for k, valAny := range opPathItem {
// check if current `opPathItem`` property is an HTTP method, and add operations if so.
_, err := httputilmore.ParseHTTPMethod(k)
methodCanonical, err := httputilmore.ParseHTTPMethod(k)
if err != nil { // err means not known HTTP Method
continue
}
om := openapi3edit.OperationMore{
Path: opPath,
Method: strings.ToUpper(strings.TrimSpace(k)),
Method: string(methodCanonical),
Operation: &oas3.Operation{}}
opMSA := valAny.(map[string]any)
if descAny, ok := opMSA[RAMLKeyDescription]; ok {
Expand Down

0 comments on commit c44b14e

Please sign in to comment.