Skip to content

Commit 707e4ba

Browse files
jasmanx11fenollp
andauthored
Update openapi2_conv.go (#365)
Co-authored-by: Pierre Fenoll <[email protected]>
1 parent 93b7798 commit 707e4ba

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

openapi2conv/openapi2_conv.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,9 @@ func ToV3Parameter(components *openapi3.Components, parameter *openapi2.Paramete
232232
ExtensionProps: parameter.ExtensionProps,
233233
}
234234
if parameter.Name != "" {
235+
if result.Extensions == nil {
236+
result.Extensions = make(map[string]interface{})
237+
}
235238
result.Extensions["x-originalParamName"] = parameter.Name
236239
}
237240

0 commit comments

Comments
 (0)