-
Notifications
You must be signed in to change notification settings - Fork 8
Rename RPC parameters #149
Copy link
Copy link
Closed
Labels
part:protobufAffects the protocol buffer definition filesAffects the protocol buffer definition filespriority:highAddress this as soon as possibleAddress this as soon as possibletype:enhancementNew feature or enhancement visitble to usersNew feature or enhancement visitble to users
Milestone
Metadata
Metadata
Assignees
Labels
part:protobufAffects the protocol buffer definition filesAffects the protocol buffer definition filespriority:highAddress this as soon as possibleAddress this as soon as possibletype:enhancementNew feature or enhancement visitble to usersNew feature or enhancement visitble to users
What's needed?
Currently, the RPC param names have no link with the RPC name, and ity makes reading the API a bit difficult.
E.g.,
frequenz-api-microgrid/proto/frequenz/api/microgrid/microgrid.proto
Line 87 in 8e5dabf
Proposed solution
If an RPC is named
GetX, then its request message should be namedGetXRequestand its response should be namedX. Same forStreamXandSubscribeX.Otherwise,
if an RPC is named
VerbX, then its request message should be namedVerbXRequest. Its response should be namedVerbXResponse, unless the response type isgoogle.protobuf.Empty.E.g., the RPC definition linked above should be renamed to the following:
If the request or the response param is
google.protobuf.Empty, it can be left as is.Use cases
No response
Alternatives and workarounds
No response
Additional context
No response