Skip to content

Commit

Permalink
Merge 6834c3c into 29240aa
Browse files Browse the repository at this point in the history
  • Loading branch information
smb158 committed May 20, 2020
2 parents 29240aa + 6834c3c commit 69996b2
Show file tree
Hide file tree
Showing 15 changed files with 1,468 additions and 10 deletions.
4 changes: 2 additions & 2 deletions codegen/method.go
Expand Up @@ -254,7 +254,7 @@ func NewMethod(
method.setValidStatusCodes()

if method.RequestType != "" {
hasNoBody := method.HTTPMethod == "GET" || method.HTTPMethod == "DELETE"
hasNoBody := method.HTTPMethod == "GET"
if method.IsEndpoint {
err := method.setParseQueryParamStatements(funcSpec, packageHelper, hasNoBody)
if err != nil {
Expand Down Expand Up @@ -1170,7 +1170,7 @@ func getQueryEncodeExpression(typeSpec compile.TypeSpec, valueName string) strin
// hasQueryParams - checks to see if either this field has a query-param annotation
// or if this is a struct, some field in it has.
// Caveat is that unannotated fields are considered Query Params IF the REST method
// should not have a body (GET, DELETE). This is an existing convenience afforded to callers
// should not have a body (GET). This is an existing convenience afforded to callers
func (ms *MethodSpec) hasQueryParams(field *compile.FieldSpec, defaultIsQuery bool) bool {

httpRefAnnotation := field.Annotations[ms.annotations.HTTPRef]
Expand Down
80 changes: 80 additions & 0 deletions examples/example-gateway/build/clients/bar/bar.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.

18 changes: 12 additions & 6 deletions examples/example-gateway/build/endpoints/bar/endpoint.go

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

0 comments on commit 69996b2

Please sign in to comment.