File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 2
2
curl -o ./api-extended-json.json https://api.vapi.ai/api-extended-json
3
3
4
4
# 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
6
13
7
14
# Step 3: Generate TypeScript API using the edited JSON file
8
15
npx 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