Closed alexskr closed 4 months ago
This issue manifested itself with the API release v5.30.0 and seem to affect all SKOS ontologies
I narrowed down the cause of this issue. Before the multilingual changes, when a class was serialized, it was assigned the following type:
@type="http://www.w3.org/2002/07/owl#Class
After the multilingual changes the type of a class for SKOS ontologies ONLY has changed to:
@type="http://www.w3.org/2004/02/skos/core#Concept
As a result, the serializer is incorrectly converting the object, resulting in a general OpenStruct
instead of the object of type LinkedData::Client::Models::Class
Example of Non-SKOS ontology (correctly serialized):
[12] pry(#<OntologiesController>)> roots
=> [#<LinkedData::Client::Models::Class:0x00000001233abca8
@context=
{"@vocab"=>"http://data.bioontology.org/metadata/",
"prefLabel"=>"http://www.w3.org/2004/02/skos/core#prefLabel",
"synonym"=>"http://www.w3.org/2004/02/skos/core#altLabel",
Example of a SKOS ontology (incorrectly serialized):
[6] pry(#<OntologiesController>)> roots
=> [#<OpenStruct links={"self"=>"http://localhost:9393/ontologies/HRAVS/classes/https%3A%2F%2Fpurl.humanatlas.io%2Fvocab%2Fhravs%23HRAVS_3000090", "ontology"=>"http://localhost:9393/ontologies/HRAVS", "children"=>"http://localhost:9393/ontologi
The code in question is located here: https://github.com/ncbo/ontologies_linked_data/blob/master/lib/ontologies_linked_data/serializers/json.rb#L83
Hello this PR https://github.com/ncbo/ontologies_api_ruby_client/pull/17 fixes that
The HRAVS (skos) ontology class view is erroring in production and staging UI. I don't see any errors on the API side.
UI has this error when accessing a specific class in the HVARS ontology: