We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 24110c0 commit 2d50d89Copy full SHA for 2d50d89
lib/context.js
@@ -770,6 +770,12 @@ api.createTermDefinition = ({
770
'jsonld.SyntaxError',
771
{code: 'invalid term definition', context: localCtx});
772
}
773
+ if(api.isKeyword(mapping['@id'])) {
774
+ throw new JsonLdError(
775
+ 'Invalid JSON-LD syntax; keywords may not be used as prefixes',
776
+ 'jsonld.SyntaxError',
777
+ {code: 'invalid term definition', context: localCtx});
778
+ }
779
if(typeof value['@prefix'] === 'boolean') {
780
mapping._prefix = value['@prefix'] === true;
781
} else {
0 commit comments