json-schema-org / JSON-Schema-Test-Suite

A language agnostic test suite for the JSON Schema specifications

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Remove optional ID features from required tests

seagreen opened this issue · comments

If I understand it correctly, the Recursive references between schemas test uses an optional "id" feature. Implementations have to use "id" to resolve references from them to other documents, but aren't required to allow "id" to add a new address that incoming references can refer to.

Two questions:

  1. Is this correct?

  2. If so what do we do about it? I'd be happy to make a PR that changes that test so it doesn't use addressing by "id" if that's what we want to do.

Implementations have to use "id" to resolve references from them to other documents, but aren't required to allow "id" to add a new address that incoming references can refer to.

@seagreen are you referring to https://tools.ietf.org/html/draft-zyp-json-schema-04#section-7.2.4, specifically "An implementation choosing to support inline dereferencing SHOULD be able to use this kind of reference. Implementations choosing to use canonical dereferencing, however, are not required to support it."?

I think this distinction was dropped and IDs that change base URI must be supported in draft-06, it's all in RFC3986. @handrews?

So maybe it is ok to drop these internal IDs in draft4 test and use JSON pointers instead, in draft6 it can stay as is I think.

@seagreen @epoberezkin this test case has nothing to with inline vs canonical dereferencing. Both of the id values in this test case are full URIs without fragments, which are usable via canonical dereferencing which MUST be supported. Canonical dereferencing supports both internal and external references.

Unless @Julian disagrees, I think this should be closed without changing anything.

@handrews think I agree

@handrews: Thanks for the clarification!