X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=scripts%2Fopenapi-clients.sh;h=b11d0001e2313cbb76a39e031a3e9a99f683bff7;hb=92a6e85fe7679b47bb61f7ff6bc757c7ee75a440;hp=b031ceac1194be5c7776818c0f3c4a029913c622;hpb=c2777c1dfe688c8fab1ef2fed50e360100fa9198;p=github%2FChocobozzz%2FPeerTube.git diff --git a/scripts/openapi-clients.sh b/scripts/openapi-clients.sh index b031ceac1..b11d0001e 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}" @@ -57,10 +59,12 @@ for lang in ${API_LANGS//:/ } ; do git clone "https://${host_path}" "$out_dir" fi - npx openapi-generator generate \ + npx @openapitools/openapi-generator-cli generate \ -i support/doc/api/openapi.yaml \ - -c "support/openapi/${lang}.yaml" \ + -c "${lang_dir}/def.yaml" \ + -t "${lang_dir}" \ -g "$lang" \ + --skip-validate-spec \ --git-host "${API_REPO_HOST}" \ --git-user-id "${API_URL_USERNAME}" \ --git-repo-id "${git_repo_id}" \