aboutsummaryrefslogtreecommitdiffstats
path: root/golang/regen.sh
diff options
context:
space:
mode:
Diffstat (limited to 'golang/regen.sh')
-rwxr-xr-xgolang/regen.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/golang/regen.sh b/golang/regen.sh
new file mode 100755
index 00000000..366314a0
--- /dev/null
+++ b/golang/regen.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+set -xeo pipefail
+
+cat fatcat-openapi2.yml | python3 -c 'import sys, yaml, json; json.dump(yaml.load(sys.stdin), sys.stdout, indent=4)' > fatcat-openapi2.json
+swagger generate server -A fatcat -f ./fatcat-openapi2.json --exclude-main -t gen
+rm fatcat-openapi2.json