Skip to content

Commit 749ab7d

Browse files
chore: sync SDK v7.15.3 from core
1 parent fd02154 commit 749ab7d

5 files changed

Lines changed: 66 additions & 39 deletions

File tree

generate.sh

Lines changed: 60 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,23 @@ ROOT_DIR="$(dirname "$SCRIPT_DIR")"
66

77
cd "$SCRIPT_DIR"
88

9+
# Parse optional SDK arguments (e.g., `generate.sh go python` to skip ts)
10+
# Valid values: ts, go, python. If none provided, all are generated.
11+
REQUESTED_SDKS=("$@")
12+
13+
should_generate() {
14+
local sdk="$1"
15+
if [[ ${#REQUESTED_SDKS[@]} -eq 0 ]]; then
16+
return 0 # no filter, generate all
17+
fi
18+
for req in "${REQUESTED_SDKS[@]}"; do
19+
if [[ "$req" == "$sdk" ]]; then
20+
return 0
21+
fi
22+
done
23+
return 1
24+
}
25+
926
echo "Generating SDKs from openapi.json..."
1027
echo ""
1128

@@ -18,51 +35,57 @@ echo "OpenAPI spec generated"
1835
echo ""
1936

2037
# ============ TypeScript ============
21-
echo "Generating TypeScript client..."
22-
cd "$ROOT_DIR"
23-
pnpm -F @parallelworks/client generate-types
24-
echo "TypeScript client generated"
25-
echo ""
38+
if should_generate ts; then
39+
echo "Generating TypeScript client..."
40+
cd "$ROOT_DIR"
41+
pnpm -F @parallelworks/client generate-types
42+
echo "TypeScript client generated"
43+
echo ""
44+
fi
2645

2746
# ============ Go ============
28-
echo "Generating Go SDK..."
29-
cd "$SCRIPT_DIR"
47+
if should_generate go; then
48+
echo "Generating Go SDK..."
49+
cd "$SCRIPT_DIR"
3050

31-
# Uses the version pinned in go.mod via `go get -tool`
32-
cd "$ROOT_DIR"
33-
go tool github.com/parallelworks/openapi-client-generator generate \
34-
-s sdk/openapi.json \
35-
-o sdk/go \
36-
-p parallelworks
37-
38-
cd "$SCRIPT_DIR/go"
39-
go mod tidy
40-
go fmt ./...
41-
echo "Go SDK generated"
42-
echo ""
51+
# Uses the version pinned in go.mod via `go get -tool`
52+
cd "$ROOT_DIR"
53+
go tool github.com/parallelworks/openapi-client-generator generate \
54+
-s sdk/openapi.json \
55+
-o sdk/go \
56+
-p parallelworks
57+
58+
cd "$SCRIPT_DIR/go"
59+
go mod tidy
60+
go fmt ./...
61+
echo "Go SDK generated"
62+
echo ""
63+
fi
4364

4465
# ============ Python ============
45-
echo "Generating Python SDK..."
46-
cd "$SCRIPT_DIR"
66+
if should_generate python; then
67+
echo "Generating Python SDK..."
68+
cd "$SCRIPT_DIR"
4769

48-
# Save hand-written files before generation overwrites them
49-
PY_BACKUP="$(mktemp -d)"
50-
trap 'rm -rf "$PY_BACKUP"' EXIT
51-
cp ./python/parallelworks_client/__init__.py "$PY_BACKUP/__init__.py"
52-
cp ./python/parallelworks_client/auth.py "$PY_BACKUP/auth.py"
70+
# Save hand-written files before generation overwrites them
71+
PY_BACKUP="$(mktemp -d)"
72+
trap 'rm -rf "$PY_BACKUP"' EXIT
73+
cp ./python/parallelworks_client/__init__.py "$PY_BACKUP/__init__.py"
74+
cp ./python/parallelworks_client/auth.py "$PY_BACKUP/auth.py"
5375

54-
# Use uv to run openapi-python-client
55-
uvx openapi-python-client generate \
56-
--path ./openapi.json \
57-
--output-path ./python/parallelworks_client \
58-
--meta none \
59-
--overwrite
76+
# Use uv to run openapi-python-client
77+
uvx openapi-python-client generate \
78+
--path ./openapi.json \
79+
--output-path ./python/parallelworks_client \
80+
--meta none \
81+
--overwrite
6082

61-
# Restore hand-written files that the generator overwrites
62-
mv "$PY_BACKUP/__init__.py" ./python/parallelworks_client/__init__.py
63-
mv "$PY_BACKUP/auth.py" ./python/parallelworks_client/auth.py
83+
# Restore hand-written files that the generator overwrites
84+
mv "$PY_BACKUP/__init__.py" ./python/parallelworks_client/__init__.py
85+
mv "$PY_BACKUP/auth.py" ./python/parallelworks_client/auth.py
6486

65-
echo "Python SDK generated"
66-
echo ""
87+
echo "Python SDK generated"
88+
echo ""
89+
fi
6790

6891
echo "All SDKs generated successfully!"

go/types.go

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

openapi.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17067,6 +17067,9 @@
1706717067
"format": "double",
1706817068
"type": "number"
1706917069
},
17070+
"debugMode": {
17071+
"type": "boolean"
17072+
},
1707017073
"ephemeralStorageLimit": {
1707117074
"format": "double",
1707217075
"type": "number"

python/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "parallelworks-client"
7-
version = "7.15.0"
7+
version = "7.15.3"
88
description = "Official Python SDK for Parallel Works ACTIVATE"
99
readme = "README.md"
1010
requires-python = ">=3.9"

typescript/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@parallelworks/client",
3-
"version": "7.15.0",
3+
"version": "7.15.3",
44
"description": "Official TypeScript client for Parallel Works ACTIVATE API",
55
"type": "module",
66
"exports": {

0 commit comments

Comments
 (0)