Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
  • 2 commits
  • 2 files changed
  • 0 comments
  • 2 contributors

Showing 2 changed files with 3 additions and 2 deletions. Show diff stats Hide diff stats

  1. +1 0  jsonschema.py
  2. +2 2 tests.py
1  jsonschema.py
@@ -390,6 +390,7 @@ def validate_properties(self, properties, instance, schema):
390 390 error = ValidationError(
391 391 "%r is a required property" % (property,)
392 392 )
  393 + error.path.append(property)
393 394 error.validator = "required"
394 395 yield error
395 396
4 tests.py
@@ -698,7 +698,7 @@ def test_multiple_nesting(self):
698 698 self.assertEqual(e1.path, [])
699 699 self.assertEqual(e2.path, [0])
700 700 self.assertEqual(e3.path, ["bar", 1])
701   - self.assertEqual(e4.path, ["bar", 1])
  701 + self.assertEqual(e4.path, ["bar", "bar", 1])
702 702 self.assertEqual(e5.path, ["baz", "bar", 1])
703 703 self.assertEqual(e6.path, ["foo", 1])
704 704
@@ -745,7 +745,7 @@ def test_tree(self):
745 745 self.assertEqual(tree.errors["type"], e1)
746 746 self.assertEqual(tree[0].errors["type"], e2)
747 747 self.assertEqual(tree[1]["bar"].errors["type"], e3)
748   - self.assertEqual(tree[1]["bar"].errors["required"], e4)
  748 + self.assertEqual(tree[1]["bar"]["bar"].errors["required"], e4)
749 749 self.assertEqual(tree[1]["bar"]["baz"].errors["minItems"], e5)
750 750 self.assertEqual(tree[1]["foo"].errors["enum"], e6)
751 751

No commit comments for this range

Something went wrong with that request. Please try again.