api issueshttps://gitlab.adullact.net/pixelhumain/api/-/issues2017-03-17T15:53:36+01:00https://gitlab.adullact.net/pixelhumain/api/-/issues/6JSON-LD serialization is not Linked Open Data2017-03-17T15:53:36+01:00Raph ElJSON-LD serialization is not Linked Open Data*Created by: almereyda*
The JSON-LD serialization of a dataset is produced by mixing API and Linked Data design patterns.
Currently a `?format=schema` parameter is being used to produce an almost desired effect, which breaks the abilit...*Created by: almereyda*
The JSON-LD serialization of a dataset is produced by mixing API and Linked Data design patterns.
Currently a `?format=schema` parameter is being used to produce an almost desired effect, which breaks the ability to directly link to the document.
```
$ curl -sH "Accept: application/ld+json" https://www.communecter.org/api/organization/get/id/55cf123fe41d7544778b1451/ | jq .
{
"meta": {
"limit": 1
},
"entities": {
"55cf123fe41d7544778b1451": {
"@type": "Organization",
"name": "Géo Organique",
"typeCommunecter": "Group",
"image": "https://www.communecter.org/upload/communecter/organizations/55cf123fe41d7544778b1451/Photo0552.jpg",
"url": {
"website": "http://wiki.cheznous.coop/geoorganique",
"communecter": "https://www.communecter.org/#organization.detail.id.55cf123fe41d7544778b1451",
"api": "https://www.communecter.org/api/organization/get/id/55cf123fe41d7544778b1451"
},
"address": {
"@type": "PostalAddress",
"streetAddress": "12, chemin du Busquet",
"postalCode": "63340",
"addressLocality": "VICHEL",
"codeInsee": "63456",
"addressCountry": "FR"
},
"geo": {
"@type": "GeoCoordinates",
"latitude": 45.428634,
"longitude": 3.242987
},
"geoPosition": {
"@type": "Point",
"coordinates": [
3.242987,
45.428634
]
},
"shortDescription": "<p class=\"wysiwyg-text-align-justify\">Géo Organique est un Groupe dont l'animateur vise à dessiner un réseau autour de la géographie organique. <br></p><p class=\"wysiwyg-text-align-justify\">Celle-ci est très attachée aux bases, partant de l'idée que les choses doivent rester simple et claires au départ, pour parvenir à faire complexe. <br></p><p class=\"wysiwyg-text-align-justify\">La racine de ce projet est à cette adresse : <a rel=\"nofollow\" target=\"_blank\" href=\"http://wiki.cheznous.coop/geoorganique\">http://wiki.cheznous.coop/geoorganique</a> <br></p><p class=\"wysiwyg-text-align-justify\">Le souhait est aussi de faire quelque chose de participatif et contributif : les adhérents au groupe construisent des témoignages de leurs usages et projets en cartographie.<br></p><br>",
"description": "Thème de la Géographie organique sur le Pays d'Issoire (<a rel=\"nofollow\" target=\"_blank\" href=\"http://wiki.cheznous.coop/_media/carto_geopoetique_issoire.pdf\">document pdf</a>)<br>",
"email": "geo@spatiogis.fr",
"tags": [
"Education populaire",
"Biodiversité"
],
"links": {
"members": [
{
"type": "Person",
"name": "Televb",
"url": {
"communecter": "https://www.communecter.org/#person.detail.id.55c85b17e41d75864f8b144f",
"api": "https://www.communecter.org/api/person/get/id/55c85b17e41d75864f8b144f"
}
},
{
"type": "Person",
"name": "Mathieu Coste",
"url": {
"communecter": "https://www.communecter.org/#person.detail.id.55901b8fe41d75292e59ce8b",
"api": "https://www.communecter.org/api/person/get/id/55901b8fe41d75292e59ce8b"
}
}
]
}
}
}
}
```
Instead, the route could make use of content negotiation headers to distinguish which serialization is requested. For JSON-LD it is `application/ld+json`.
Additionally the stable IRIs provided by the [returned document of the `?format=schema` route](https://github.com/pixelhumain/api/issues/5#issue-214974533) cannot be dereferenced and produce 404s:
```
$ curl -I https://www.communecter.org/data/get/type/organizations/id/55cf123fe41d7544778b1451/format/schema
HTTP/1.0 404 Not Found
Date: Fri, 17 Mar 2017 11:27:32 GMT
Server: Apache/2.4.7 (Ubuntu)
X-Powered-By: PHP/5.5.9-1ubuntu4.14
Connection: close
Content-Type: text/html
```
This depends on #5 .
Also read https://ruben.verborgh.org/blog/2013/11/29/the-lie-of-the-api/https://gitlab.adullact.net/pixelhumain/api/-/issues/5JSON-LD API response contains meta information2017-03-17T12:35:40+01:00Raph ElJSON-LD API response contains meta information*Created by: almereyda*
For a JSON-LD document to be accessible on the Web of Data, it must expose directly to its URL.
Currently `meta`, `entities` and *`id`* keys are exposed, which break the direct parsing of the document.
Exampl...*Created by: almereyda*
For a JSON-LD document to be accessible on the Web of Data, it must expose directly to its URL.
Currently `meta`, `entities` and *`id`* keys are exposed, which break the direct parsing of the document.
Example:
*
```
$ curl -s https://www.communecter.org/api/organization/get/id/55cf123fe41d7544778b1451/?format=schema | jq .
{
"meta": {
"limit": 1
},
"entities": {
"55cf123fe41d7544778b1451": {
"@context": "http://schema.org",
"@type": "Organization",
"id": "https://www.communecter.org/data/get/type/organizations/id/55cf123fe41d7544778b1451/format/schema",
"name": "Géo Organique",
"address": {
"@type": "PostalAddress",
"@id": "https://www.communecter.org/data/get/type/city/insee/63456/format/schema",
"addressLocality": "VICHEL",
"postalCode": "63340",
"streetAddress": "12, chemin du Busquet"
},
"email": "geo@spatiogis.fr",
"url": "http://wiki.cheznous.coop/geoorganique"
}
}
}
```
which should only read as
```
$ curl -s https://www.communecter.org/api/organization/get/id/55cf123fe41d7544778b1451/?format=schema | jq ".entities | to_entries[].value"
{
"@context": "http://schema.org",
"@type": "Organization",
"id": "https://www.communecter.org/data/get/type/organizations/id/55cf123fe41d7544778b1451/format/schema",
"name": "Géo Organique",
"address": {
"@type": "PostalAddress",
"@id": "https://www.communecter.org/data/get/type/city/insee/63456/format/schema",
"addressLocality": "VICHEL",
"postalCode": "63340",
"streetAddress": "12, chemin du Busquet"
},
"email": "geo@spatiogis.fr",
"url": "http://wiki.cheznous.coop/geoorganique"
}
```https://gitlab.adullact.net/pixelhumain/api/-/issues/4JSON-LD Schema.org serialization omits geographic properties.2017-03-17T19:15:45+01:00Raph ElJSON-LD Schema.org serialization omits geographic properties.*Created by: almereyda*
The Schema.org serialization of a dataset doesn't map the geocoordinates, which are thus omitted. They are present in the custom data model:
Example:
* https://www.communecter.org/api/organization/get/id/55...*Created by: almereyda*
The Schema.org serialization of a dataset doesn't map the geocoordinates, which are thus omitted. They are present in the custom data model:
Example:
* https://www.communecter.org/api/organization/get/id/55cf123fe41d7544778b1451/
* https://www.communecter.org/api/organization/get/id/55cf123fe41d7544778b1451/?format=schemahttps://gitlab.adullact.net/pixelhumain/api/-/issues/3Where is JSON-LD gone?2017-03-17T19:36:52+01:00Raph ElWhere is JSON-LD gone?*Created by: almereyda*
Earlier versions of the Communecter API had been shown to work producing JSON-LD serializations of the underlying data.
The current Swagger only documents `json` https://github.com/pixelhumain/api/blob/master/...*Created by: almereyda*
Earlier versions of the Communecter API had been shown to work producing JSON-LD serializations of the underlying data.
The current Swagger only documents `json` https://github.com/pixelhumain/api/blob/master/data/api.json#L16 and a JSON-LD Accept header also doesn't help to get what I want.
Has this feature been removed?