Skip to content

How do you deprecate an rpc from a service? #404

@prayansh

Description

@prayansh

Hi there!

I am looking to deprecate some old RPCs from my twirp service and was wondering if there was a way to let the auto-gen client raise compile time warnings for use of these deprecated RPCs.

I tried doing something like this but dont see any changes in the generated client to reflect the deprecation, so was wondering if I am approaching this the wrong way

service Service1 {

  rpc RPC1(Input) returns (Output){
    option deprecated = true;
  }

  rpc RPC2(Input) returns (Output);
}

I am currently planning to serve a 403 error through my RPC implementation but it would be great if the generated client could also warn users on compilation that the service is deprecated, once upgraded.

I am using golang with twirp and generating golang and javascript clients

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions