Skip to content

Commit

Permalink
Merge 0df13fe into f911853
Browse files Browse the repository at this point in the history
  • Loading branch information
smb158 committed Apr 23, 2020
2 parents f911853 + 0df13fe commit 704a02c
Showing 1 changed file with 2 additions and 2 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

0 comments on commit 704a02c

Please sign in to comment.