Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump com.networknt:json-schema-validator from 1.4.0 to 1.4.2 #193

Merged
merged 1 commit into from
Jun 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ dependencies {

implementation("net.jimblackler.jsonschemafriend:core:0.12.4")

implementation("com.networknt:json-schema-validator:1.4.0")
implementation("com.networknt:json-schema-validator:1.4.2")

implementation("com.qindesign:snowy-json:0.16.0")
runtimeOnly("org.glassfish:jakarta.json:2.0.0:module")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import com.networknt.schema.SchemaValidatorsConfig;
import com.networknt.schema.SpecVersion;
import com.networknt.schema.ValidationMessage;
import com.networknt.schema.regex.JoniRegularExpressionFactory;
import java.awt.Color;
import java.io.IOException;
import java.util.Map;
Expand Down Expand Up @@ -143,10 +144,12 @@ private void validate(final JsonNode node) {

private JsonSchema parseSchema(
final String schema, final SchemaSpec spec, final AdditionalSchemas additionalSchemas) {
final SchemaValidatorsConfig config = new SchemaValidatorsConfig();
// By default, the library uses the JDK regular expression implementation which is not ECMA
// 262 compliant. This requires the joni dependency
config.setEcma262Validator(true);
final SchemaValidatorsConfig config =
SchemaValidatorsConfig.builder()
.regularExpressionFactory(JoniRegularExpressionFactory.getInstance())
.build();
return JsonSchemaFactory.getInstance(
schemaVersion(spec),
builder ->
Expand Down
Loading