This means that if you attempt to override any of the defaults, you will get an IllegalArgumentException (though interestingly, due to the nature of the check, it actually will have been overridden, it's just an annoying unchecked exception I have to deal with). This seems like a gap in the API to me.
Reproducible example:
final ValidationConfigurationBuilder builder = ValidationConfiguration.newBuilder();
builder.addLibrary("http://json-schema.org/draft-04/schema#", Library.newBuilder().freeze());
This could be solved in a few ways with non-breaking API changes:
When solving https://github.com/java-json-tools/json-schema-validator/issues/294 I noticed that there is no way to create a ValidationConfigurationBuilder without the builder already including the defaults.
This means that if you attempt to override any of the defaults, you will get an IllegalArgumentException (though interestingly, due to the nature of the check, it actually will have been overridden, it's just an annoying unchecked exception I have to deal with). This seems like a gap in the API to me.
Reproducible example:
This could be solved in a few ways with non-breaking API changes: