-
Notifications
You must be signed in to change notification settings - Fork 66
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
Possible Enhancement #30
Comments
I'm not entirely sure what you're proposing here. I think we're unlikely to add or remove anything from the interface. We want to keep this as a very thin layer on top of joi. Perhaps you could post some code showing the proposed APIs you'd be adding? |
Sorry if that wasn't clear. The library I created is a very thin layer on top of your library. All it does is provide a couple facade methods to make things easier to read. It allows you to do stuff like: app.get('/',
vayder.validateHeaders(AuthenticationSchema),
vayder.validateQuery(paginationSchema),
vayder.validateParams(userIdSchema),
someController.doStuff); I was wondering if you guys wanted that functionality directly inside celebrate. Otherwise I will keep it in my repo. Cheers |
I'm not sure what @arb thinks, but I think leaving the two modules/APIs separate makes sense. |
I agree with @cjihrig on this one. If you want to expose a wrapper like that, that's fine. That approach actually goes against one of the project goals of the project; being as close to hapi as reasonably possible. |
Understood, thanks for considering! Thanks again for your work. |
Hey guys,
First of all, thank you very much for the repo you created. I have used Celebrate at the company I work at with great success, and it is used in production.
I recently built a library that exposes a fluent interface for Celebrate. You can find it here: https://github.com/naveedn/vayder
I built the library because the Express middleware pipeline lends itself to declaratively chaining validations, and the facade pattern makes it easy to understand what Celebrate is doing.
I was wondering if you guys were interested in having this interface directly incorporated in your repo?
Thanks again!
The text was updated successfully, but these errors were encountered: