File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -174,6 +174,9 @@ def rewrite_id(r, mainuri):
174
174
namespaces = metadata .get ('$namespaces' , None )
175
175
176
176
schemas = set () # type: Set[Text]
177
+ if '$schemas' in metadata :
178
+ for each_schema in metadata ["$schemas" ]:
179
+ schemas .add (each_schema )
177
180
for r in sorted (runs ):
178
181
dcr , metadata = document_loader .resolve_ref (r )
179
182
if isinstance (dcr , CommentedSeq ):
@@ -208,7 +211,10 @@ def rewrite_id(r, mainuri):
208
211
# duplicate 'cwlVersion' inside $graph when there is a single item
209
212
# because we're printing contents inside '$graph' rather than whole dict
210
213
packed ["$graph" ][0 ]["cwlVersion" ] = packed ["cwlVersion" ]
211
- if namespaces :
212
- packed ["$graph" ][0 ]["$namespaces" ] = dict (cast (Dict , namespaces ))
214
+ if namespaces :
215
+ packed ["$graph" ][0 ]["$namespaces" ] = dict (cast (Dict , namespaces ))
216
+ if schemas :
217
+ packed ["$graph" ][0 ]["$schemas" ] = list (schemas )
218
+
213
219
214
220
return packed
You can’t perform that action at this time.
0 commit comments