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

object renames do not appear in describe api. #1026

Closed
WesTyler opened this issue Nov 5, 2016 · 2 comments
Closed

object renames do not appear in describe api. #1026

WesTyler opened this issue Nov 5, 2016 · 2 comments
Labels
feature New functionality or improvement
Milestone

Comments

@WesTyler
Copy link
Contributor

WesTyler commented Nov 5, 2016

Context

  • node version: 4.4.0, 4.5.0, 6.9.0
  • joi version: 9.2.0
  • environment (node, browser): node
  • used with (hapi, standalone, ...): standalone
  • any other relevant information:

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

We are building a utility around Joi schema, utilizing the describe() api. Our expectation is that actions that modify/mutate properties should appear in the describe'ed schema.

const schema = Joi.object().keys({b: Joi.number()}).rename('a', 'b');
const schemaDescription = schema.describe();

Which result you had ?

//schemaDescription:
{ 
    type: 'object',
    children: { 
        b: { type: 'number', invalids: [ Infinity, -Infinity ] }
    }
}

What did you expect ?

Some property in schemaDescription.children.b that indicates a rename has been defined.

@WesTyler
Copy link
Contributor Author

WesTyler commented Nov 5, 2016

If any maintainers agree with my assumption that this should be in the describe'd output, I can make a PR to add this functionality. Just let me know :)

@Marsup Marsup added this to the 10.0.0 milestone Nov 6, 2016
@Marsup Marsup added the request label Nov 6, 2016
@Marsup Marsup self-assigned this Nov 6, 2016
@Marsup Marsup closed this as completed Nov 6, 2016
@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

3 participants