Coerce configuration input#8319
Merged
Merged
Conversation
Instead of normalizing just for schema validation, normailze also for use
Codecov Report
@@ Coverage Diff @@
## master #8319 +/- ##
==========================================
- Coverage 88.02% 88.02% -0.01%
==========================================
Files 249 249
Lines 9312 9308 -4
==========================================
- Hits 8197 8193 -4
Misses 1115 1115
Continue to review full report at Codecov.
|
This was referenced Oct 1, 2020
Merged
Merged
medikoo
added a commit
that referenced
this pull request
Oct 8, 2020
They were removed by mistake with #8319. It's only primitive/array combinations where singular variant should be removed. object/array should be left intact
This was referenced Oct 8, 2020
medikoo
added a commit
that referenced
this pull request
Oct 8, 2020
They were removed by mistake with #8319. It's only primitive/array combinations where singular variant should be removed. object/array should be left intact
medikoo
added a commit
that referenced
this pull request
Oct 8, 2020
They were removed by mistake with #8319. It's only primitive/array combinations where singular variant should be removed. object/array should be left intact
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
So far version validation was strict, we've just allowed
nullvalues (properties withnullwere removed for validation), still that imposes not justified burden (as e.g. case described here: #8285 (comment))This patch ensures that
nullvalued properties are cleared from resolved config not only for validation but also for it's further processing, and more importantly it coerces primitive values so they adhere to schema.Coercion is done per rules described here: https://ajv.js.org/coercion.html (
with array coercion turned off at this point, as it seems it be problematic: ajv-validator/ajv#1294)