fix(python-client): sed openapi to avoid generator circular dependency

This commit is contained in:
Ruben Fiszel
2022-07-19 10:44:06 +02:00
parent 8c41100402
commit 49f8050aaf
2 changed files with 5 additions and 1 deletions
+1
View File
@@ -1,3 +1,4 @@
openapi-deref.yaml
dist/
__pycache__/
openapi.yaml.tmp
+4 -1
View File
@@ -1,7 +1,10 @@
#!/bin/bash
set -e
swagger-cli bundle -r ../backend/openapi.yaml -o openapi-deref.yaml
#TODO: remove once openapi-python-client supports recursive values
sed -z 's/ FlowModuleValue:\n type: object\n properties:\n value:\n $ref: "#\/components\/schemas\/FlowValue"/ FlowModuleValue:\n type: object\n properties:/' ../backend/openapi.yaml > openapi.yaml.tmp
swagger-cli bundle -r openapi.yaml.tmp -o openapi-deref.yaml
rm -rf windmill-api/ || true
openapi-python-client generate --config $PWD/python-gen.yaml --path openapi-deref.yaml