hapijs / hapijs/joi

Clarify Joi.ref documentation to work with arrays.

Open
#2,899 3 comments 1 reaction 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.