-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathcodegen.sh
More file actions
38 lines (33 loc) · 846 Bytes
/
codegen.sh
File metadata and controls
38 lines (33 loc) · 846 Bytes
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
#!/usr/bin/env bash
set -v
OPENAPI_PATH=ga4ghtest/openapi/openapi.yaml
PACKAGE_NAME="ga4ghtest"
PACKAGE_VERSION="0.3.0"
PACKAGE_FOLDER="."
cat << EOF > .openapi-generator-config
{
"packageName": "$PACKAGE_NAME",
"packageVersion": "$PACKAGE_VERSION"
}
EOF
# docker run --rm \
# -v ${PWD}:/local openapitools/openapi-generator-cli generate \
# -c /local/.openapi-generator-config \
# -t /local/.codegen/server \
# -Dmodels \
# -DmodelTests=false \
# -Dapis \
# -DapiTests=false \
# -i /local/synprov/openapi/openapi.yaml \
# -g python-flask \
# -o /local/
npx openapi-generator generate \
-c .openapi-generator-config \
-t .codegen/server \
-Dmodels \
-DmodelTests=false \
-Dapis \
-DapiTests=false \
-i ${OPENAPI_PATH} \
-g python-flask \
-o "${PACKAGE_FOLDER}"