File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22curl -o ./api-extended-json.json https://api.vapi.ai/api-extended-json
33
44# Step 2: Find and replace transcript[transcriptType=\"final\"] with transcript[transcriptType='final']
5- sed -i ' ' ' s/transcript\[transcriptType=\\"final\\"\]/transcript[transcriptType=' \' ' final' \' ' ]/g' ./api-extended-json.json
5+ # Use different sed syntax for Linux vs macOS compatibility
6+ if [[ " $OSTYPE " == " darwin" * ]]; then
7+ # macOS
8+ sed -i ' ' ' s/transcript\[transcriptType=\\"final\\"\]/transcript[transcriptType=' \' ' final' \' ' ]/g' ./api-extended-json.json
9+ else
10+ # Linux (GitHub Actions)
11+ sed -i ' s/transcript\[transcriptType=\\"final\\"\]/transcript[transcriptType=' \' ' final' \' ' ]/g' ./api-extended-json.json
12+ fi
613
714# Step 3: Generate TypeScript API using the edited JSON file
815npx swagger-typescript-api generate -p ./api-extended-json.json -o . -n api.ts
You can’t perform that action at this time.
0 commit comments