api: combining fastify schemas with joi validation #970
laurenzhonauer
started this conversation in
Ideas
Replies: 1 comment
-
Idea: Completely getting rid of joi in the api. PROS:
CONS:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In the fastify documentation it is mentioned that validation libraries like joi can be "included" in the schema definition.
Currently we are doing both seperatly, by combining the joi config into the schema definition the api code could be reduced and become more readable and maintainable.
https://www.fastify.io/docs/latest/Reference/Validation-and-Serialization/#using-other-validation-libraries
Beta Was this translation helpful? Give feedback.
All reactions