fix: add required validation to if lesssons (#180)
#181
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.
What kind of change does this PR introduce?
This PR adds the
requiredvalidation on the properties that have anifapplicator condition applied to them in the example schemas in the instructions for the following lessons:Issue Number:
if-then-*series of lessons' examples are missing arequiredvalidation #180Summary
By adding the
requiredvalidation in the instructions, it should help clarify that by nature of theifapplicator being a subschema, the same rules apply. That is, if the property that theifrelies on doesn't exist on the instance, and there's nothing making sure it exists (e.g.required), the condition would still apply - which could be confusing to someone whose still learning how it works.Does this PR introduce a breaking change?
No - only documentation was changed.
Note
Once I started working on this, I realized I may have overestimated the reach of the problem in the issue I've opened initially (#180) - applying only to the instructions and not to the solutions as well and only to lessons 4 and 6 (not 5).
I wanted to thank the maintainers, too! The tour helped me get a better grasp of JSON schema.