Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve debug messages #89

Merged
merged 6 commits into from Mar 11, 2020
Merged

Improve debug messages #89

merged 6 commits into from Mar 11, 2020

Conversation

glenrobson
Copy link
Member

Given a schema error that ends in oneOf expression the current json schema library will check all possibilities in a oneOf clause and return validation error messages for each one

These changes will identify the real oneOf that causes the error by checking the type of each oneOf possibility and returning only the one that matches.

@glenrobson
Copy link
Member Author

Note have to add some tests to check the returned error is correct. Files to test with:

python3 ./schema/schemavalidator.py fixtures/3/broken_simple_image.json 

and

python3 ./schema/schemavalidator.py fixtures/3/broken_service.json

@coveralls
Copy link

coveralls commented Feb 1, 2020

Coverage Status

Coverage decreased (-0.8%) to 83.333% when pulling 8ca48b9 on improve_debug_messages into c91a2c6 on master.

@glenrobson
Copy link
Member Author

Also need to fix build errors. I though I'd already fixed this but it looks like I fixed it in the image validator here:

https://github.com/IIIF/image-validator/blob/bbb305046db92260ea40424a7a662e26c20678da/setup.py#L50

@glenrobson glenrobson merged commit 2dc907e into master Mar 11, 2020
@glenrobson glenrobson deleted the improve_debug_messages branch March 11, 2020 01:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants