JSON-Schema-Test-Suite icon indicating copy to clipboard operation
JSON-Schema-Test-Suite copied to clipboard

Emit fully absolute URIs from `jsonschema_suite remotes`.

Open Julian opened this issue 3 years ago • 2 comments

I.e. instead of

{
"foo.json": "..."
}

you get

{
"http://localhost:1234/foo.json": "..."
}

which are the URIs the refRemote.json files expect.

This was I believe just an oversight on my part (or I never noticed it before) -- but there's no reason a user of this should need to know the base URI is http://localhost:1234/, the whole point of the command is to just give you the URIs + schemas to configure.

I don't know how many people use this command rather than reading directly off the remotes/ directory, but I do, so it's at least 1 person.

Julian avatar Aug 10 '22 13:08 Julian

Could you add a mention in the README that the base uri is 'http://localhost:1234', so tooling that performs their own processing of 'remotes' can do so correctly?

e.g. this is what I do (which I believe to be correct) - I would use the script but I don't want to impose another prerequisite on python3 on my downstream consumers, as automated test systems especially are likely to not have it.

https://metacpan.org/dist/Test-JSON-Schema-Acceptance/source/lib/Test/JSON/Schema/Acceptance.pm#L132-145

karenetheridge avatar Aug 10 '22 18:08 karenetheridge

Could you add a mention in the README that the base uri is 'http://localhost:1234/', so tooling that performs their own processing of 'remotes' can do so correctly?

Yep, good idea, done.

Julian avatar Aug 11 '22 05:08 Julian

I'm assuming this is good to go now with folks but if not obviously follow up.

Julian avatar Aug 17 '22 11:08 Julian