Skip to content
This repository has been archived by the owner on Mar 4, 2022. It is now read-only.

V2 style guide does not prescribe RPC naming #578

Open
bjohnson-va opened this issue Apr 19, 2021 · 0 comments
Open

V2 style guide does not prescribe RPC naming #578

bjohnson-va opened this issue Apr 19, 2021 · 0 comments

Comments

@bjohnson-va
Copy link

bjohnson-va commented Apr 19, 2021

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant