We shouldn't have some paths relative to the directory from which the build command is run, and others relative to the files in which the reference is made.
Since the build command could ostensibly be run from many paths, it makes most sense to use paths relative to the file in which the references occur (which is what sphinxcontrib-jsonschema does).
I mostly copied code from sphinxcontrib-jsonschema.
We shouldn't have some paths relative to the directory from which the build command is run, and others relative to the files in which the reference is made.
Since the build command could ostensibly be run from many paths, it makes most sense to use paths relative to the file in which the references occur (which is what sphinxcontrib-jsonschema does).
I mostly copied code from sphinxcontrib-jsonschema.