fix other references to openapi.yaml

This commit is contained in:
Ruben Fiszel
2022-07-30 17:36:54 +02:00
parent 35aaa7c36e
commit d2f47b2b23
4 changed files with 9 additions and 2 deletions
+2 -1
View File
@@ -1,4 +1,5 @@
openapi-deref.yaml
dist/
__pycache__/
openapi.yaml.tmp
openapi.yaml
openflow.openapi.yaml
+5 -1
View File
@@ -2,9 +2,13 @@
set -e
#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
sed -z 's/ FlowModuleValue:\n type: object\n properties:\n value:\n $ref: "#\/components\/schemas\/FlowValue"/ FlowModuleValue:\n type: object\n properties:/' ../backend/openflow.openapi.yaml > openflow.openapi.yaml
cp ../backend/openapi.yaml openapi.yaml
swagger-cli bundle -r openapi.yaml.tmp -o openapi-deref.yaml
rm openapi.yaml && rm openflow.openapi.yaml
rm -rf windmill-api/ || true
openapi-python-client generate --config $PWD/python-gen.yaml --path openapi-deref.yaml