Skip to content

Designating a dialect for custom metaschemas in 4.18 #1061

Open
@eslavich

Description

@eslavich

I'm working with a custom metaschema that is a superset of draft 4, is there/will there be a way to select the draft 4 dialect when creating a Validator class? Currently the create method is choosing the opaque dialect when it fails to recognize our metaschema's id:

https://github.com/python-jsonschema/jsonschema/blob/v4.18.0a1/jsonschema/validators.py#L187

and the referencing package doesn't appear to offer a sanctioned method for registering a new dialect id:

https://github.com/python-jsonschema/referencing/blob/v0.24.4/referencing/jsonschema.py#L544-L556

Is there another way to accomplish this that I'm missing? And if not, are you open to adding something like a default_specification argument to the create method?

By the way, thanks a lot for providing an alpha release, it's super helpful to be able to work through our issues ahead of time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething doesn't work the way it should.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions