-
-
Notifications
You must be signed in to change notification settings - Fork 592
work on more detailed messages for errors #90
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
work on more detailed messages for errors #90
Conversation
Sweet 👍. Tests 😈? |
How should tests for this sorta thing go? Just have blocks of text with the right answer and assert equal to the string we get from a |
Yep. Make sure there are tests that cover edge cases (empty path, empty schema path, instance with a buggy str, anything else you can think of). It's tedious. Let me know if you get tired and feel like making me fill in the rest :P. |
What should we do about the different |
Yeah I ran into this too. I'm okay I think with a hacky thing like doing Didn't get a chance to look too closely yet it's late already but just from
|
E.g. Fall back to just showing the message if anything is missing.
|
Sounds good, will do. |
Well, travis seems a bit busticated at the moment, I suspect he would tell us that the python 3 pprint tests are failing right now though. Issue is that stripping the u from the string reprs make the pprint unaligned. Not sure best solution yet.
->
|
😦 OK. Think what you have already is great, will meditate more later if you don't come up with something beforehand. Probably will need to abandon dumb hacks :/. |
Remove some debug print statements
Fix some other small errors for doctests
Is it planned to have the line number with the error message so we could highlight the problems in code editors? |
That'd certainly be nice, but what kind of line numbers do you have in mind? jsonschema doesn't have or swallow any extra information on line numbers, so if you wanted to do that you'd just do it the same way as usual. You have access to the instance and schema objects as provided but arbitrary objects don't know where they came from beyond what callables, modules, etc. expose. Or do you have something specific you think we could provide that'd help? |
Merged. Wahoo. Thanks! @BrunoQC feel free to open a ticket if you have futher ideas |
3481a79 Merge pull request #91 from gelraen/nonanchoredpattern 818553f Update pattern.json b63c96f Merge pull request #92 from gelraen/escapedref 2f043b0 Update ref.json 1ebe2b4 Add valid instances for escaped ref tests b117902 Add a test that checks for implicit anchoring d319afa Merge pull request #90 from bugventure/develop a2c9de2 Add jsen to the list of validators 6d4adfe Merge pull request #87 from legoktm/protocol-relative 824cb99 Add test case for protocol-relative uri validation git-subtree-dir: json git-subtree-split: 3481a793ab6a1042a5973549f735b18f2355fb4e
Working on more detailed error messages, as mentioned in #83
Here is what they look like at the moment: