Skip to content

Commit

Permalink
bump dev.harrel version, turn on format validation (#90)
Browse files Browse the repository at this point in the history
  • Loading branch information
harrel56 authored Dec 21, 2023
1 parent 4fffa14 commit a8f3254
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ dependencies {

implementation("org.leadpony.justify:justify:3.1.0")

implementation("dev.harrel:json-schema:1.4.3")
implementation("dev.harrel:json-schema:1.5.0")
implementation("com.sanctionco.jmail:jmail:1.6.2") // dev.harrel format validation

implementation("org.apache.logging.log4j:log4j-core:$log4jVersion")
runtimeOnly("org.apache.logging.log4j:log4j-slf4j2-impl:$log4jVersion")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.json.JsonMapper;
import dev.harrel.jsonschema.Dialects;
import dev.harrel.jsonschema.FormatEvaluatorFactory;
import dev.harrel.jsonschema.JsonNode;
import dev.harrel.jsonschema.SchemaResolver;
import dev.harrel.jsonschema.SpecificationVersion;
Expand Down Expand Up @@ -139,6 +140,7 @@ private Validator validator(final SchemaSpec spec, final AdditionalSchemas addit
new dev.harrel.jsonschema.ValidatorFactory()
.withDisabledSchemaValidation(true)
.withDialect(new Dialects.Draft2020Dialect())
.withEvaluatorFactory(new FormatEvaluatorFactory())
.withJsonNodeFactory(nodeFactory)
.withSchemaResolver(resolver)
.createValidator();
Expand All @@ -150,6 +152,7 @@ private Validator validator(final SchemaSpec spec, final AdditionalSchemas addit
new dev.harrel.jsonschema.ValidatorFactory()
.withDisabledSchemaValidation(true)
.withDialect(new Dialects.Draft2019Dialect())
.withEvaluatorFactory(new FormatEvaluatorFactory())
.withJsonNodeFactory(nodeFactory)
.withSchemaResolver(resolver)
.createValidator();
Expand Down

0 comments on commit a8f3254

Please sign in to comment.