Closed albertmink closed 1 year ago
my POV: skip it for now, I'm not really sure what/if its useful for
I found following information that we might want to consider:
The root schema of a JSON Schema document SHOULD contain an "$id" keyword with an absolute-URI (containing a scheme, but no fragment).
See https://json-schema.org/draft/2020-12/json-schema-core.html#rfc.section.8.2.1.1
... Note that this URI is an identifier and not necessarily a network locator. In the case of a network-addressable URL, a schema need not be downloadable from its canonical URI. ...
See https://json-schema.org/draft/2020-12/json-schema-core.html#rfc.section.8.2.1
... Informatively, the initial base URI of a schema is the URI at which it was found, whether that was a network location, a local filesystem, or any other situation identifiable by a URI of any known scheme. If a schema document defines no explicit base URI with "$id" (embedded in content), the base URI is that determined per RFC 3986 section 5. ...
see https://json-schema.org/draft/2020-12/json-schema-core.html#initial-base
Stale issue ➡️ closing
Actually, the JSON Schema is designed to have a
$id
that reflects its url/path in the repository, see here https://github.com/SAP/abap-file-formats/blob/1977c2da2c7d285313a5c18408f1579a8d57dff4/file-formats/intf/intf-v1.json#L4We could easily drop it, as we have no plans of using the
$id
in the JSON Schema. But the JSON Schema specification of$id
sayssee https://json-schema.org/draft/2020-12/json-schema-core.html#id-keyword Maybe we should provide a simpler and canonical
$id
.I am welcome to any suggestions on that one!