Skip to content

Commit

Permalink
Fixed wrong code in gin template
Browse files Browse the repository at this point in the history
  • Loading branch information
yamamoto-febc committed Jan 27, 2022
1 parent bd5a9da commit 4c7c53e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/codegen/templates/gin/gin-wrappers.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,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 4c7c53e

Please sign in to comment.