Skip to content

Rename RPC parameters #149

@tiyash-basu-frequenz

Description

@tiyash-basu-frequenz

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.,

rpc SubscribeComponentData(ComponentIdParam) returns (stream ComponentData) {

Proposed solution

If an RPC is named GetX, then its request message should be named GetXRequest and its response should be named X. Same for StreamX and SubscribeX.

Otherwise,

if an RPC is named VerbX, then its request message should be named VerbXRequest. Its response should be named VerbXResponse, unless the response type is google.protobuf.Empty.

E.g., the RPC definition linked above should be renamed to the following:

rpc SubscribeComponentData(SubscribeComponentDataRequest) returns (stream ComponentData)

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

Metadata

Metadata

Labels

part:protobufAffects the protocol buffer definition filespriority:highAddress this as soon as possibletype:enhancementNew feature or enhancement visitble to users

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions