diff --git a/Dockerfile b/Dockerfile index 6cce869779..ad09317b45 100644 --- a/Dockerfile +++ b/Dockerfile @@ -32,8 +32,8 @@ RUN mkdir /backend COPY /backend/openapi.yaml /backend/openapi.yaml COPY /openflow.openapi.yaml /openflow.openapi.yaml RUN npm run generate-backend-client -RUN npm run check RUN npm run build +RUN npm run check FROM rust:slim-buster as builder diff --git a/python-client/build.sh b/python-client/build.sh index 8fcd5e3d67..21b25ea6a5 100755 --- a/python-client/build.sh +++ b/python-client/build.sh @@ -2,12 +2,14 @@ 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:/' ../openflow.openapi.yaml > ../openflow.openapi.yaml +cp ../openflow.openapi.yaml ../openflow.openapi.yaml.tmp +sed -z 's/ ForloopFlow:\n type: object\n properties:\n value:\n $ref: "#\/components\/schemas\/FlowValue"/ ForloopFlow:\n type: object\n properties:/' ../openflow.openapi.yaml > ../openflow.openapi.yaml.new +mv ../openflow.openapi.yaml.new ../openflow.openapi.yaml cp ../backend/openapi.yaml openapi.yaml swagger-cli bundle -r openapi.yaml -o openapi-deref.yaml -rm openapi.yaml #&& rm ../openflow.openapi.yaml +rm openapi.yaml && mv ../openflow.openapi.yaml.tmp ../openflow.openapi.yaml rm -rf windmill-api/ || true openapi-python-client generate --config $PWD/python-gen.yaml --path openapi-deref.yaml