Skip to content

Commit

Permalink
Fix reference to undefined variable in gin codegen (deepmap#550)
Browse files Browse the repository at this point in the history
  • Loading branch information
wvdschel-f3 committed Apr 19, 2022
1 parent 44e4877 commit bfe5e17
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/codegen/templates/gin/gin-wrappers.tmpl
Expand Up @@ -74,7 +74,7 @@ func (siw *ServerInterfaceWrapper) {{$opid}}(c *gin.Context) {
{{end}}

{{if .HeaderParams}}
headers := r.Header
headers := c.Request.Header

{{range .HeaderParams}}// ------------- {{if .Required}}Required{{else}}Optional{{end}} header parameter "{{.ParamName}}" -------------
if valueList, found := headers[http.CanonicalHeaderKey("{{.ParamName}}")]; found {
Expand Down

0 comments on commit bfe5e17

Please sign in to comment.