Skip to content

Commit 5f13447

Browse files
esteiningerclaude
andcommitted
fix: preserve synced openapi.json in generate.sh
The generate script was downloading openapi.json from production, overwriting the file synced from the server repo. Now it only downloads if the file doesn't exist (for manual generation). Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 6c182fe commit 5f13447

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

generate.sh

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,14 @@ if ! command -v openapi-generator-cli &> /dev/null; then
1212
npm install -g @openapitools/openapi-generator-cli
1313
fi
1414

15-
# Download the latest OpenAPI spec
16-
echo "📥 Downloading OpenAPI specification..."
17-
curl -s https://server-xb24.onrender.com/docs/openapi.json -o openapi.json
15+
# Use existing openapi.json (synced from server repo)
16+
# Or download if it doesn't exist (for manual generation)
17+
if [ ! -f "openapi.json" ]; then
18+
echo "📥 Downloading OpenAPI specification from production..."
19+
curl -s https://server-xb24.onrender.com/docs/openapi.json -o openapi.json
20+
else
21+
echo "✅ Using existing openapi.json file"
22+
fi
1823

1924
# Clean the OpenAPI spec (remove anyOf with null types and simplify operation IDs)
2025
echo "🧼 Cleaning OpenAPI specification..."

0 commit comments

Comments
 (0)