useid / semcom

A decentralised registry to support the dynamic binding of semantic components in Solid data browsers.
https://docs.digita.ai/semcom
Other
7 stars 2 forks source link

GET to /component response is invalid #147

Closed jonasbovyn closed 2 years ago

jonasbovyn commented 3 years ago

GET http://localhost:3000/component returns the following when using accept: application/json

[
{
"uri": "https://components.semcom.digita.ai/components/profile.component.js",
"label": "SemCom Profile Component",
"description": "Digita SemCom component for profile information.",
"author": "https://digita.ai",
"tag": "profile",
"version": "0.1.0",
"latest": true,
"shapes": [
"http://xmlns.com/foaf/0.1/PersonalProfileDocument"
]
},
....

But when using any other format, like text/turtle, it only returns the first character of the objects:

<https://components.semcom.digita.ai/components/profile.component.js> a <http://semcom.digita.ai/voc#component>;
<http://semcom.digita.ai/voc#label> "S";
<http://semcom.digita.ai/voc#description> "D";
<http://semcom.digita.ai/voc#author> "h";
<http://semcom.digita.ai/voc#version> "0";
<http://semcom.digita.ai/voc#latest> "t";
<http://semcom.digita.ai/voc#tag> "p";
<http://semcom.digita.ai/voc#shape> "h".
...

same with /component/query

(does not affect demo-app)

┆Issue is synchronized with this Wrike Item by Unito

jonasbovyn commented 3 years ago

most likely caused by https://github.com/digita-ai/semcom/pull/127, by switching from rdf-quad to n3 Quads, I can't revert it because rdf-quad doesn't have types

the quads are then fed into rdf-serialize, which is where the error occurs because (I think) it expects rdf-quad