mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-19 16:02:14 +00:00
chore: fix python client build (#5856)
* chore: fix python client build * nit
This commit is contained in:
@@ -13185,6 +13185,8 @@ components:
|
||||
# NOTE: Not so many generators and validators support this format:
|
||||
# $ref: "../../openflow.openapi.yaml#/components/schemas"
|
||||
# This is why it is better to inline each of schemas for better compat
|
||||
# Do not change next line. It is used by python-client for pre-processing
|
||||
# -- INLINE START --
|
||||
OpenFlow:
|
||||
$ref: "../../openflow.openapi.yaml#/components/schemas/OpenFlow"
|
||||
FlowValue:
|
||||
@@ -13223,6 +13225,8 @@ components:
|
||||
$ref: "../../openflow.openapi.yaml#/components/schemas/FlowStatus"
|
||||
FlowStatusModule:
|
||||
$ref: "../../openflow.openapi.yaml#/components/schemas/FlowStatusModule"
|
||||
# -- INLINE END --
|
||||
# Do not change line above
|
||||
|
||||
AIProvider:
|
||||
type: string
|
||||
|
||||
@@ -94,6 +94,9 @@
|
||||
python3
|
||||
python3Packages.pip
|
||||
uv
|
||||
poetry
|
||||
pyright
|
||||
openapi-python-client
|
||||
|
||||
# Other languages
|
||||
deno
|
||||
|
||||
+17
-3
@@ -1,8 +1,22 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
mkdir openapi || true
|
||||
cp ../backend/windmill-api/openapi.yaml openapi/openapi.yaml
|
||||
# cp ../backend/windmill-api/openapi.yaml openapi/openapi.yaml
|
||||
|
||||
LEGACY_WILDCARD="\$ref: \"..\/..\/openflow.openapi.yaml#\/components\/schemas\""
|
||||
# We will need to use old syntax of openapi to maintain compatability with previous windmill-api versions.
|
||||
# If we use new format, many models use another namespace, thus make it not fully compatible with old versions
|
||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
# macOS version using perl
|
||||
perl -0777 -pe "s/# -- INLINE START --\n.*?# -- INLINE END --\n/$LEGACY_WILDCARD\n/s" \
|
||||
../backend/windmill-api/openapi.yaml > openapi/openapi.yaml
|
||||
else
|
||||
# Replace everything between markers with legacy wildcard
|
||||
sed -z "
|
||||
s/# -- INLINE START --\n.*# -- INLINE END --\n/$LEGACY_WILDCARD\n/g;
|
||||
" ../backend/windmill-api/openapi.yaml > openapi/openapi.yaml
|
||||
fi
|
||||
|
||||
npx @redocly/openapi-cli@latest bundle openapi/openapi.yaml > openapi-bundled.yaml
|
||||
|
||||
@@ -10,7 +24,7 @@ if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
# sed -z is not supported on macOS, use perl instead
|
||||
perl -0777 -pe 's/FlowModuleValue:/FlowModuleValue2:/g' openapi-bundled.yaml > openapi-decycled.yaml
|
||||
else
|
||||
sed -z 's/FlowModuleValue:/FlowModuleValue2:/' openapi-bundled.yaml > openapi-decycled.yaml
|
||||
sed -z 's/FlowModuleValue:/FlowModuleValue2:/' openapi-bundled.yaml > openapi-decycled.yaml
|
||||
fi
|
||||
|
||||
echo " FlowModuleValue: {}" >> openapi-decycled.yaml
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
./build.sh
|
||||
|
||||
Reference in New Issue
Block a user