-
-
Notifications
You must be signed in to change notification settings - Fork 607
Closed
Description
I'm wondering if there's a way to validate formats when using check_schema. It seems to allow invalid format names. The below example passes validation, even though datetime should be date-time. I noticed the concrete implementation of check_schema has a format_checker argument (even though the FormatChecker protocol does not have this argument). Setting the format checker doesn't validate format names either. Is there anyway to get check_schema to fail for invalid formats?
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"foo": {"type": "string", "minLength": 2},
"bar": {"type": "number", "minimum": 10},
"baz": {"type": "string", "format": "datetime"}
}
}
Metadata
Metadata
Assignees
Labels
No labels