Skip to content

Commit

Permalink
ISSUE: #17373 [BUG] [Go-server] invalid composite literal type string (
Browse files Browse the repository at this point in the history
…#20467)

* modules/openapi-generator/src/main/resources/go-server: alternative initialization of variable, to avoid extra checks and custom code

* propagated changes to samples
  • Loading branch information
vingarzan authored Jan 15, 2025
1 parent 5785743 commit dcf472a
Show file tree
Hide file tree
Showing 12 changed files with 24 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ func (c *{{classname}}Controller) {{nickname}}(w http.ResponseWriter, r *http.Re
{{paramName}}Param := r.Header.Get("{{baseName}}")
{{/isHeaderParam}}
{{#isBodyParam}}
{{paramName}}Param := {{dataType}}{}
var {{paramName}}Param {{dataType}}
d := json.NewDecoder(r.Body)
{{^isAdditionalPropertiesTrue}}
d.DisallowUnknownFields()
Expand Down
4 changes: 2 additions & 2 deletions samples/openapi3/server/petstore/go/go-petstore/go/api_pet.go

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

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

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

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

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

4 changes: 2 additions & 2 deletions samples/server/petstore/go-api-server/go/api_pet.go

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

2 changes: 1 addition & 1 deletion samples/server/petstore/go-api-server/go/api_store.go

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

8 changes: 4 additions & 4 deletions samples/server/petstore/go-api-server/go/api_user.go

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

4 changes: 2 additions & 2 deletions samples/server/petstore/go-chi-server/go/api_pet.go

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

2 changes: 1 addition & 1 deletion samples/server/petstore/go-chi-server/go/api_store.go

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

8 changes: 4 additions & 4 deletions samples/server/petstore/go-chi-server/go/api_user.go

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

0 comments on commit dcf472a

Please sign in to comment.