mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-09-12 00:06:14 +00:00
add go-client mvp + stabilize openapi (#732)
This commit is contained in:
@@ -3,3 +3,4 @@ dist/
|
||||
__pycache__/
|
||||
openapi.yaml
|
||||
openflow.openapi.yaml
|
||||
windmill-api/
|
||||
@@ -1,18 +1,18 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
#TODO: remove once openapi-python-client supports recursive values
|
||||
cp ../openflow.openapi.yaml ../openflow.openapi.yaml.tmp
|
||||
sed -z 's/ ForloopFlow:\n type: object\n properties:\n modules:\n type: array\n items:\n $ref: "#\/components\/schemas\/FlowModule"/ 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
|
||||
npx @redocly/openapi-cli@latest bundle openapi.yaml > openapi-bundled.yaml
|
||||
|
||||
sed -z 's/FlowModuleValue:/FlowModuleValue2:/' openapi-bundled.yaml > openapi-decycled.yaml
|
||||
echo " FlowModuleValue: {}" >> openapi-decycled.yaml
|
||||
npx @redocly/openapi-cli@latest bundle openapi-decycled.yaml --ext json -d > openapi-deref.json
|
||||
|
||||
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
|
||||
openapi-python-client generate --config $PWD/python-gen.yaml --path openapi-deref.json
|
||||
rm openapi*
|
||||
|
||||
cp LICENSE windmill-api/
|
||||
sed -i '5 i license = "Apache-2.0"' windmill-api/pyproject.toml
|
||||
|
||||
Reference in New Issue
Block a user