xogroup / felicity

Javascript object constructors and sample data based on Joi schema.
Other
111 stars 9 forks source link

Allow configurations. #19

Closed WesTyler closed 7 years ago

WesTyler commented 7 years ago

There are some assumptions Felicity makes, such as stamping default values in and stripping optional properties out.

Both Felicity.skeleton and Felicity.example should take an optional configuration object to toggle these defaults as needed.

WesTyler commented 7 years ago

Also allow option for "strict mode" in example. That is, make Felicity self-validate the example output prior to returning, and throw a validation error if invalid. (I'm looking at you regex lookarounds)