test(format/date-time): add boundary whitespace and anchoring validation cases#952
test(format/date-time): add boundary whitespace and anchoring validation cases#952AcEKaycgR wants to merge 1 commit into
Conversation
80b93ed to
735fecd
Compare
735fecd to
13728f1
Compare
|
@AcEKaycgR I went through these against RFC 3339 section 5.6 and ran each one through ajv-formats (full and fast) and python-jsonschema. The verdicts are all correct. One thing on the suite bar: the convention we've been holding to (for example the ipv4 PRs #907/#908/#909, and @jdesrosiers said on #904) is that each new test should expose a divergence in a real implementation - otherwise it's coverage that every validator already handles. I ran all six here and none of them is accepted or rejected wrongly by ajv or python; both already reject the empty string, the leading and trailing space, For the anchoring case that does trip one, I opened #959: a trailing newline |
|
@jviotti @jdesrosiers The anchoring case that does trip one is the trailing newline: Also note all six inputs here are already in your #891, so this overlaps that PR so either need to close that one. |
|
Hi @vtushar06, Thanks for the feedback. While Ajv and Python do reject them, these cases actually trip another strict engine. Go's |
Applies to: draft-v1, draft-07, draft/2019-09, draft/2020-12
Adds 6 new cases validating strict string anchoring constraints, boundary whitespace, and component-only (date-only/time-only) compliance for the
date-timeformat.Added:
Ecosystem Impact (Triangulation):
Under Bowtie verification against 8 active implementations, these cases successfully caught live compliance issues:
go-gojsonschemaincorrectly validates both the date-only string ("1985-04-12") and the time-only string ("08:30:06Z") asvalid(expectedinvalid), failing to enforce that a full date-time must contain both components.@jviotti @jdesrosiers @karenetheridge Ready for review.