vertx-json-schema icon indicating copy to clipboard operation
vertx-json-schema copied to clipboard

date-time format doesn't allow for a local-time datetime value

Open bartoszjklimek opened this issue 1 year ago • 0 comments

Version

4.5.7

Context

I tried to use the "date-time" format property to validate a string against the format as specified https://en.wikipedia.org/wiki/ISO_8601. I expected that string "2024-04-06T22:30:41" (no zone specified = local time) would pass that validation. Unfortunately I got a JsonSchemaValidationException: String does not match format "date-time". However, when I added "Z" to the string (meaning UTC time), the validation succeeded.

Do you have a reproducer?

Schema fragment:

someField:
  type: string
  format: date-time

JSON file fragment: "someField": "2024-04-06T22:30:41"

Extra

Windows 10, Java 21 (Temurin)

bartoszjklimek avatar Apr 23 '24 15:04 bartoszjklimek