2

I would like to check the following structure:

foo = {
          "things": {
              "bar": {
                  "thing-definition-key": "baz",
                  ...
              }
          },
          "thing-definitions": {
              "baz": {
                  "blah": "blah"
              }
          }
      }

In addition to checking some schema constraints on bar and baz to make sure they're well-formed, I want to use the fact that the value of the thing-definition-key in bar is "baz" to confirm that there is an entry for baz in the thing-definitions object, and that it meets certain constraints. I know how to use property dependencies within an object, but not between two objects.

Note, I'm doing this with https://python-jsonschema.readthedocs.io/en/stable/, but I'm looking for a language-independent answer if possible.

Adam
  • 21
  • 2

0 Answers0