Skip to content

Commit

Permalink
Merge pull request #48 from common-workflow-language/fix-jsonld-context
Browse files Browse the repository at this point in the history
Add default @id field to json-ld context if missing.
  • Loading branch information
tetron authored Aug 10, 2016
2 parents ea983fd + 449b5b8 commit 2300cb0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions schema_salad/jsonld_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ def pred(datatype, field, name, context, defaultBase, namespaces):
v = {}
for k, val in field["jsonldPredicate"].items():
v[("@" + k[1:] if k.startswith("_") else k)] = val
if "@id" not in v:
v["@id"] = vee
else:
v = field["jsonldPredicate"]
elif "jsonldPredicate" in datatype:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
extras_require = {} # TODO: to be removed when the above is added

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

0 comments on commit 2300cb0

Please sign in to comment.