From 170cd639a7ed591184fde23968b2d24dac630e45 Mon Sep 17 00:00:00 2001 From: Average Dude Date: Tue, 18 Feb 2020 14:49:11 +0100 Subject: 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. --- scripts/openapi-clients.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'scripts') 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 ( echo "Generating client API libs for $lang" + lang_dir="support/openapi/${lang}" + out_dir_prefix="dist/api/${API_PATH_PREFIX}" out_dir="${out_dir_prefix}/${lang}" git_repo_id="${API_PATH_PREFIX}${lang}" @@ -59,7 +61,8 @@ for lang in ${API_LANGS//:/ } ; do npx openapi-generator generate \ -i support/doc/api/openapi.yaml \ - -c "support/openapi/${lang}.yaml" \ + -c "${lang_dir}/def.yaml" \ + -t "${lang_dir}" \ -g "$lang" \ --git-host "${API_REPO_HOST}" \ --git-user-id "${API_URL_USERNAME}" \ -- cgit v1.2.3