Skip to content

Commit 5c0f440

Browse files
author
Guy Davenport
committed
update buildOpenAPI.py to accept metadata as first arg
1 parent a183591 commit 5c0f440

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Scripts/buildOpenAPI.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,12 @@ def go(rootPaths, metaFilePath = './swaggerMetaData.yaml'):
7575
rootPaths = []
7676
metaFilePath = '.' + '/swaggerMetaData.yaml'
7777
if len(sys.argv) > 1 :
78-
rootPaths = sys.argv[1:]
79-
metaFilePath = rootPaths[0] + '/swaggerMetaData.yaml'
78+
if len(sys.argv) > 2 and sys.argv[1].endswith(".yaml"):
79+
rootPaths = sys.argv[2:]
80+
metaFilePath = sys.argv[1]
81+
else:
82+
rootPaths = sys.argv[1:]
83+
metaFilePath = rootPaths[0] + '/swaggerMetaData.yaml'
8084
else:
8185
print('need at least one root directory')
8286
exit(1)

0 commit comments

Comments
 (0)