22# This file was autogenerated using schema-salad-tool --codegen=python
33# The code itself is released under the Apache 2.0 license and the help text is
44# subject to the license of the original schema.
5- from abc import ABC, abstractmethod
65import copy
76import os
87import pathlib
98import re
109import tempfile
1110import uuid as _uuid__ # pylint: disable=unused-import # noqa: F401
11+ from abc import ABC, abstractmethod
1212from io import StringIO
1313from typing import (
1414 Any,
@@ -337,6 +337,7 @@ def load(self, doc, baseuri, loadingOptions, docRoot=None):
337337 d
338338 )
339339 )
340+ r.append(new_dict)
340341
341342 else:
342343 raise ValidationException(
@@ -360,6 +361,7 @@ def load(self, doc, baseuri, loadingOptions, docRoot=None):
360361 doc
361362 )
362363 )
364+ r.append(new_dict)
363365
364366 elif isinstance(doc, str):
365367 if doc.endswith("?"):
@@ -1112,7 +1114,7 @@ def fromDoc(
11121114 try:
11131115 items = load_field(
11141116 _doc.get("items"),
1115- uri_union_of_PrimitiveTypeLoader_or_RecordSchemaLoader_or_EnumSchemaLoader_or_ArraySchemaLoader_or_strtype_or_array_of_union_of_PrimitiveTypeLoader_or_RecordSchemaLoader_or_EnumSchemaLoader_or_ArraySchemaLoader_or_strtype_False_True_2 ,
1117+ typedsl_union_of_PrimitiveTypeLoader_or_RecordSchemaLoader_or_EnumSchemaLoader_or_ArraySchemaLoader_or_strtype_or_array_of_union_of_PrimitiveTypeLoader_or_RecordSchemaLoader_or_EnumSchemaLoader_or_ArraySchemaLoader_or_strtype_2 ,
11161118 baseuri,
11171119 loadingOptions,
11181120 )
@@ -1174,9 +1176,9 @@ def save(
11741176 for ef in self.extension_fields:
11751177 r[prefix_url(ef, self.loadingOptions.vocab)] = self.extension_fields[ef]
11761178 if self.items is not None:
1177- u = save_relative_uri(self.items, base_url, False, 2, relative_uris)
1178- if u:
1179- r["items"] = u
1179+ r["items"] = save(
1180+ self.items, top=False, base_url=base_url, relative_uris=relative_uris
1181+ )
11801182 if self.type is not None:
11811183 r["type"] = save(
11821184 self.type, top=False, base_url=base_url, relative_uris=relative_uris
@@ -2811,7 +2813,7 @@ def fromDoc(
28112813 try:
28122814 items = load_field(
28132815 _doc.get("items"),
2814- uri_union_of_CWLTypeLoader_or_InputRecordSchemaLoader_or_InputEnumSchemaLoader_or_InputArraySchemaLoader_or_strtype_or_array_of_union_of_CWLTypeLoader_or_InputRecordSchemaLoader_or_InputEnumSchemaLoader_or_InputArraySchemaLoader_or_strtype_False_True_2 ,
2816+ typedsl_union_of_CWLTypeLoader_or_InputRecordSchemaLoader_or_InputEnumSchemaLoader_or_InputArraySchemaLoader_or_strtype_or_array_of_union_of_CWLTypeLoader_or_InputRecordSchemaLoader_or_InputEnumSchemaLoader_or_InputArraySchemaLoader_or_strtype_2 ,
28152817 baseuri,
28162818 loadingOptions,
28172819 )
@@ -2916,9 +2918,9 @@ def save(
29162918 if u:
29172919 r["name"] = u
29182920 if self.items is not None:
2919- u = save_relative_uri(self.items, self.name, False, 2, relative_uris)
2920- if u:
2921- r["items"] = u
2921+ r["items"] = save(
2922+ self.items, top=False, base_url=self.name, relative_uris=relative_uris
2923+ )
29222924 if self.type is not None:
29232925 r["type"] = save(
29242926 self.type, top=False, base_url=self.name, relative_uris=relative_uris
@@ -3679,7 +3681,7 @@ def fromDoc(
36793681 try:
36803682 items = load_field(
36813683 _doc.get("items"),
3682- uri_union_of_CWLTypeLoader_or_OutputRecordSchemaLoader_or_OutputEnumSchemaLoader_or_OutputArraySchemaLoader_or_strtype_or_array_of_union_of_CWLTypeLoader_or_OutputRecordSchemaLoader_or_OutputEnumSchemaLoader_or_OutputArraySchemaLoader_or_strtype_False_True_2 ,
3684+ typedsl_union_of_CWLTypeLoader_or_OutputRecordSchemaLoader_or_OutputEnumSchemaLoader_or_OutputArraySchemaLoader_or_strtype_or_array_of_union_of_CWLTypeLoader_or_OutputRecordSchemaLoader_or_OutputEnumSchemaLoader_or_OutputArraySchemaLoader_or_strtype_2 ,
36833685 baseuri,
36843686 loadingOptions,
36853687 )
@@ -3784,9 +3786,9 @@ def save(
37843786 if u:
37853787 r["name"] = u
37863788 if self.items is not None:
3787- u = save_relative_uri(self.items, self.name, False, 2, relative_uris)
3788- if u:
3789- r["items"] = u
3789+ r["items"] = save(
3790+ self.items, top=False, base_url=self.name, relative_uris=relative_uris
3791+ )
37903792 if self.type is not None:
37913793 r["type"] = save(
37923794 self.type, top=False, base_url=self.name, relative_uris=relative_uris
@@ -5966,7 +5968,7 @@ def fromDoc(
59665968 try:
59675969 items = load_field(
59685970 _doc.get("items"),
5969- uri_union_of_CWLTypeLoader_or_CommandInputRecordSchemaLoader_or_CommandInputEnumSchemaLoader_or_CommandInputArraySchemaLoader_or_strtype_or_array_of_union_of_CWLTypeLoader_or_CommandInputRecordSchemaLoader_or_CommandInputEnumSchemaLoader_or_CommandInputArraySchemaLoader_or_strtype_False_True_2 ,
5971+ typedsl_union_of_CWLTypeLoader_or_CommandInputRecordSchemaLoader_or_CommandInputEnumSchemaLoader_or_CommandInputArraySchemaLoader_or_strtype_or_array_of_union_of_CWLTypeLoader_or_CommandInputRecordSchemaLoader_or_CommandInputEnumSchemaLoader_or_CommandInputArraySchemaLoader_or_strtype_2 ,
59705972 baseuri,
59715973 loadingOptions,
59725974 )
@@ -6092,9 +6094,9 @@ def save(
60926094 if u:
60936095 r["name"] = u
60946096 if self.items is not None:
6095- u = save_relative_uri(self.items, self.name, False, 2, relative_uris)
6096- if u:
6097- r["items"] = u
6097+ r["items"] = save(
6098+ self.items, top=False, base_url=self.name, relative_uris=relative_uris
6099+ )
60986100 if self.type is not None:
60996101 r["type"] = save(
61006102 self.type, top=False, base_url=self.name, relative_uris=relative_uris
@@ -6905,7 +6907,7 @@ def fromDoc(
69056907 try:
69066908 items = load_field(
69076909 _doc.get("items"),
6908- uri_union_of_CWLTypeLoader_or_CommandOutputRecordSchemaLoader_or_CommandOutputEnumSchemaLoader_or_CommandOutputArraySchemaLoader_or_strtype_or_array_of_union_of_CWLTypeLoader_or_CommandOutputRecordSchemaLoader_or_CommandOutputEnumSchemaLoader_or_CommandOutputArraySchemaLoader_or_strtype_False_True_2 ,
6910+ typedsl_union_of_CWLTypeLoader_or_CommandOutputRecordSchemaLoader_or_CommandOutputEnumSchemaLoader_or_CommandOutputArraySchemaLoader_or_strtype_or_array_of_union_of_CWLTypeLoader_or_CommandOutputRecordSchemaLoader_or_CommandOutputEnumSchemaLoader_or_CommandOutputArraySchemaLoader_or_strtype_2 ,
69096911 baseuri,
69106912 loadingOptions,
69116913 )
@@ -7012,9 +7014,9 @@ def save(
70127014 if u:
70137015 r["name"] = u
70147016 if self.items is not None:
7015- u = save_relative_uri(self.items, self.name, False, 2, relative_uris)
7016- if u:
7017- r["items"] = u
7017+ r["items"] = save(
7018+ self.items, top=False, base_url=self.name, relative_uris=relative_uris
7019+ )
70187020 if self.type is not None:
70197021 r["type"] = save(
70207022 self.type, top=False, base_url=self.name, relative_uris=relative_uris
@@ -14699,12 +14701,6 @@ def save(
1469914701typedsl_enum_d961d79c225752b9fadb617367615ab176b47d77Loader_2 = _TypeDSLLoader(
1470014702 enum_d961d79c225752b9fadb617367615ab176b47d77Loader, 2
1470114703)
14702- uri_union_of_PrimitiveTypeLoader_or_RecordSchemaLoader_or_EnumSchemaLoader_or_ArraySchemaLoader_or_strtype_or_array_of_union_of_PrimitiveTypeLoader_or_RecordSchemaLoader_or_EnumSchemaLoader_or_ArraySchemaLoader_or_strtype_False_True_2 = _URILoader(
14703- union_of_PrimitiveTypeLoader_or_RecordSchemaLoader_or_EnumSchemaLoader_or_ArraySchemaLoader_or_strtype_or_array_of_union_of_PrimitiveTypeLoader_or_RecordSchemaLoader_or_EnumSchemaLoader_or_ArraySchemaLoader_or_strtype,
14704- False,
14705- True,
14706- 2,
14707- )
1470814704enum_d062602be0b4b8fd33e69e29a841317b6ab665bcLoader = _EnumLoader(("array",))
1470914705typedsl_enum_d062602be0b4b8fd33e69e29a841317b6ab665bcLoader_2 = _TypeDSLLoader(
1471014706 enum_d062602be0b4b8fd33e69e29a841317b6ab665bcLoader, 2
@@ -14834,12 +14830,6 @@ def save(
1483414830idmap_fields_union_of_None_type_or_array_of_InputRecordFieldLoader = _IdMapLoader(
1483514831 union_of_None_type_or_array_of_InputRecordFieldLoader, "name", "type"
1483614832)
14837- uri_union_of_CWLTypeLoader_or_InputRecordSchemaLoader_or_InputEnumSchemaLoader_or_InputArraySchemaLoader_or_strtype_or_array_of_union_of_CWLTypeLoader_or_InputRecordSchemaLoader_or_InputEnumSchemaLoader_or_InputArraySchemaLoader_or_strtype_False_True_2 = _URILoader(
14838- union_of_CWLTypeLoader_or_InputRecordSchemaLoader_or_InputEnumSchemaLoader_or_InputArraySchemaLoader_or_strtype_or_array_of_union_of_CWLTypeLoader_or_InputRecordSchemaLoader_or_InputEnumSchemaLoader_or_InputArraySchemaLoader_or_strtype,
14839- False,
14840- True,
14841- 2,
14842- )
1484314833union_of_CWLTypeLoader_or_OutputRecordSchemaLoader_or_OutputEnumSchemaLoader_or_OutputArraySchemaLoader_or_strtype = _UnionLoader(
1484414834 (
1484514835 CWLTypeLoader,
@@ -14876,12 +14866,6 @@ def save(
1487614866idmap_fields_union_of_None_type_or_array_of_OutputRecordFieldLoader = _IdMapLoader(
1487714867 union_of_None_type_or_array_of_OutputRecordFieldLoader, "name", "type"
1487814868)
14879- uri_union_of_CWLTypeLoader_or_OutputRecordSchemaLoader_or_OutputEnumSchemaLoader_or_OutputArraySchemaLoader_or_strtype_or_array_of_union_of_CWLTypeLoader_or_OutputRecordSchemaLoader_or_OutputEnumSchemaLoader_or_OutputArraySchemaLoader_or_strtype_False_True_2 = _URILoader(
14880- union_of_CWLTypeLoader_or_OutputRecordSchemaLoader_or_OutputEnumSchemaLoader_or_OutputArraySchemaLoader_or_strtype_or_array_of_union_of_CWLTypeLoader_or_OutputRecordSchemaLoader_or_OutputEnumSchemaLoader_or_OutputArraySchemaLoader_or_strtype,
14881- False,
14882- True,
14883- 2,
14884- )
1488514869union_of_None_type_or_Any_type = _UnionLoader(
1488614870 (
1488714871 None_type,
@@ -15082,12 +15066,6 @@ def save(
1508215066 union_of_None_type_or_array_of_CommandInputRecordFieldLoader, "name", "type"
1508315067 )
1508415068)
15085- uri_union_of_CWLTypeLoader_or_CommandInputRecordSchemaLoader_or_CommandInputEnumSchemaLoader_or_CommandInputArraySchemaLoader_or_strtype_or_array_of_union_of_CWLTypeLoader_or_CommandInputRecordSchemaLoader_or_CommandInputEnumSchemaLoader_or_CommandInputArraySchemaLoader_or_strtype_False_True_2 = _URILoader(
15086- union_of_CWLTypeLoader_or_CommandInputRecordSchemaLoader_or_CommandInputEnumSchemaLoader_or_CommandInputArraySchemaLoader_or_strtype_or_array_of_union_of_CWLTypeLoader_or_CommandInputRecordSchemaLoader_or_CommandInputEnumSchemaLoader_or_CommandInputArraySchemaLoader_or_strtype,
15087- False,
15088- True,
15089- 2,
15090- )
1509115069union_of_CWLTypeLoader_or_CommandOutputRecordSchemaLoader_or_CommandOutputEnumSchemaLoader_or_CommandOutputArraySchemaLoader_or_strtype = _UnionLoader(
1509215070 (
1509315071 CWLTypeLoader,
@@ -15132,12 +15110,6 @@ def save(
1513215110 union_of_None_type_or_array_of_CommandOutputRecordFieldLoader, "name", "type"
1513315111 )
1513415112)
15135- uri_union_of_CWLTypeLoader_or_CommandOutputRecordSchemaLoader_or_CommandOutputEnumSchemaLoader_or_CommandOutputArraySchemaLoader_or_strtype_or_array_of_union_of_CWLTypeLoader_or_CommandOutputRecordSchemaLoader_or_CommandOutputEnumSchemaLoader_or_CommandOutputArraySchemaLoader_or_strtype_False_True_2 = _URILoader(
15136- union_of_CWLTypeLoader_or_CommandOutputRecordSchemaLoader_or_CommandOutputEnumSchemaLoader_or_CommandOutputArraySchemaLoader_or_strtype_or_array_of_union_of_CWLTypeLoader_or_CommandOutputRecordSchemaLoader_or_CommandOutputEnumSchemaLoader_or_CommandOutputArraySchemaLoader_or_strtype,
15137- False,
15138- True,
15139- 2,
15140- )
1514115113union_of_CWLTypeLoader_or_stdinLoader_or_CommandInputRecordSchemaLoader_or_CommandInputEnumSchemaLoader_or_CommandInputArraySchemaLoader_or_strtype_or_array_of_union_of_CWLTypeLoader_or_CommandInputRecordSchemaLoader_or_CommandInputEnumSchemaLoader_or_CommandInputArraySchemaLoader_or_strtype = _UnionLoader(
1514215114 (
1514315115 CWLTypeLoader,
0 commit comments