I have a service defined this way :
service Service {
rpc SearchCategory(SearchCategoryRequest) returns (SearchCategoryResponse) {
option (google.api.http) = {
get: "/v1/categories/search"
};
}
rpc GetCategory(GetCategoryRequest) returns (GetCategoryResponse) {
option (google.api.http) = {
get: "/v1/categories/{id.val}"
};
}
}
The problem is that even if I call search?q=MyQuery
, it is caught by the GetCategory
method and it tries to get the category with id search
.
I suppose it is because the paths are very close. Is there a way of defining a priority in the routes like one would do in a classic web application ?
Thanks