-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RDF convertors should not read or write plain JSON #1242
Comments
Conceptually, we need to extend public async canHandle(args: RepresentationConverterArgs): Promise<void> {
await super.canHandle(args);
const { metadata } = args.representation;
if (metadata.contentType === APPLICATION_JSON) {
// Check if the Link header for the context is present
}
} Whereas we can assume that our backend will always use In that sense, this converter has an interesting issue:
Who says it's the client making the error? In this case, it's the server, so it would be a 500 (see #1243). |
I thought there was an issue about this somewhere but I couldn't find it so maybe I'm wrong. But yes, that's an issue if you use an RDF accept header on a JSON document. The |
But then clients sending valid JSON-LD might will be in trouble. |
...if they are using |
Perfect. But then we need to reject it. |
That is going to require a |
Split off that task at #1244 |
Done in #1359 |
As discovered by @joepio in #275
Terminal 1
git checkout 3c32466d8873e73328f678acce1260fea02cabc9 # latest main npm ci npm start
Terminal 2
Log
Expected
200 or 406
The text was updated successfully, but these errors were encountered: