-
Notifications
You must be signed in to change notification settings - Fork 327
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Disabling format assertions for draft-07 doesn't seem to work #1144
Comments
@michaelmior Thanks a lot for reporting it. Is it possible to create a test case to reproduce the issue? Thanks. |
Here's a test case that currently fails. Let me know if you'd prefer I open a PR. @Test
void draft7DisableFormat() {
String schemaData = "{\r\n"
+ " \"format\":\"uri\"\r\n"
+ "}";
JsonSchema schema = JsonSchemaFactory.getInstance(VersionFlag.V7).getSchema(schemaData);
Set<ValidationMessage> messages = schema.validate("\"hello\"", InputFormat.JSON, executionContext -> {
executionContext.getExecutionConfig().setFormatAssertionsEnabled(false);
});
assertEquals(0, messages.size());
} |
@stevehu Thanks for the fix! |
@justin-tay fixed it. He is the best!!! |
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
I'm trying to use a similar example to the one given in the README to force assertions to be disabled but when I execute this, I still get validation errors referring to the format. This also happens if I set the same option to false when building the config for the schema.
The text was updated successfully, but these errors were encountered: