This repository was archived by the owner on Mar 4, 2022. It is now read-only.
This repository was archived by the owner on Mar 4, 2022. It is now read-only.
V2 style guide does not prescribe RPC naming #578
Open
Description
There is currently no guidance in the style guide with respect to how RPCs should be named.
An example in the documentation is given as follows:
// Handles interaction with trips.
service TripAPI {
// Get the trip specified by the ID.
rpc GetTrip(GetTripRequest) returns (GetTripResponse);
// List the trips for the given user before a given time.
//
// If the start index is beyond the end of the available number
// of trips, an empty list of trips will be returned.
// If the start index plus the size is beyond the available number
// of trips, only the number of available trips will be returned.
rpc ListUserTrips(ListUserTripsRequest) returns (ListUserTripsResponse);
}
Would Get
be a reasonable alternative to GetTrip
? (Since the surrounding service already provides the context that we are dealing with "trips")
If not, is there a justification for why GetTrip
is preferred?
As another example: perhaps we could use ListForUser
rather than ListUserTrips
.
I'd like to see this clarified if possible. Thanks.
Metadata
Metadata
Assignees
Labels
No labels