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

Importing .proto definition in script #222

Open
DominicMCN opened this issue Apr 19, 2024 · 1 comment
Open

Importing .proto definition in script #222

DominicMCN opened this issue Apr 19, 2024 · 1 comment
Labels
enhancement New feature or request status:future We plan to work on this in the future

Comments

@DominicMCN
Copy link

Is your feature request related to a problem? Please describe.

Many times, I want to check which oneOf is being set in script. In json format, it would be quite inconvenient as I have to do something like

Object.keys(payload).includes("...") || ...

It would be useful if we can import the protobuf definition being used for current request in script, so we could use something like https://github.com/protobufjs/protobuf.js?tab=readme-ov-file#using-json-descriptors for reflection.

Describe the solution you'd like

Being able to access the .proto being used for request in script. For example via something like kreyaGrpc.definition. Furthurmore, it would be great to also have access to the request before it's sent (not sure if it's already available) via something like kreyaGrpc.request.

Describe alternatives you've considered

As described above, i currently have to do includes for all of the oneOf types, which can get big pretty fast.

@DominicMCN DominicMCN added the enhancement New feature or request label Apr 19, 2024
@CommonGuy
Copy link
Contributor

I get the use case and added this to our backlog

@CommonGuy CommonGuy added the status:future We plan to work on this in the future label Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request status:future We plan to work on this in the future
Projects
None yet
Development

No branches or pull requests

2 participants