Open acka47 opened 3 years ago
@sroertgen already adjusted the SkoHub Editor code for WLO to directly look for the json vocab and the FlexSearch index,
Here is a link to the respective commit: https://github.com/openeduhub/oeh-add-content/commit/8fb38475ec0a89e49fc05b280229958552ef2aa2#diff-986dba4e0568e578b474d17b17e9ea00cacbbaf28dbea33d782f45c9393a8f6b
Actually, the lookup (without typeahead search) works when you provide a valid JSON Schema. (I had a typo in the versions I tested and the editor would somehow load the last valid schema...) So, this is not too important now. With @literarymachine I agreed to add some configuration option like this at a later point:
{
"_widget":{
"type":"SkohubLookup",
"options":{
"url":"https://acka47.github.io/skohub-example-subjects/w3id.org/acka47/subjects/index.json",
"index":"https://acka47.github.io/skohub-example-subjects/w3id.org/acka47/subjects/index.index"
}
}
}
As already discussed, the SkoHub Vocabs published via GitHub Pages does not support content negotiation. I am afraid, there is currently no way to enable the lookup and the SkoHub Editor code has to be adjusted for this.
@sroertgen already adjusted the SkoHub Editor code for WLO to directly look for the json vocab and the FlexSearch index, see https://github.com/openeduhub/oeh-add-content/blob/4a80a03b4ba75b5c1d1e8cd89b8f20ae4b3903e8/frontend/src/components/JSONPointerForm/SkohubLookup.js#L84-L109
Thus, a solution for this problem would be to add this as fallback in the editor when content negotiation fails.