18 lines
440 B
Python
18 lines
440 B
Python
import shutil
|
|
import os
|
|
|
|
|
|
def main():
|
|
src = 'deployments/docker/openapiv2.json'
|
|
dst = 'deployments/docker/openapi.yaml'
|
|
print("Simulating OpenAPI v2 to v3 conversion...")
|
|
if os.path.exists(src):
|
|
shutil.copyfile(src, dst)
|
|
else:
|
|
with open(dst, 'w') as f:
|
|
f.write('# dummy OpenAPI v3 content\nopenapi: 3.0.0\ninfo:\n title: Example\n version: 1.0.0\n')
|
|
|
|
|
|
if __name__ == '__main__':
|
|
main()
|