Skip to content

Commit

Permalink
Bump com.networknt:json-schema-validator from 1.0.88 to 1.5.3 (#356)
Browse files Browse the repository at this point in the history
  • Loading branch information
justin-tay authored Nov 19, 2024
1 parent 5db67fc commit 3610e61
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import com.networknt.schema.JsonSchemaFactory;
import com.networknt.schema.SpecVersion;
import com.networknt.schema.ValidationMessage;
import com.networknt.schema.serialization.JsonNodeReader;
import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
Expand Down Expand Up @@ -194,7 +195,7 @@ private static <T> T createObject(String filePath, Class<T> objectType, String s
// Validate YAML file contents
JsonSchemaFactory factory =
JsonSchemaFactory.builder(JsonSchemaFactory.getInstance(SpecVersion.VersionFlag.V202012))
.objectMapper(YAML_MAPPER)
.jsonNodeReader(JsonNodeReader.builder().yamlMapper(YAML_MAPPER).build())
.build();
JsonSchema schema = factory.getSchema(schemaInputStream);
JsonNode jsonNodeDirect = YAML_MAPPER.readTree(resolvedYAMLContent);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import com.networknt.schema.JsonSchemaFactory;
import com.networknt.schema.SpecVersion;
import com.networknt.schema.ValidationMessage;
import com.networknt.schema.serialization.JsonNodeReader;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
Expand Down Expand Up @@ -54,7 +55,7 @@ private JsonSchema getSchema(String filePath) {
// Validate YAML file contents
JsonSchemaFactory factory =
JsonSchemaFactory.builder(JsonSchemaFactory.getInstance(SpecVersion.VersionFlag.V202012))
.objectMapper(YAML_MAPPER)
.jsonNodeReader(JsonNodeReader.builder().yamlMapper(YAML_MAPPER).build())
.build();
return factory.getSchema(schemaInputStream);
}
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<duckdb_jdbc.version>0.9.2</duckdb_jdbc.version>
<immutables.value.version>2.10.1</immutables.value.version>
<jackson.version>2.13.5</jackson.version>
<json-schema-validator.version>1.0.88</json-schema-validator.version>
<json-schema-validator.version>1.5.3</json-schema-validator.version>
<jsr305.version>3.0.2</jsr305.version>
<junit-jupiter.version>5.11.0</junit-jupiter.version>
<junit-pioneer.version>2.2.0</junit-pioneer.version>
Expand Down

0 comments on commit 3610e61

Please sign in to comment.