snowplow / iglu-scala-client

Scala client for Iglu schema registry
https://github.com/snowplow/iglu/wiki
Apache License 2.0
5 stars 13 forks source link

Incorrect keyword raised ValidationError where format is uuid #169

Open miike opened 3 years ago

miike commented 3 years ago

Not sure if this is the right repo but feels like the closest - feel free to move. I haven't investigated this much other than reproducing as it may have something to do with an upstream issue in the validator itself.

Given the following schema

{
    "id": {
        "type": "string",
        "format": "uuid"
    }
}

and the following instance

{"id": "1234"}

we would expect an error where keyword = format but instead we get

{
    "error": "ValidationError",
    "dataReports": [
      {
        "message": "$.id: 1234 is an invalid uuid",
        "path": "$.id",
        "keyword": "date-time",
        "targets": [
          "1234",
          "uuid"
        ]
      }
    ]
  }

This doesn't seem to happen with other formats (urii / ipv4 / ipv6 / email / hostname / date).

cc @istreeter