-
-
Notifications
You must be signed in to change notification settings - Fork 59
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
Adding validation support with AJV inside Mali.js #273
Comments
Yes, I currently use Ajv in Mali as request validation. |
@HsinHeng I've updated mali-ajv to use pre-compiled schemas and released 0.2.0 version (https://github.com/anonrig/mali-ajv/releases/tag/0.2.0). Would you like us to add a default support for Ajv inside Mali? |
It sounds great to support request validation & you pick a good validation lib. |
A small request is, can we pass customized grpc status code or error object if failed validation. maybe INVALID_ARGUMENT, FAILED_PRECONDITION are suits for several use cases. |
Hey @HsinHeng Just released 0.3.0 with the following feature. (https://github.com/anonrig/mali-ajv/releases/tag/0.3.0) |
It looks great.
details document is here. because i used some options in my projects. maybe interface of options parameter could like fastify.io.
Thanks your kindly help again. |
Any update on this issue? Seems like a good idea to have validation with AJV 🤗 |
I've built a separate package to support this called mali-ajv but I'm not really quite sure to integrate it into the core of Mali. |
Initially I wanted to add Ajv support just like Fastify to Mali.js but before that I released it on Github on https://github.com/anonrig/mali-ajv.
I wanted to ask the community whether having JSON schema validation support for Mali.js inputs/requests would be a good idea.
The text was updated successfully, but these errors were encountered: