Skip to content

Commit

Permalink
Support delete method in swagger generator
Browse files Browse the repository at this point in the history
  • Loading branch information
blackdahila committed Apr 23, 2018
1 parent e8bd377 commit c212679
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions protoc-gen-swagger/genswagger/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -586,6 +586,13 @@ func renderServices(services []*descriptor.Service, paths swaggerPathsObject, re
return err
}
parameters = append(parameters, queryParams...)
} else if b.HTTPMethod == "DELETE" {
// add the parameters to the query string
queryParams, err := messageToQueryParameters(meth.RequestType, reg, b.PathParams)
if err != nil {
return err
}
parameters = append(parameters, queryParams...)
}

pathItemObject, ok := paths[templateToSwaggerPath(b.PathTmpl.Template)]
Expand Down

0 comments on commit c212679

Please sign in to comment.