Skip to content

Commit

Permalink
Merge pull request #219 from snowplow/backport/jsv_upgrade
Browse files Browse the repository at this point in the history
JSV upgrade for 1.x
  • Loading branch information
voropaevp authored Nov 21, 2022
2 parents 1f4a195 + 1ae42da commit 2a54296
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,12 @@ object CirceValidator extends Validator[Json] {
private val V4SchemaInstance = JsonSchemaFactory.getInstance(SpecVersion.VersionFlag.V4)

private val IgluMetaschemaFactory =
JsonSchemaFactory.builder(V4SchemaInstance).addMetaSchema(IgluMetaschema).build()
JsonSchemaFactory
.builder(V4SchemaInstance)
.addMetaSchema(IgluMetaschema)
.forceHttps(false)
.removeEmptyFragmentSuffix(false)
.build()

private val SchemaValidatorsConfig: SchemaValidatorsConfig = {
val config = new SchemaValidatorsConfig()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"$schema": "https://json-schema.org/draft-04/schema",
"description": "Simple schema for testing Validatable",
"type": "object",
"properties": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -262,11 +262,11 @@ class CachingValidationSpec extends Specification with DataTables {
val expected = ValidatorError.InvalidData(
NonEmptyList.of(
ValidatorReport(
"$.address: does not match the ipv4 pattern ^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$",
"$.address: does not match the ipv4 pattern ^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$",
Some("$.address"),
List(
"ipv4",
"^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$"
"^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$"
),
Some("format")
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,11 +208,11 @@ class RawValidationSpec extends Specification with DataTables {
val expected = ValidatorError.InvalidData(
NonEmptyList.of(
ValidatorReport(
"$.address: does not match the ipv4 pattern ^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$",
"$.address: does not match the ipv4 pattern ^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$",
Some("$.address"),
List(
"ipv4",
"^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$"
"^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$"
),
Some("format")
)
Expand Down
2 changes: 1 addition & 1 deletion project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import sbt._
object Dependencies {
object V {
// Java
val validator = "1.0.39"
val validator = "1.0.70"
val slf4j = "1.7.30"
val jackson = "2.10.5.1"
// Scala
Expand Down

0 comments on commit 2a54296

Please sign in to comment.