-
Notifications
You must be signed in to change notification settings - Fork 62
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
feat(validation): allow additionalProperties (closes #401) #411
Conversation
Self note: rather than making this a schema compile time option across most/all definitions, let's:
|
Codecov Report
@@ Coverage Diff @@
## devel #411 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 22 22
Lines 451 461 +10
Branches 142 146 +4
=========================================
+ Hits 451 461 +10
Continue to review full report at Codecov.
|
For those following, here's the new section in the validation docs: A Note on "Additional Properties"Since v2.2 (March 2022) We now allow "additional properties" on results received from Yahoo. This means that while we can still guarantee the type of all known fields we This is important because Yahoo constantly add new fields, and this would You can revert to the old behaviour with: yahooFinance._disallowAdditionalProps(); which is the default when |
I feel like this is low risk and can help prevent future unnecessary breakages in existing deployments, so I'm going to go ahead and merge and release. |
🎉 This PR is included in version 2.2.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
@gadicc awesome work! |
Closes #401.
Not done yet but in process.
We need to make a distinction between Options and Results, since we do actually rely on
{ additionalProperties: false }
to validate the options the user is passing to various modules (and ensure e.g. they didn't mispell anything).Should be fine to simply traverse the tree and apply
additionalProperties
on interfaces with names endingOptions
(while remembering there's a module calledOptions
too, and see if there are any other naming conflicts).