blob: c5de5963dcf3bb6483734dbd4bee26a8007da2a7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#!/bin/bash -eu
SCRIPT_ROOT=$(pwd)
SDK_DIR_NAME=spacetraders-sdk
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 $SDK_DIR_NAME
rm openapi-generator-cli.jar
python3 -m venv venv
for dir in $SCRIPT_ROOT/venv/lib/*; do
if [ -d $dir ]; then
ln -sf ../../../../$SDK_DIR_NAME/openapi_client $dir/site-packages/openapi_client
fi
done
source venv/bin/activate
pip install -r requirements.txt
cd $SDK_DIR_NAME
pip install -r requirements.txt
|