-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with schema including $ref
to other schema in GH pages
#39
Comments
Just chatted with @sroertgen who is doing very similar stuff with controlled vocabularies and JSON-LD metadata for the school sector like we are doing in OERSI/OER-metadatengruppe for higher ed. I thought about uncluding the school standards in KIM efforts and we discussed how we could create one generic, modular profile/schema that could be referenced and extended for the respective use cases. This modular approach with a split-up schema makes a lot of sense for implementing this: Both the school and higher-ed schemas could reference/import the generic parts (like metametadata, creator etc.) and add their specific module for their uses cases (e.g. for about/subject where different SKOS vocabs are used). |
Deployed, closed. |
I have an issue that seems to be related to this one. Our JSON Schemas for JSKOS are split up and reference each other. However, we are using relative URLs instead of absolute. For example, https://gbv.github.io/jskos/scheme.schema.json references several other schemas, like In the JSON Schema documentation, it says:
So as far as I understand, if I reference Maybe I misunderstand it, so any input would be appreciated! |
Thanks for the report, @stefandesu. I think you are interpreting this right. As your case differs from the problem in this issue (where |
(Background: I started to split up the default JSON schema following the approach in https://json-schema.org/learn/getting-started-step-by-step.html#references (see the branch at https://github.com/dini-ag-kim/lrmi-profile/tree/splitUpSchema). Before merging this into master I wanted to try out whether this approach actually works with SkoHub editor.)
So I tried it out at https://github.com/acka47/lrmi-profile with only one reference and the same GH pages setup. The resulting schema is at https://acka47.github.io/lrmi-profile/draft/schemas/schema.json (see the creator property with the reference to https://acka47.github.io/lrmi-profile/draft/schemas/creator.json.
However, loading this schema in https://skohub.io/editor/ does not work, see https://skohub.io/editor/?schema=https://acka47.github.io/lrmi-profile/draft/schemas/schema.json
In the console, there are for one several CORS-related errors ("Cross-Origin Request Blocked") and another error: "Error: Invalid JSON pointer: ttps://acka47.github.io/lrmi-profile/draft/schemas/creator.json index.js:209:36" (Strangely, the "h" in "https" is omitted there.)
Re. CORS and GitHub pages, this has been supported for some time now (see https://stackoverflow.com/questions/26416727/cross-origin-resource-sharing-on-github-pages), so I wonder what is the problem there.
The text was updated successfully, but these errors were encountered: