-
-
Notifications
You must be signed in to change notification settings - Fork 137
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
AJV $data support #920 #923
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for taking care of this @ZakRabe and thank you for the style consistency of your tests. I added some notes below.
Also, to ensure that we have a stable product that is backwards compatible with previous versions, we should not add new defaults to the AJV instance configuration. Could you leave the default value $data
as undefined? I guess this will require updating some of your tests.
@LoicPoullain Thanks for the feedback. Updated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
Issue
Add support for the AJV $data option to Foal configuration. Resolves #920
Solution and steps
$data
attribute to options passed to AJV initialization ingetAjvInstance
, defaulted toundefined
should accept custom configuration from the Config
to test the case where$data
istrue
. Tested both validation success and failure.getAjvInstance
to test the default case where$data
isundefined
.ConfigTypeError
whensettings.ajv.$data
has an invalid type.Checklist
update/checkdocs (code comments and docs/ folder).update/check tests.