ts-proto icon indicating copy to clipboard operation
ts-proto copied to clipboard

fix: fixed addGrpcMetadata option

Open vojty opened this issue 2 years ago • 1 comments

This PR should fix this issue https://github.com/stephenh/ts-proto/issues/188

I've removed addNestjsRestParameter parameter completely from src/generate-services.ts since NestJS seems to be is handled in generate-nestjs.

  • [x] tests

vojty avatar Jan 19 '23 15:01 vojty

Hey, @stephenh would you be so kind and have some time to look at this, please?

vojty avatar Mar 08 '24 10:03 vojty

I've added 2 separate tests. The expected output:

  1. metadataType=Foo - this should fix the current behavior and add optional metadata?: Foo to *Impl methods as well (the metadata parameter is currently present only in the type definition https://github.com/stephenh/ts-proto/blob/main/integration/generic-metadata/hero.ts#L289-L293)
  2. metadataType=Foo,addGrpcMetadata=true - the same as above
  3. addGrpcMetadata=true - adds optional metadata?: Metadata

vojty avatar Mar 12 '24 20:03 vojty

Looks great, thank you!

stephenh avatar Mar 13 '24 13:03 stephenh

:tada: This PR is included in version 1.169.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

stephenh avatar Mar 13 '24 13:03 stephenh