Clarify Joi.ref documentation to work with arrays.
Open
documentation
- Dominant language
- JavaScript
- Stars
- 21.2k
- Forks
- 1.5k
- Avg merge
- 4h 57m
- Merged PRs (30d)
- 14
Description
#### What are you trying to achieve or the steps to reproduce ?
Please update the documentation for joi.ref. The example part to:
```
{
x: {
a: Joi.any(),
b: {
c: Joi.any(),
d: Joi.ref('c'),
e: Joi.ref('...a'),
f: Joi.ref('....y')
},
c: Joi.array().items({
g: Joi.ref('....a'),
}),
},
y: Joi.any()
}
```
It is not clear that the array needs one more level and dot to get to the grandparent.
Contributor guide
Assessment
This issue has not been assessed yet.