From 149d53aeaeb5a74eec3efa3a896360454a1c8a0c Mon Sep 17 00:00:00 2001 From: Allain Magyar Date: Mon, 23 Oct 2023 20:05:40 -0300 Subject: [PATCH] ci: fix client generation Signed-off-by: Allain Magyar --- .github/workflows/release-clients.yml | 3 +++ prism-agent/client/generator/generate-clients.sh | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release-clients.yml b/.github/workflows/release-clients.yml index a1c49fd0b5..ea7a8a3f7f 100644 --- a/.github/workflows/release-clients.yml +++ b/.github/workflows/release-clients.yml @@ -41,6 +41,9 @@ jobs: username: ${{ secrets.ATALA_GITHUB_ACTOR }} password: ${{ secrets.ATALA_GITHUB_TOKEN }} + - name: Setup yq - portable yaml processor + uses: mikefarah/yq@v4.34.2 + - name: Install generator dependencies working-directory: prism-agent/client/generator run: yarn install diff --git a/prism-agent/client/generator/generate-clients.sh b/prism-agent/client/generator/generate-clients.sh index 3c0aea1c1d..8c4795f265 100755 --- a/prism-agent/client/generator/generate-clients.sh +++ b/prism-agent/client/generator/generate-clients.sh @@ -1,13 +1,16 @@ #!/bin/bash set -e +# open api cli generator is not compatible with 3.1.0 +yq e -i '.openapi = "3.0.3"' ../../service/api/http/prism-agent-openapi-spec.yaml + # generate kotlin models yarn openapi-generator-cli generate \ -g kotlin \ -i ../../service/api/http/prism-agent-openapi-spec.yaml \ -o ../kotlin \ --ignore-file-override ../kotlin/.openapi-generator-ignore \ - --additional-properties=packageName=io.iohk.atala.prism,serializationLibrary=gson + --additional-properties=packageName=io.iohk.atala.prism,serializationLibrary=gson,enumPropertyNaming=UPPERCASE # generate typescript models yarn openapi-generator-cli generate \