Skip to content

Use schema specified in the instance using "$schema" #327

@mikehwang

Description

@mikehwang

I would like to have JSON instances specify the custom JSON schema by having instances use the $schema property. This is a valid use of JSON schema per this page on $schema.

I've poked around the library and I see this:

def validate(instance, schema, cls=None, *args, **kwargs):

But what I would like is a convenience version of that:

def validate(instance, cls=None, *args, **kwargs):

Where this validate would grab and use the schema specified in the $schema property. Does this already exist? Otherwise wouldn't this be a cool feature to add?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions