I am trying to build an endpoint like this /schema?method=get&endpoint=/users/search and the purpose is the provide a "JSONified" representation of the Joi validation I'm using. This will be used by the Front-End for client-side validation.
Is this even possible? Printing server.table() doesn't seem to have the information there.
I also welcome suggestion about how to name my schema route.
You can use server.match() (for route lookup) in combination with Joi.describe() (for Joi schema description) to do what you want.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With