-
Notifications
You must be signed in to change notification settings - Fork 589
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
feature request: javascript/typescript support #71
Comments
Totally! |
@glerchundi Are you planning to work on this? |
@AnteGulin probably in January but we need to first discuss the approach of course:
And probably much more question, any thoughts? |
/cc @aberasarte |
any update on this ? |
I think pure JS with TS stubs is the way to go, if that makes sense.
For consistency with the rest of the languages, a single validate is preferred. While some of these implementations fail fast, if desired the function can gather all violations into a single error for per-property introspection. That said, if you want to go beyond that and provide per-property, I think that's fine too.
This isn't implemented yet, and is meant for validating that the value of a field is a valid regex, not that the value matches a regex. I'd not worry about this at the moment. |
@glerchundi @rodaine |
As we want to have a full closed loop for the js code generation as well as the validation part of it, we're blocked on this: protocolbuffers/protobuf-javascript#65. I think this can workaround by doing some |
Ok then... |
Gently pining this ticket. Is it truly blocked on protocolbuffers/protobuf-javascript#65 it's hard to tell if that one is ever going to get fixed. Would it be possible to make some progress on this feature with the assumption that there are caveats (e.g. non-separability of the generated code modules)? Maybe even support by targeting another proto JS or TS generator? |
Watching.. |
@glerchundi do you think theres any way around protocolbuffers/protobuf-javascript#65 ? |
We can target the one that we created. We have the ability to iterate quicker than any other plugin out there. I am ready to implement the validation runtime here and get it working with https://github.com/thesayyn/protoc-gen-ts The only thing that I need right now, a runtime implemented here. |
Would love to see a js/ts implementation |
@thesayyn any updates on this one ? |
For anyone interested, this project (not mine), maps protoc-gen-validate grammar to an Open API spec, which then generates validation code. It's not perfect, but at least an option for anyone waiting on this to be resolved. |
actually i thought that buf (and connect-web) is primarly here to make the perfect support for web/java/typescriprt and grpc. Now i wonder why we don't have validation and a language such as go ?!? is preferred ? |
just for reference connectrpc/connect-es#270 |
Thanks for your feature request for TypeScript support. We appreciate your interest in enhancing the usability of I wanted to let you know that we're actively working on adding TypeScript support in the With that said, I'll be closing this issue as we're addressing it in the |
Are you open for a PR supporting javascript/typescript?
The text was updated successfully, but these errors were encountered: