File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
src/test/scala/io/github/dataunitylab/jsonoid/discovery Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ package schemas
33
44import scala .io .Source
55
6- import com .networknt .schema .{JsonSchemaFactory , SpecVersion }
6+ import com .networknt .schema .{SchemaRegistry , SpecificationVersion }
77import org .json4s ._
88import org .json4s .jackson .JsonMethods ._
99import org .scalatestplus .scalacheck .ScalaCheckPropertyChecks
@@ -111,9 +111,9 @@ class DiscoverSchemaSpec extends UnitSpec with ScalaCheckPropertyChecks {
111111 )
112112
113113 // XXX This validation is not perfect, but we'll check later with AJV
114- val factory =
115- JsonSchemaFactory .getInstance( SpecVersion . VersionFlag . V202012 )
116- val jsonSchema = factory .getSchema(asJsonNode(schema.toJson()))
114+ val schemaRegistry =
115+ SchemaRegistry .withDefaultDialect( SpecificationVersion . DRAFT_2020_12 )
116+ val jsonSchema = schemaRegistry .getSchema(asJsonNode(schema.toJson()))
117117 val errors = jsonSchema.validate(asJsonNode(firstDoc))
118118 errors shouldBe empty
119119 }
You can’t perform that action at this time.
0 commit comments