summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBotond Hende <nettingman@gmail.com>2024-08-19 12:18:48 +0200
committerBotond Hende <nettingman@gmail.com>2024-08-19 12:18:48 +0200
commit8b94eeb4d00801b6017afa3a93d7351772c3baf6 (patch)
tree624ca69f58449f3afbc9c24c4f6640d8a5b28b30
parentbb50eaf85c39a50d907f39ea86fe3361d797d847 (diff)
spacetraders api generator
-rw-r--r--.gitignore2
-rwxr-xr-xget_api.sh11
2 files changed, 13 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index bde8ef6..a619feb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,3 @@
sta.token
+spacetraders-sdk/
+modules/spacetraders
diff --git a/get_api.sh b/get_api.sh
new file mode 100755
index 0000000..1d36812
--- /dev/null
+++ b/get_api.sh
@@ -0,0 +1,11 @@
+#!/bin/bash -eu
+
+wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.7.0/openapi-generator-cli-7.7.0.jar -O openapi-generator-cli.jar
+
+java -jar openapi-generator-cli.jar generate -g python -v -i "https://stoplight.io/api/v1/projects/spacetraders/spacetraders/nodes/reference/SpaceTraders.json?fromExportButton=true&snapshotType=http_service&deref=optimizedBundle" -o spacetraders-sdk
+
+mkdir -p modules
+
+ln -sf spacetraders-sdk/openapi_client modules/spacetraders
+
+rm openapi-generator-cli.jar