Skip to content

Commit

Permalink
Bump com.networknt:json-schema-validator from 1.4.0 to 1.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
justin-tay committed Jun 23, 2024
1 parent ac8ca5e commit c330b2b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
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

0 comments on commit c330b2b

Please sign in to comment.