Closed robbielamb-wf closed 2 years ago
Could you take a look at the presubmit check failures?
SuiteTest > draft2019_09() > format > time.json > validation of time strings > net.jimblackler.jsonschemafriend.SuiteTest.draft2019_09()[3][15][1][32] FAILED
org.opentest4j.AssertionFailedError at SuiteTest.java:152
SuiteTest > draft2020_12() > format > time.json > validation of time strings > net.jimblackler.jsonschemafriend.SuiteTest.draft2020_12()[3][15][1][32] FAILED
org.opentest4j.AssertionFailedError at SuiteTest.java:152
SuiteTest > draft7() > format > time.json > validation of time strings > net.jimblackler.jsonschemafriend.SuiteTest.draft7()[3][14][1][32] FAILED
org.opentest4j.AssertionFailedError at SuiteTest.java:152
Looks like these tests are failing because DateTimeFormatter
changed after java 8. I verified the tests fail on my machine with openjdk-1.8 and are passing on openjdk-1.11 and openjdk-1.17.
Looks like the options are to:
Do you have an opinion on how to fix this?
I'd greatly prefer '2', perhaps a different date/time library if one exists that can make the right checks.
I've added a regular expression that can check the time format. I created another branch that uses the Joda time library to check the format. It works and I can swap that in if you'd prefer to use the library over a regexp.
If the regex does the job then that's fine.
This work allows for formats in drafts 2019-09 and 2020-12 to be validated.