Issue 33: Allow validation to be skipped when an item has a semantically equal value #35
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.
Description
Introduces the
skipValidationWhenValueUnchanged
constraint for all validation types. When enabled, validation is not performed on the property or element when it semantically equals the value from the previous revision (e.g. adatetime
of "2018-06-13T18:01-07:00" is semantically equal to "2018-06-13T21:01-04:00"). The result is that, even if the property or element no longer satisfies the item constraint(s), its value will be allowed if it has not changed.NOTE: This pull request is part 1 of 2. The next pull request will add a
skipValidationWhenValueUnchangedStrict
constraint that requires strict (rather than semantic) equality.Testing
skip-validation-when-value-unchanged-doc-definitions.js
:dynamicSkipValidationWhenValueUnchangedDoc
document (should be accepted with 201 Created):uuidProp
value is invalid and it is not equal to the old value (should be rejected with 403 Forbidden):uuidProp
value is semantically equal to the old value (should be accepted with 201 Created):Related Issue