Skip to content

Automatically use correct format_checker for versioned Validators #861

@TiborVoelcker

Description

@TiborVoelcker

(Not sure if this is already a feature, and I just could not get it to work.)

I want my validator automatically detected using the "$schema" keyword, to leave it customizable. But I would also need the formats to be validated. I know I could use validate(instance, schema, format_checker=draft202012_format_checker). But I would like to just use the corresponding format_checker. Meaning, if my "$schema" keyword leads to using the Draft202012Validator, I would want to automatically use the draft202012_format_checker. If I use Draft7Validator, use the draft7_format_checker, etc.

My proposal would be to accept format_checker=True, to then use the corresponding Format Validator.

Metadata

Metadata

Assignees

No one assigned

    Labels

    EnhancementSome new desired functionalityHelp WantedAn enhancement or bug for which a pull request is welcomed and which should have a clear definition.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions