diff --git a/.github/change-versions.sh b/.github/change-versions.sh index daf9afb504..a6df296c44 100755 --- a/.github/change-versions.sh +++ b/.github/change-versions.sh @@ -5,7 +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/" 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 77db50e819..d645d457fa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -30,7 +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 +COPY /openflow.openapi.yaml /openflow.openapi.yaml RUN npm run generate-backend-client RUN npm run build diff --git a/backend/openapi.yaml b/backend/openapi.yaml index 2e6700f77d..b12fd95b05 100644 --- a/backend/openapi.yaml +++ b/backend/openapi.yaml @@ -1601,7 +1601,7 @@ paths: type: object properties: flow: - $ref: "openflow.openapi.yaml#/components/schemas/OpenFlow" + $ref: "../openflow.openapi.yaml#/components/schemas/OpenFlow" /scripts/hub/get/{path}: get: @@ -2088,7 +2088,7 @@ paths: application/json: schema: allOf: - - $ref: "openflow.openapi.yaml#/components/schemas/OpenFlow" + - $ref: "../openflow.openapi.yaml#/components/schemas/OpenFlow" - type: object properties: path: @@ -2120,7 +2120,7 @@ paths: application/json: schema: allOf: - - $ref: "openflow.openapi.yaml#/components/schemas/OpenFlow" + - $ref: "../openflow.openapi.yaml#/components/schemas/OpenFlow" - type: object properties: path: @@ -3159,7 +3159,7 @@ components: # explode: false schemas: - $ref: "openflow.openapi.yaml#/components/schemas" + $ref: "../openflow.openapi.yaml#/components/schemas" Script: type: object properties: @@ -3287,9 +3287,9 @@ components: The user (u/userfoo) or group (g/groupfoo) whom the execution of this script will be permissioned_as and by extension its DT_TOKEN. flow_status: - $ref: "openflow.openapi.yaml#/components/schemas/FlowStatus" + $ref: "../openflow.openapi.yaml#/components/schemas/FlowStatus" raw_flow: - $ref: "openflow.openapi.yaml#/components/schemas/FlowValue" + $ref: "../openflow.openapi.yaml#/components/schemas/FlowValue" is_flow_step: type: boolean language: @@ -3365,9 +3365,9 @@ components: The user (u/userfoo) or group (g/groupfoo) whom the execution of this script will be permissioned_as and by extension its DT_TOKEN. flow_status: - $ref: "openflow.openapi.yaml#/components/schemas/FlowStatus" + $ref: "../openflow.openapi.yaml#/components/schemas/FlowStatus" raw_flow: - $ref: "openflow.openapi.yaml#/components/schemas/FlowValue" + $ref: "../openflow.openapi.yaml#/components/schemas/FlowValue" is_flow_step: type: boolean language: @@ -3971,7 +3971,7 @@ components: Flow: allOf: - - $ref: "openflow.openapi.yaml#/components/schemas/OpenFlow" + - $ref: "../openflow.openapi.yaml#/components/schemas/OpenFlow" - $ref: "#/components/schemas/FlowMetadata" FlowMetadata: @@ -4003,7 +4003,7 @@ components: type: object properties: value: - $ref: "openflow.openapi.yaml#/components/schemas/FlowValue" + $ref: "../openflow.openapi.yaml#/components/schemas/FlowValue" path: type: string args: diff --git a/backend/openflow.openapi.yaml b/openflow.openapi.yaml similarity index 100% rename from backend/openflow.openapi.yaml rename to openflow.openapi.yaml diff --git a/python-client/build.sh b/python-client/build.sh index bbbc17ea70..42e9845371 100755 --- a/python-client/build.sh +++ b/python-client/build.sh @@ -2,12 +2,12 @@ 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/openflow.openapi.yaml > openflow.openapi.yaml +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 ../backend/openapi.yaml openapi.yaml swagger-cli bundle -r openapi.yaml.tmp -o openapi-deref.yaml -rm openapi.yaml && rm openflow.openapi.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