mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-09-05 08:02:18 +00:00
adding python client
This commit is contained in:
+20
-5
@@ -6,7 +6,13 @@ cp ../backend/windmill-api/openapi.yaml openapi/openapi.yaml
|
||||
|
||||
npx @redocly/openapi-cli@latest bundle openapi/openapi.yaml > openapi-bundled.yaml
|
||||
|
||||
sed -z 's/FlowModuleValue:/FlowModuleValue2:/' openapi-bundled.yaml > openapi-decycled.yaml
|
||||
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
|
||||
fi
|
||||
|
||||
echo " FlowModuleValue: {}" >> openapi-decycled.yaml
|
||||
npx @redocly/openapi-cli@latest bundle openapi-decycled.yaml --ext json -d > openapi-deref.json
|
||||
|
||||
@@ -20,9 +26,19 @@ rm -rf openapi/
|
||||
rm openapi*
|
||||
|
||||
cp LICENSE windmill-api/
|
||||
sed -i '5 i license = "Apache-2.0"' windmill-api/pyproject.toml
|
||||
|
||||
sed -i 's/authors = \[\]/authors = \["Ruben Fiszel <ruben@windmill.dev>"\]/g' windmill-api/pyproject.toml
|
||||
# Check if running on macOS
|
||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
# macOS version
|
||||
sed -i '' '5 i\
|
||||
license = "Apache-2.0"' windmill-api/pyproject.toml
|
||||
sed -i '' 's/authors = \[\]/\nauthors = \["Ruben Fiszel <ruben@windmill.dev>"\]/g' windmill-api/pyproject.toml
|
||||
else
|
||||
# Linux version
|
||||
sed -i '5 i license = "Apache-2.0"' windmill-api/pyproject.toml
|
||||
|
||||
sed -i 's/authors = \[\]/authors = \["Ruben Fiszel <ruben@windmill.dev>"\]/g' windmill-api/pyproject.toml
|
||||
fi
|
||||
|
||||
echo "# Autogenerated Windmill OpenApi Client" >> windmill-api/README.md.tmp
|
||||
echo "This is the raw autogenerated api client. You are most likely more interested \
|
||||
@@ -33,8 +49,7 @@ user friendly experience. We use \
|
||||
|
||||
echo "" >> windmill-api/README.md.tmp
|
||||
|
||||
|
||||
head -n -13 windmill-api/README.md >> windmill-api/README.md.tmp
|
||||
tail -r windmill-api/README.md | tail -n +14 | tail -r >> windmill-api/README.md.tmp
|
||||
mv windmill-api/README.md.tmp windmill-api/README.md
|
||||
|
||||
cd windmill-api && poetry build
|
||||
|
||||
Reference in New Issue
Block a user