-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No match data when field type is not string #96
Comments
Input format is defined in stub. You can read for solution here p/s: Please edit request with style code. |
Sorry, I can't find solution in above link https://github.com/tokopedia/gripmock. Can't you tell me in details? |
Sorry for late! You can show me the docker command line that you use? and all steps, file stub you defined, command lines you run... please detail. |
Sorry for late. Let me give you some details.
|
If the field's type is string, everything goes well. But for a field whose type is not string, data can't be matched.
example:
------- pfoto file -------
// The Gripmock service definition.
service Gripmock {
// simple unary method
rpc SayHello (Request) returns (Reply);
}
// The request message containing the user's name.
message Request {
google.protobuf.StringValue name = 1;
}
// The response message containing the greetings
message Reply {
string message = 1;
int32 return_code = 2;
}
with stub
curl -X POST -d '{"service":"Greeter","method":"SayHello","input":{"equals":{"name":"gripmock"}},"output":{"data":{"message":"Hello GripMock"}}}' localhost:4771/add
though below command can run well.
curl -X POST -d '{"service":"Greeter","method":"SayHello",{"data":{"name":"gripmock"}}}' localhost:4771/find
But when I tried grpcrul command like
grpcurl -plaintext -d @ localhost:4770 helloworld.Greeter/SayHello
{"name":"gripmock"}
^Z
Below error occurred.
ERROR:
Code: Unknow
Message: Can't find stub
Service: SayHello
Input
{
name: map[value:gripmock]
}
Closest Match
equals:{
name: gripmock
}
It seems other types except string type, map[value is added to input. Thus data can't be matched.
How to fix it?I tried to send the request by BloomRPC, the same error ocurred.
The text was updated successfully, but these errors were encountered: