-
Notifications
You must be signed in to change notification settings - Fork 0
/
generate.sh
executable file
·45 lines (36 loc) · 1.95 KB
/
generate.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/usr/bin/env bash
generate=$1
if [ -z ${generate} ] || [ ${generate} == "python-neurostore" ] || [ ${generate} == "neurostore-python-sdk" ]; then
echo "generating python-neurostore-sdk..."
docker run --rm --user $(id -u):$(id -g) \
-v $PWD:/local openapitools/openapi-generator-cli:v6.6.0 generate \
-i /local/neurostore-spec/neurostore-openapi.yml \
-g python-nextgen \
-c /local/neurostore_python_nextgen_sdk_config.json \
-o /local/python/neurostore-python-sdk
fi
if [ -z ${generate} ] || [ ${generate} == "typescript-neurostore" ] || [ ${generate} == "neurostore-typescript-sdk" ]; then
echo "generating typescript-neurostore-sdk..."
docker run --rm --user $(id -u):$(id -g) \
-v $PWD:/local openapitools/openapi-generator-cli:v6.6.0 generate \
-i /local/neurostore-spec/neurostore-openapi.yml \
-g typescript-axios \
-o /local/typescript/neurostore-typescript-sdk
fi
if [ -z ${generate} ] || [ ${generate} == "python-neurosynth-compose" ] || [ ${generate} == "neurosynth-compose-python-sdk" ]; then
echo "generating python-neurosynth-compose-sdk..."
docker run --rm --user $(id -u):$(id -g) \
-v $PWD:/local openapitools/openapi-generator-cli:v6.6.0 generate \
-i /local/neurostore-spec/neurosynth-compose-openapi.yml \
-g python-nextgen \
-c /local/neurosynth_compose_python_nextgen_sdk_config.json \
-o /local/python/neurosynth-compose-python-sdk
fi
if [ -z ${generate} ] || [ ${generate} == "typescript-neurosynth-compose" ] || [ ${generate} == "neurosynth-compose-typescript-sdk" ]; then
echo "generating typescript-neurosynth-compose-sdk..."
docker run --rm --user $(id -u):$(id -g) \
-v $PWD:/local openapitools/openapi-generator-cli:v6.6.0 generate \
-i /local/neurostore-spec/neurosynth-compose-openapi.yml \
-g typescript-axios \
-o /local/typescript/neurosynth-compose-typescript-sdk
fi