Skip to content

Commit

Permalink
feat: allow multi-platform (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
promiseofcake authored Aug 7, 2024
1 parent d4efe12 commit 09b9cd3
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 49 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ all: install-tools fetch-spec process-spec generate-client test

process-spec:
openapi-down-convert --input spec/openapi.json --output spec/openapi-3.0.json
sed -i 's/"type": "null"/"nullable": true/g' spec/openapi-3.0.json
./scripts/format-spec.sh spec/openapi-3.0.json

generate-client:
go generate ./...
Expand Down
9 changes: 9 additions & 0 deletions scripts/format-spec.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env bash

dist=`uname -a`

if [[ $dist == *"Darwin"* ]]; then
sed -i '' 's/"type": "null"/"nullable": true/g' $@
else
sed -i 's/"type": "null"/"nullable": true/g' $@
fi
Loading

0 comments on commit 09b9cd3

Please sign in to comment.