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

$$$options is showing up as a valid parameter for actions using Zod #10

Open
TheAppleFreak opened this issue Jun 25, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@TheAppleFreak
Copy link
Owner

Saw this while working on my current project. The $node services use fastest-validator, while everything else uses moleculer-zod-validator currently.

The $$$options param should not be showing up here, indicating there's a bug in the validator itself. Was pretty sure I stripped that out of the stuff that I send to the broker...

@TheAppleFreak TheAppleFreak added the bug Something isn't working label Jun 25, 2023
@TheAppleFreak
Copy link
Owner Author

Hmm, not sure how to handle this. $$$options does get stripped out at validation time, so if anyone tries filling that out it'll be stripped from the validator output (assuming the default of strip is true) and will have no effect at runtime.

I tried setting $$$options to non-enumerable in ZodParams, but that kinda broke everything, and I'm not entirely sure how to mitigate that right now. Something to think about.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant