Skip to content

Describe references as such #345

@Marsup

Description

@Marsup

As mentioned in outmoded/lout#57, references should have their own descriptions.

> Joi.compile(Joi.ref('a.b')).describe()
{ type: 'any',
  flags: { allowOnly: true },
  valids:
   [ undefined,
     { [Function]
       isContext: false,
       key: 'a.b',
       path: [Object],
       depth: 2,
       root: 'a',
       isJoi: true,
       toString: [Function] } ],
  invalids: [ null ] }

I think isContext, key, path, depth, root should be exposed at the root of the description and type should indeed be ref.

Metadata

Metadata

Assignees

Labels

bugBug or defect

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions