Skip to content

Validation failing wrongly #740

Closed
Closed
@vvasuki

Description

@vvasuki

Tested against jsonschema-3.2.1.dev280+gddcc2e2 .

Reproduce with:

jsonschema.validate({'jsonClass': 'JsonObjectNode', 'content': {'jsonClass': 'BookPortion', 'source': {'jsonClass': 'DataSource', 'source_type': 'system_inferred'}, 'title': 'c1', 'authors': [], 'targets': []}, 'children': [{'jsonClass': 'JsonObjectNode', 'content': {'jsonClass': 'BookPortion', 'source': {'jsonClass': 'DataSource', 'source_type': 'system_inferred'}, 'title': 'c1v1', 'authors': [], 'targets': []}, 'children': []}]}, {'properties': {'content': {'type': 'object', 'properties': {'jsonClass': {'type': 'string', 'description': 'A hint used by json libraries to deserialize json data to an object of the appropriate type. This is necessary for sub-objects to have as well (to ensure that the deserialization functions as expected).'}}, 'required': ['jsonClass']}, 'jsonClass': {'enum': ['JsonObjectNode'], 'description': 'A hint used by json libraries to deserialize json data to an object of the appropriate type. This is necessary for sub-objects to have as well (to ensure that the deserialization functions as expected).', 'type': 'string'}, 'children': {'type': 'array', 'items': {'type': 'object', '$ref': 'JsonObjectNode'}}}, 'type': 'object', 'id': 'JsonObjectNode', 'required': ['jsonClass']})

The validation ought to work as per https://www.jsonschemavalidator.net/ .

Metadata

Metadata

Assignees

No one assigned

    Labels

    InvalidNot a bug, PEBKAC, or an unsupported setup

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions