Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Joi.any().options() should be reported in .describe() #1130

Closed
WesTyler opened this issue Mar 20, 2017 · 3 comments
Closed

Joi.any().options() should be reported in .describe() #1130

WesTyler opened this issue Mar 20, 2017 · 3 comments
Labels
feature New functionality or improvement
Milestone

Comments

@WesTyler
Copy link
Contributor

Context

  • joi version: 10.x
  • environment (node, browser): node

What are you trying to achieve or the steps to reproduce ?

The properties set by using the .options({}) method should be included in the output of .describe()

Which result you had ?

Joi.any().options({ convert: false, abortEarly: false }).describe();
// { type: 'any' }

What did you expect ?

Joi.any().options({ convert: false, abortEarly: false }).describe();
// { type: 'any', options: { convert: false, abortEarly: false } }
@teiles
Copy link

teiles commented Mar 22, 2017

Hey @WesTyler, is the describe() functionality new? describe()ing the example outputs:

{ type: 'object', children: { username: { type: 'string', flags: [Object], invalids: [Object], rules: [Object] }, password: { type: 'string', invalids: [Object], rules: [Object] }, access_token: { type: 'alternatives', alternatives: [Object] }, birthyear: { type: 'number', invalids: [Object], rules: [Object] }, email: { type: 'string', invalids: [Object], rules: [Object] } }, dependencies: [ { type: 'with', key: 'username', peers: [Object] }, { type: 'without', key: 'password', peers: [Object] } ] }

What's the vision/to-do's for fleshing out non-describe()'d Objects?

@WesTyler
Copy link
Contributor Author

Hi @teiles - no, describe has been an undocumented feature for quite some time. This specific issue came up in the course of fulfilling #1129 .

@Marsup Marsup added the request label Mar 26, 2017
@Marsup Marsup self-assigned this Jun 15, 2017
@Marsup Marsup added this to the 10.4.2 milestone Jun 15, 2017
@Marsup Marsup closed this as completed Jun 15, 2017
@hueniverse hueniverse added feature New functionality or improvement and removed request labels Sep 19, 2019
@lock
Copy link

lock bot commented Jan 9, 2020

This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature New functionality or improvement
Projects
None yet
Development

No branches or pull requests

4 participants