Skip to content

Commit 2300cb0

Browse files
authored
Merge pull request #48 from common-workflow-language/fix-jsonld-context
Add default @id field to json-ld context if missing.
2 parents ea983fd + 449b5b8 commit 2300cb0

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

schema_salad/jsonld_context.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ def pred(datatype, field, name, context, defaultBase, namespaces):
4646
v = {}
4747
for k, val in field["jsonldPredicate"].items():
4848
v[("@" + k[1:] if k.startswith("_") else k)] = val
49+
if "@id" not in v:
50+
v["@id"] = vee
4951
else:
5052
v = field["jsonldPredicate"]
5153
elif "jsonldPredicate" in datatype:

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
extras_require = {} # TODO: to be removed when the above is added
4545

4646
setup(name='schema-salad',
47-
version='1.15',
47+
version='1.16',
4848
description='Schema Annotations for Linked Avro Data (SALAD)',
4949
long_description=open(README).read(),
5050
author='Common workflow language working group',

0 commit comments

Comments
 (0)