Comments (7)
I guess it could be a GitHub failure (not uncommon) now it is working properly without touching anything
https://smart-data-models.github.io/dataModel.GBFS/station_status/examples/example-normalized.jsonld
Regarding the @context I see the error but the context remains accessible as well. I guess this should be solved by https://rdf-play.rubensworks.net or maybe the error is misleading us.
from datamodel.gbfs.
No, the headers on https://smartdatamodels.org/context.jsonld are incorrect. As far as I can see, you should:
- Enable Cross Origin Resource Sharing
- Set the right content-type:
Content-Type: application/ld+json
from datamodel.gbfs.
Could you show me an example in Github setting those headers?
from datamodel.gbfs.
Could you show me an example in Github setting those headers?
This is not a github hosting issue, as your file hosted on github pages has all the right headers:
$ curl -I https://smart-data-models.github.io/dataModel.GBFS/station_status/examples/example-normalized.jsonld
HTTP/2 200
server: GitHub.com
content-type: application/ld+json
access-control-allow-origin: *
etag: "61a97b57-81d"
The problem is with the context file that is referenced in this file (https://smartdatamodels.org/context.jsonld), where there is no such content-type
or access-control-allow-origin
header. A JSON-LD library is going to try to dereference the context in order to read this file, but is going to bump into something it is not allowed to fetch from another domain, and when it is able to fetch it, it is going to see that this is not indicated as an application/ld+json
file and thus is not going to continue parsing the file.
$ curl -I https://smartdatamodels.org/context.jsonld
HTTP/1.1 200 OK
Date: Thu, 16 Dec 2021 18:33:17 GMT
Server: Apache/2.4.29 (Ubuntu)
Last-Modified: Thu, 16 Dec 2021 10:52:01 GMT
ETag: "1e573-5d341365cbb64"
Accept-Ranges: bytes
Content-Length: 124275
Content-Type: application/json; charset=utf-8
I can see from the headers youβre using Apache on that server. Adding a .htaccess
file (or adding these 2 lines if it already exists) to the /var/www
(or the real path of your public www dir) should do the trick:
Header set Access-Control-Allow-Origin *
AddType application/ld+json .jsonld
from datamodel.gbfs.
We will try to add headers to smartdamodels.org/context.jsonld
This context is no longer updated as long as now every subject has its own context.jsonld in the root of every subject.
Anyhow we will assess how to set the proper headers for this file.
from datamodel.gbfs.
Another solution would then be indeed to just not use https://smartdatamodels.org/context.jsonld
in the examples and give each jsonld-file its own context!
from datamodel.gbfs.
We are reviewing all @context from all the data models' examples to include only the local @context (and we will reorder the payloads so they all look the same way)
It will take a while (some hours)
from datamodel.gbfs.
Related Issues (1)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from datamodel.gbfs.