This repository was archived by the owner on Jun 2, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ testpub:
2525 twine upload --repository testpypi dist/*
2626
2727schema :
28- ./support/fetch_openapi.py
28+ ./support/openapi/ fetch_openapi.py
2929
3030templates :
3131 ./support/api_generation/dump_templates.sh
Original file line number Diff line number Diff line change 22
33set -eo pipefail
44
5- OPENAPI_PATH=${OPENAPI_PATH:- " support/openapi.json" }
6-
75# make sure we're on root dir
86cd $( dirname $0 )
97cd ..
108cd ..
119
10+ ./support/openapi/tweak_openapi.py
11+
1212./support/api_generation/openapi-generator-cli.sh \
1313 generate \
14- -i " ${OPENAPI_PATH} " \
14+ -i support/openapi/build/openapi.json \
1515 -c support/api_generation/config.yaml \
1616 -o .
1717
Original file line number Diff line number Diff line change 99
1010DEMO_HOST = 'https://demo.defectdojo.org'
1111FILE = Path (__file__ ).parent / 'openapi.json'
12+ SCRIPTS = Path (__file__ ).parent .parent / 'integration'
1213
1314
1415def main ():
@@ -18,7 +19,7 @@ def main():
1819 if args .demo :
1920 host = DEMO_HOST
2021 else :
21- subprocess .check_call ([Path ( __file__ ). parent / 'integration' / 'run_dojo.sh' ])
22+ subprocess .check_call ([SCRIPTS / 'run_dojo.sh' ])
2223 host = 'http://localhost:8080'
2324
2425 try :
@@ -28,7 +29,7 @@ def main():
2829 json .dump (r .json (), f , indent = 4 )
2930 finally :
3031 if not args .demo :
31- subprocess .check_call ([Path ( __file__ ). parent / 'integration' / 'stop_dojo.sh' ])
32+ subprocess .check_call ([SCRIPTS / 'stop_dojo.sh' ])
3233
3334
3435if __name__ == '__main__' :
File renamed without changes.
Original file line number Diff line number Diff line change 1+ #!/usr/bin/env python3
2+
3+ import json
4+ from pathlib import Path
5+
6+ FILE = Path (__file__ ).parent / 'openapi.json'
7+ BUILD = Path (__file__ ).parent / 'build' / 'openapi.json'
8+
9+
10+ def main ():
11+ BUILD .parent .mkdir (exist_ok = True )
12+ with FILE .open ('r' ) as inp :
13+ data = json .load (inp )
14+
15+ # nothing done for now...
16+
17+ with BUILD .open ('w' ) as out :
18+ json .dump (data , out , indent = 4 )
19+
20+
21+ if __name__ == '__main__' :
22+ main ()
You can’t perform that action at this time.
0 commit comments