Skip to content

Validation fuzz #108

Description

@martinschorb

Hi,

I have some trouble with one of my projects and I try to find out what went wrong, as I only used mobie-python to generate it and it now does not validate any longer.

One big issue is that the output of the validation is not very helpful. It spits out the entire schema cluttering the STDOUT and throws an error only stating what went wrong. But is missing the crucial information where (which view/source etc.) the error occurs.

File ".../jsonschema/validators.py", line 1121, in validate
    raise error
jsonschema.exceptions.ValidationError: Additional properties are not allowed ('name' was unexpected)

Failed validating 'additionalProperties' in schema['properties']['views']['properties']['default']:
    {'$id': 'https://github.com/ghraw/mobie/mobie.github.io/master/schema/view.schema.json',
     '$schema': 'http://json-schema.org/draft-07/schema',
     'additionalProperties': False,
     'definitions': {'additionalTables': {'description': 'Additional '
                                                         'tables to load '
                                                         'for this '
                                                         'display. This '
                                                         'only needs to be '
...

and hundreds of more lines of schema.

Is it possible to change the output such that it provides clues on where the problem is (i.e. where this suspicious extra name can be found?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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