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
+1
View File
@@ -5,6 +5,7 @@ echo "Updating versions to: $VERSION"
sed -i -e "/^version =/s/= .*/= \"$VERSION\"/" backend/Cargo.toml
sed -i -e "/version: /s/: .*/: $VERSION/" backend/openapi.yaml
sed -i -e "/version: /s/: .*/: $VERSION/" backend/openflow.openapi.yaml
sed -i -e "/\"version\": /s/: .*,/: \"$VERSION\",/" frontend/package.json
sed -i -e "/^version =/s/= .*/= \"$VERSION\"/" python-client/wmill/pyproject.toml
sed -i -e "/^windmill-api =/s/= .*/= \"\\^$VERSION\"/" python-client/wmill/pyproject.toml
+1
View File
@@ -30,6 +30,7 @@ RUN npm ci
COPY frontend .
RUN mkdir /backend
COPY /backend/openapi.yaml /backend/openapi.yaml
COPY /backend/openflow.openapi.yaml /backend/openflow.openapi.yaml
RUN npm run generate-backend-client
RUN npm run build
+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