diff --git a/.github/change-versions.sh b/.github/change-versions.sh index 6d6cf9fead..daf9afb504 100755 --- a/.github/change-versions.sh +++ b/.github/change-versions.sh @@ -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 diff --git a/Dockerfile b/Dockerfile index db5dff0c5f..77db50e819 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 diff --git a/python-client/.gitignore b/python-client/.gitignore index 75631df92e..b8e19cb529 100644 --- a/python-client/.gitignore +++ b/python-client/.gitignore @@ -1,4 +1,5 @@ openapi-deref.yaml dist/ __pycache__/ -openapi.yaml.tmp +openapi.yaml +openflow.openapi.yaml diff --git a/python-client/build.sh b/python-client/build.sh index 2bb86d0a52..bbbc17ea70 100755 --- a/python-client/build.sh +++ b/python-client/build.sh @@ -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