Closed
Description
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
I am having problems validating a json with a date-time format. The validator returns true for the following input:
JsonSchema
{"title":"Test","properties":{"name":{"type":"string"},"dateOfBirth":{"type":"string","format":"date-time"}}}
Json
{"name":"Test User","dateOfBirth": "test"}
Running the following code returns true and does not add any issues to the list:
val jsonSchemaValidator = JsonSchema.fromDefinition(schema)
val json = Json.encodeToJsonElement(DummySerializer(), entry)
val result = jsonSchemaValidator.validate(json, schemaValidationErrors::add)
Expected Behavior
I would expect the validator to fail on this input because the dateOfBirth property is not in the correct format.
JSON schema
{"title":"Test","properties":{"name":{"type":"string"},"dateOfBirth":{"type":"string","format":"date-time"}}}
Library version
0.2.2
Anything else?
No response