Skip to content

Conversation

@pbacon-blaber
Copy link

No description provided.

@sonarqubecloud
Copy link

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

& OneOf<{ scope: ResourceAttribute }>

export type EntityEntitlements = {
entityId?: string
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, it seems that this package marks every field as optional when generating code.

There is a very old / stale issue on this which doesn't appear to have any progress in the last two years: grpc-ecosystem/protoc-gen-grpc-gateway-ts#26

Is this a dealbreaker for us using protoc-gen-grpc-gateway-ts @strantalis?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also getting the following error message when building the protos:

Warning: plugin "grpc-gateway-ts" does not support required features.
  Feature "proto3 optional" is required by 1 file(s):
    authorization/authorization.proto

Pretty new to all this protobuf stuff so wondering if this is something that's easily fixed by adding another plugin? Or is it more complicated than that

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm kinda surprised optional is a feature of proto3. I've been outta the loop. https://stackoverflow.com/a/62566052/23894185

Copy link
Member

@dmihalcik-virtru dmihalcik-virtru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd assumed we'd be going through REST via our Swagger json using something like openapi-typescript, but this generated code seems like it might be better? plus it is likely more performant

& OneOf<{ scope: ResourceAttribute }>

export type EntityEntitlements = {
entityId?: string
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm kinda surprised optional is a feature of proto3. I've been outta the loop. https://stackoverflow.com/a/62566052/23894185

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants