Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add Policy Protobufs #268

Closed
wants to merge 9 commits into from

Conversation

pbacon-blaber
Copy link

No description provided.

Copy link

sonarcloud bot commented Apr 29, 2024

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.

2 participants