jsonschema: resolve URIs for $id

Assign a base URI to every schema.

See the comment on resolveURIs for details.

Change-Id: I2332d825c486766832503cabdd0bf9d819171d53
Reviewed-on: https://go-review.googlesource.com/c/tools/+/669997
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Alan Donovan <adonovan@google.com>
This commit is contained in:
Jonathan Amsterdam 2025-04-26 11:13:17 -04:00
commit 0a79e67c62

View file

@ -51,7 +51,7 @@ func TestValidate(t *testing.T) {
}
for _, g := range groups {
t.Run(g.Description, func(t *testing.T) {
rs, err := g.Schema.Resolve()
rs, err := g.Schema.Resolve("")
if err != nil {
t.Fatal(err)
}