Skip to content

Validating a deeply nested schema using custom "strict" draft 2020 metaschema can be very slow #1097

@cweiske

Description

@cweiske

I am using check-jsonschema 0.23.0 with jsonschema 4.17.3 to validate a JSON schema against a strict json schema schema.

When running check-jsonschema, it runs for at least a minute until I kill it. Looks like an infinite loop somewhere.
Validating against the "normal" json schema schema works.

$ check-jsonschema --schemafile ~/dev/tools/json-schema-schema/json-schema.schema.json api-rest-connect-stick-stick-xxx.schema.json ok -- validation done $ check-jsonschema --schemafile ~/dev/tools/json-schema-schema/strict.json api-rest-connect-stick-stick-xxx.schema.json (ctrl-c pressed after 1 minute) 

The schema I am validating against is this: https://github.com/orgs/json-schema-org/discussions/380#discussioncomment-5711007
The schema file I am writing (and which was generated by genson) is attached here: api-rest-connect-stick-stick-xxx.schema.json.gz

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs SimplificationAn issue which is in need of simplifying the example or issue being demonstrated for diagnosis.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions