Closed douchunrong closed 3 years ago
Hi @douchunrong I think I see the issue, looks like we could use some better handling somewhere to warn about this. But truss is trying to generate queryParam logic for your DeployRequest
message. This is because the HEAD request blob you have doesn't indicate to put the fields in the body, so it defaults to in the query params.
There are 2 possible ways to fix this, one that might work, and one that I'm sure will work.
The one that might work, is to simply add body : "*"
to the head request blob, that should allow the code to pass generation (as it will no longer attempt to generate query params) and I believe operate as you expect.
The other approach which I use in my own services for OPTIONS
requests is to define a separate rps for the HEAD
request. Something like:
message Empty {}
// With the following additional RPC defined in your service
rpc DeployHEAD (Empty) returns (Empty) {
option (google.api.http) = {
custom {
kind: "HEAD"
path: "/dssp_engine_execute/workflow/deploy"
}
};
Hope this helps!
Hi @douchunrong I think I see the issue, looks like we could use some better handling somewhere to warn about this. But truss is trying to generate queryParam logic for your
DeployRequest
message. This is because the HEAD request blob you have doesn't indicate to put the fields in the body, so it defaults to in the query params.There are 2 possible ways to fix this, one that might work, and one that I'm sure will work.
The one that might work, is to simply add
body : "*"
to the head request blob, that should allow the code to pass generation (as it will no longer attempt to generate query params) and I believe operate as you expect.The other approach which I use in my own services for
OPTIONS
requests is to define a separate rps for theHEAD
request. Something like:message Empty {} // With the following additional RPC defined in your service rpc DeployHEAD (Empty) returns (Empty) { option (google.api.http) = { custom { kind: "HEAD" path: "/dssp_engine_execute/workflow/deploy" } };
Hope this helps!
yes, thank's for your help. it's worked for me.
my proto file:
dssp_engine_execute.proto
when i run
truss dssp_engine_execute.proto
returnWARN
:and in
transport_http.go
file `:how can i fix it ? anyone help me?