Skip to content

Commit

Permalink
Update openapi2_conv.go (#365)
Browse files Browse the repository at this point in the history
Co-authored-by: Pierre Fenoll <[email protected]>
  • Loading branch information
jasmanx11 and fenollp authored Jun 7, 2021
1 parent 93b7798 commit 707e4ba
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions openapi2conv/openapi2_conv.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,9 @@ func ToV3Parameter(components *openapi3.Components, parameter *openapi2.Paramete
ExtensionProps: parameter.ExtensionProps,
}
if parameter.Name != "" {
if result.Extensions == nil {
result.Extensions = make(map[string]interface{})
}
result.Extensions["x-originalParamName"] = parameter.Name
}

Expand Down

0 comments on commit 707e4ba

Please sign in to comment.