Closed WesTyler closed 7 years ago
Renamed keys on objects should be respected for example data generation. Felicity.example is currently renaming in the wrong direction.
Felicity.example
> Joi.object().keys({a: Joi.string()}).rename('b', 'a').validate({b: 'here'}) // { error: null, value: { a: 'here' } } > Felicity.example(Joi.object().keys({a: Joi.string()}).rename('b', 'a')) // { a: '2ezis0rcum90029hher85b3xr' }
> Joi.object().keys({a: Joi.string()}).rename('b', 'a').validate({b: 'here'}) // { error: null, value: { a: 'here' } } > Felicity.example(Joi.object().keys({a: Joi.string()}).rename('b', 'a')) // { b: '2ezis0rcum90029hher85b3xr' }
Context
What are you trying to achieve or the steps to reproduce ?
Renamed keys on objects should be respected for example data generation.
Felicity.example
is currently renaming in the wrong direction.What result did you expect ?
What result did you observe ?