You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since JSON Schema Draft 6, $id is required to be a valid URI reference as defined in RFC3986, section 4.1, which is either a URI (e.g.,http://eventlogging.jupyter.org/event-schema) or a relative reference ( e.g.,/event-schema). Currently, the $ids used in event schemas across different Jupyter project do not follow this rule:
Thanks for writing this up! Looks like Mediawiki's $id aren't intended to be URIs, so it makes sense they would use the relative path. Since we have a domain component already, let's add a schema and do https://?
MediaWiki's $id are actual relative URIs though. They resolve against the origin https://schema.wikimedia.org/repositories/primary/jsonschema. For example https://schema.wikimedia.org/repositories/primary/jsonschema/mediawiki/user/blocks-change/1.1.0 contains the schema with $id/mediawiki/user/blocks-change/1.1.0. Relative URIs might provide us with some flexibility down the line.
Since we have a domain component already, let's add a schema and do https://?
I'm ok with this. I do think absolute URIs work for us better since we have multiple domains for different schemas, especially with client events. Thanks!
Problem
Since JSON Schema Draft 6,
$id
is required to be a valid URI reference as defined in RFC3986, section 4.1, which is either a URI (e.g.,http://eventlogging.jupyter.org/event-schema
) or a relative reference ( e.g.,/event-schema
). Currently, the$id
s used in event schemas across different Jupyter project do not follow this rule:binderhub.jupyter.org/launch
hub.jupyter.org/server-action
They lack the scheme part of the URI and thus are not valid URIs.
Due to this the schemas are not guaranteed to always work with JSON schema validators. One example is when trying to use
$ref
This would fail
Change to
"$id": "http://hub.jupyter.org/example-schema"
or"$id": "/example-schema"
and it validates fine.There are potentially other undiscovered problems as well.
Proposed solution
Either change
$id
to fully formed URI or keep it as a relative reference. The later is what's being used in MediaWiki eventlogging (example)The text was updated successfully, but these errors were encountered: