Working with JSON-Schema today. It's powerful and expressive enough, but why does the tooling not support sub-schemas on a file system naturally, without fuss, in the same way as for http URLs?
Only, if you use http URLs there's no good way to do a test/fix/test loop. You can use a web server running as localhost, but you need to fix all the URLs before you can roll out to production.
And then test in production to make sure you didn't miss something.
It's stupid as hell.
@jackwilliambell you can just use relative paths. if it doesn’t work it’s a problem with your implementation
The tooling I'm using (Python jsonschema) doesn't support relative file paths even if you use a file URL. While figuring this out I discovered people making the same complaints about other implementations. Apparently its common.
Probably more a problem of relying on URL or URN libraries with crappy file support than anything. But the spec is URL focused, so…
@jackwilliambell relative uris should resolve on file uris with a good implementation, so i wouldn’t rush to blame this on jsonschema itself.
that said, i usually do my subschdmas in the same doc and yse fragment refs.
@jackwilliambell (sorta sidesteps the whole patchy implementations issue, there is many deficiencies in implementations)
Which is what I ended up doing. But now I have the same set of '$defs' in three different schema files.
As I said, stupid as hell.
Rusted Neuron is a Mastodon Instance operated by Jack William Bell