Added Python client, updated TS typings, readme

This commit is contained in:
2023-08-28 14:22:41 +03:00
parent 909819d89f
commit 90e469feac
755 changed files with 97840 additions and 11 deletions

View File

@@ -3,13 +3,23 @@
# Generate Cinode TypeScript type definitions
SRC="https://api.cinode.com/swagger/v0.1/swagger.json"
DEST="$(pwd)/src/cinode.d.ts"
DEST="$(pwd)/src/"
DEST_TS="$DEST/cinode.d.ts"
DEST_PY="$DEST/cinode-py-client"
python3 -m pip install --user --upgrade pipx
python3 -m pipx ensurepath
python3 -m pipx install openapi-python-client --include-deps
rm -rf "$DEST_PY"
openapi-python-client generate --url "$SRC"
mv "cinode-api-client" "$DEST_PY"
npx openapi-typescript \
"$SRC" \
--export-type \
--path-params-as-type \
--output "$DEST"
--output "$DEST_TS"
npm run prettier