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(Test): add sample for testing proto3 custom options #1133

Closed
wants to merge 1 commit into from

Conversation

zakhenry
Copy link
Contributor

@zakhenry zakhenry commented Nov 10, 2024

This PR is more of a request for comment - ts-proto doesn't yet support proto3 custom options (they are defined in proto2 docs, but are actually well supported in proto3). I've added a sample proto of the kinds of fields that can be used, and want to start discussion on how this might be incoporated into the ts-proto api (behind which flags etc)

@zakhenry zakhenry changed the title feat(Test): add sample for testing proto3 extensions feat(Test): add sample for testing proto3 custom options Nov 10, 2024
@@ -0,0 +1 @@
outputExtensions=true,unknownFields=true,outputServices=generic-definitions,outputServices=default
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I initially thought I could get this working with outputExtensions=true, but actually I suspect this needs to be an entirely new flag outputCustomOptions=true ?

@zakhenry
Copy link
Contributor Author

wait this might just be #570. I'll sanity check myself then close if it's covered by that flag

@zakhenry
Copy link
Contributor Author

yea it is, whoops

@zakhenry zakhenry closed this Nov 10, 2024
@stephenh
Copy link
Owner

Np @zakhenry , good find that there is an existing issue for this -- re-reading that issue, sounds like there were some distractions/complications from the Exact type, but that otherwise the outputSchema afaiu includes options...

Granted, probably as part of its larger "schema for all your messages" output, but in theory it has code that reads the options, that could then be included in the grpc service definition output...

If you'd like to make a PR for #570 that just always outputs options into the grpc service output (if I'm following along), that'd be great! Thanks!

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