Closed tobiasschweizer closed 2 years ago
Hi @tobiasschweizer, thank you for reporting this.
Nexus Delta performs context resolution when an address is specified as a @context
value by making use of the Resolver
resources configured for the project. At this time, there are 2 types of resolver resources, namely: InProject
(which performs lookups in the current project) and CrossProject
(which performs lookups in other projects). Resolvers are evaluated in order of their configured priority.
In order to solve the issue you're seeing you would have to create the referenced resource in Nexus Delta (download from GitHub and register in Nexus), either in each project where it's being used or in a single project while configuring each other project to resolve it from there.
See: https://bluebrainnexus.io/docs/delta/api/resolvers-api.html
Closing the issue as this is not a bug.
Hi @bogdanromanx,
Thanks for the clarification.
Could you confirm that compacting the JSON-LD with an empty context, i.e. expanding all prefixes before schema registration (schema:Thing
-> http://schema.org/Thing
) would also be a valid option? This way, the registered schema would be self-contained.
Closing the issue as this is not a bug.
mea culpa :-)
This is indeed also an option, but due to the JSON-LD encoding the contents would be less readable.
Describe the bug A schema referring to a remote context cannot be registered.
What part of Nexus is affected
To Reproduce Schema to be registered:
When trying to register this schema using an HTTP POST request to /schemas/org/project, I get an HTTP 400 error code saying
Expected behavior According to the docs, remote schemas should be resolved on creation and updates.
Additional context It works when I remove "https://incf.github.io/neuroshapes/contexts/schema.json" from the context. However, then the registered schema is missing some information (it is unclear how to resolve the prefixes. I assume https://incf.github.io/neuroshapes/contexts/schema.json is somehow the standard way so Nexus Delta can handle this). I also found that it works when I compact the JSON-LD with an empty context object before registering it. In this case, it expands the prefixes and the schema is self-contained. Would that be a good way to do it? Also if the resolving of the remote context object worked, what would happen if it changed at some point, e.g, switching from
http://schema.org
tohttps://schema.org
(in the schema, there is just the prefixschema:
)?Thanks a lot for your assistance. If you need more details, please let me know.