Types for Joi.build
Open
types
- Dominant language
- JavaScript
- Stars
- 21.2k
- Forks
- 1.5k
- Avg merge
- 4h 57m
- Merged PRs (30d)
- 14
Description
Hey!
I'm implementing a way for my front-end to retrieve validation schemes from the back-end automatically. While snooping around I realized that I can use `schema.describe()` in conjunction with `Joi.build()`. I wouldn't believe that this is officially supported, but I wanted to mention that the the type definition says the following:
https://github.com/sideway/joi/blob/a2ac147a3ef6c2d96ac2f3ae3407306de1ceb01c/lib/index.d.ts#L2181-L2184
It would appear that `Joi.build()` takes a description object and parses it into a proper Joi schema. Is that the intended behavior, and should the definitions be updated?
Cheers!
Contributor guide
Assessment
This issue has not been assessed yet.