Skip to content

Commit d9c84fe

Browse files
committed
πŸ›  fix: Update dev client create script
1 parent 1ceae3e commit d9c84fe

3 files changed

Lines changed: 6 additions & 45 deletions

File tree

β€Ž.vscode/tasks.jsonβ€Ž

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,15 +92,12 @@
9292
}
9393
},
9494
{
95-
"label": "πŸ€– Create client",
95+
"label": "πŸ€– Build client",
9696
"type": "shell",
9797
"command": "bash",
9898
"args": [
99-
"scripts/built_client.sh",
99+
"scripts/build_client.sh",
100100
],
101-
"options": {
102-
"cwd": "${workspaceFolder}/backend"
103-
},
104101
"problemMatcher": [],
105102
"group": {
106103
"kind": "build",

β€Žbackend/scripts/convert_openapi.pyβ€Ž

Lines changed: 0 additions & 33 deletions
This file was deleted.
Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
11
#!/usr/bin/env bash
22
set -euo pipefail
3-
# Usage: scripts/built_client.sh
3+
# Usage: scripts/build_client.sh
44

5+
# Remove a tmp file and remove on exit
56
TMP_FILE="$(mktemp)"
6-
7-
# Download openapi.json
8-
wget 'http://localhost:8000/openapi.json' -O "${TMP_FILE}"
9-
10-
# Remove tmp file on exit
117
trap 'rm -f "${TMP_FILE}"' EXIT
128

139
# Convert openapi.json
14-
poetry run scripts/convert_openapi.py "${TMP_FILE}"
10+
cd "backend"
11+
POSTGRES_PASSWORD=dummy poetry run python -m kayman.openapi "${TMP_FILE}"
1512

1613
# Generate client
1714
cd "../frontend"

0 commit comments

Comments
Β (0)