aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts/openapi-clients.sh
diff options
context:
space:
mode:
authorAverage Dude <loveisgrief@tuta.io>2020-02-18 14:49:11 +0100
committerRigel Kent <sendmemail@rigelk.eu>2020-02-18 14:49:11 +0100
commit170cd639a7ed591184fde23968b2d24dac630e45 (patch)
treea5221fd1a246122ff95182c9dc1d1fb115dfd483 /scripts/openapi-clients.sh
parent71e75ef27e8f993eaafc73896ac6f22fe91df64a (diff)
downloadPeerTube-170cd639a7ed591184fde23968b2d24dac630e45.tar.gz
PeerTube-170cd639a7ed591184fde23968b2d24dac630e45.tar.zst
PeerTube-170cd639a7ed591184fde23968b2d24dac630e45.zip
Create template dirs for openapi clients and provide README templates
The definitions are now also in the template dirs because they will be ignored by the generator. Generators only use overrides and don't do anything with new files.
Diffstat (limited to 'scripts/openapi-clients.sh')
-rwxr-xr-xscripts/openapi-clients.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/openapi-clients.sh b/scripts/openapi-clients.sh
index b031ceac1..c799658e3 100755
--- a/scripts/openapi-clients.sh
+++ b/scripts/openapi-clients.sh
@@ -46,6 +46,8 @@ for lang in ${API_LANGS//:/ } ; do
46( 46(
47 echo "Generating client API libs for $lang" 47 echo "Generating client API libs for $lang"
48 48
49 lang_dir="support/openapi/${lang}"
50
49 out_dir_prefix="dist/api/${API_PATH_PREFIX}" 51 out_dir_prefix="dist/api/${API_PATH_PREFIX}"
50 out_dir="${out_dir_prefix}/${lang}" 52 out_dir="${out_dir_prefix}/${lang}"
51 git_repo_id="${API_PATH_PREFIX}${lang}" 53 git_repo_id="${API_PATH_PREFIX}${lang}"
@@ -59,7 +61,8 @@ for lang in ${API_LANGS//:/ } ; do
59 61
60 npx openapi-generator generate \ 62 npx openapi-generator generate \
61 -i support/doc/api/openapi.yaml \ 63 -i support/doc/api/openapi.yaml \
62 -c "support/openapi/${lang}.yaml" \ 64 -c "${lang_dir}/def.yaml" \
65 -t "${lang_dir}" \
63 -g "$lang" \ 66 -g "$lang" \
64 --git-host "${API_REPO_HOST}" \ 67 --git-host "${API_REPO_HOST}" \
65 --git-user-id "${API_URL_USERNAME}" \ 68 --git-user-id "${API_URL_USERNAME}" \