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 Nov 11, 2021
1 parent 32316b9 commit 66efdfa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/codegen/templates/gin/gin-wrappers.tmpl
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
2 changes: 1 addition & 1 deletion pkg/codegen/templates/templates.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 66efdfa

Please sign in to comment.