Improve vocab example per gregsdennis suggestions #782
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.
This is heavily based on @gregsdennis 's work in PR #756.
Hopefully it is now more clear why I went off and updated a bunch
of other things before coming back to this. What I found while
reviewing that PR is that the example wasn't great to begin with,
and in a few places was outright wrong. This, understandably,
led to some of the enhancements to the example not being
quite right either.
Most notably, the old example should not have been set up
as its own meta-schema. I can barely even figure out why
I must have done that, it makes so little sense 😕
The example now follows the best practices from the previous
section by showing separate general purpose and single-vocabulary
meta-schemas, and discusses how they are used together.
I also switched "startDate" to "minDate" so that the parallel in behavior
with "minLength", "minItems", etc. was more intuitive. And used
pattern
in addition to
format
because of the changes to howformat
is handledby default (another thing that wasn't done yet when @gregsdennis
originally wrote his PR).