Skip to content

Commit a6de851

Browse files
committed
fix issue with no outoput and not datatypes
1 parent a25ec2e commit a6de851

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

synapseclient/extensions/curator/schema_generation.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5621,10 +5621,6 @@ def generate_jsonschema(
56215621
os.makedirs(dirname, exist_ok=True)
56225622
else:
56235623
dirname = "./"
5624-
if data_types is None or len(data_types) != 1:
5625-
raise ValueError(
5626-
"When specifying more than a single output file, don't provide a file path."
5627-
)
56285624

56295625
# Gets all data types if none are specified
56305626
if data_types is None or len(data_types) == 0:
@@ -5637,6 +5633,11 @@ def generate_jsonschema(
56375633
]
56385634
]
56395635

5636+
if len(data_types) != 1 and output is not None and output.endswith(".json"):
5637+
raise ValueError(
5638+
"When specifying more than a single output file, don't provide a file path."
5639+
)
5640+
56405641
if len(data_types) == 1 and output is not None and output.endswith(".json"):
56415642
schema_paths = [output]
56425643
else:

0 commit comments

Comments
 (0)