Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect keyword raised ValidationError where format is uuid #169

Open
miike opened this issue Oct 15, 2021 · 0 comments
Open

Incorrect keyword raised ValidationError where format is uuid #169

miike opened this issue Oct 15, 2021 · 0 comments

Comments

@miike
Copy link

miike commented Oct 15, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant