-
Notifications
You must be signed in to change notification settings - Fork 35
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
2288-Input and internal config validation #2289
2288-Input and internal config validation #2289
Conversation
6b967e1
to
c5e9ce3
Compare
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.
Reviewed 7 of 7 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @Alex-NRCan, @DamonU2, and @ychoquet)
packages/geoview-core/src/api/config/types/config-validation-schema.json
line 330 at r1 (raw file):
"type": "string" }, "useInternalSchema": {
Should it be a flag in the schema? Should we encapsulate the internal validation inside the object? The function should always deal with validate input (user schema). The output of this call can be use to validate against internal. There should be no way to ask for internal validation from a user schema.
Lets discuss about this
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.
Reviewed 7 of 7 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @DamonU2 and @ychoquet)
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.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @Alex-NRCan, @DamonU2, and @jolevesq)
packages/geoview-core/src/api/config/types/config-validation-schema.json
line 330 at r1 (raw file):
Previously, jolevesq (Johann Levesque) wrote…
Should it be a flag in the schema? Should we encapsulate the internal validation inside the object? The function should always deal with validate input (user schema). The output of this call can be use to validate against internal. There should be no way to ask for internal validation from a user schema.
Lets discuss about this
Schema validation has the ability to execute conditionnal instructions ("if") using properties. We can test for existance of a property or test the value of a property to decide what kind of validation we want to apply. To my knowledge, there is no way to do that using an external flag. There must be a property in the schema to rely on.
c5e9ce3
to
4324b42
Compare
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.
Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @Alex-NRCan and @DamonU2)
4324b42
to
596ef7b
Compare
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.
Reviewed 1 of 1 files at r3, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @Alex-NRCan and @DamonU2)
2b421fb
into
Canadian-Geospatial-Platform:develop
Description
Making input and internal config validation uniform.
Fixes #2288
Type of change
How Has This Been Tested?
Using chrome Devtool to trace and debug the code.
Deploy URL: https://ychoquet.github.io/GeoView/config-sandbox.html
Checklist:
I have made corresponding changes to the documentationI have added tests that prove my fix is effective or that my feature worksNew and existing unit tests pass locally with my changesThis change is