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 configuration #343
Comments
Thank so much for this feedback @djbeckett! I really appreciate. Regarding the AJV configuration, there's currently no way to change the setting without this monkey patch (expect if you implement your own hook). But adding this fix shouldn't complicated. I'll publish a new version this week to incorporate this feature. You'll be able to change the three baseline configuration properties in ajv.json (all properties are optional) {
"coerceTypes": true,
"removeAdditional": true,
"useDefaults": true
} Does it sound good? |
That sounds perfect! Thank you, thank you. |
Feature added in v0.7.7. |
@djbeckett I released v0.7.7 👍 |
Awesome! That was really fast. Thank you for these great improvements. Also did you get my note sent to your email at centraliens.net? |
Yes, I just answered. Thank you so much for your support! |
The Validation feature uses Ajv and Foal uses a baseline configuration that includes:
removeAdditional: true
For my purposes, I need this to be
false
. Other than monkey patching* Foal to change this setting (which I've done and it does now do what I need it to), how can I set this Ajv config value?* monkey patched here:
@foal/core/lib/common/utils/get-ajv-instance.js
By the way, I've spend the last few weeks looking into every Express framework and boilerplate I can find and FoalTS is BY FAR the best of them all. Better in every way: features, clarity of docs, accuracy of docs, responsive support, ongoing development, not bloated, clearly understands the needs of api developers, etc. We're doing a proof-of-concept now with Foal for an open api, which is why I'm focusing on the details of data validation. Thank you so much for this excellent framework!
dan
The text was updated successfully, but these errors were encountered: