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/pollux/lib/sql-doobie/src/main/scala/io/iohk/atala/pollux/sql/model/db/VerificationPolicy.scala b/pollux/lib/sql-doobie/src/main/scala/io/iohk/atala/pollux/sql/model/db/VerificationPolicy.scala index b64bd515b1..fbc8120a2c 100644 --- a/pollux/lib/sql-doobie/src/main/scala/io/iohk/atala/pollux/sql/model/db/VerificationPolicy.scala +++ b/pollux/lib/sql-doobie/src/main/scala/io/iohk/atala/pollux/sql/model/db/VerificationPolicy.scala @@ -75,7 +75,9 @@ object VerificationPolicySql extends DoobieContext.Postgres(SnakeCase) { def getVerificationPolicyConstrains(fk_ids: Seq[UUID]) = run( quote( - query[VerificationPolicyConstraint].filter(vpc => liftQuery(fk_ids).contains(vpc.fk_id)) + query[VerificationPolicyConstraint] + .filter(vpc => liftQuery(fk_ids).contains(vpc.fk_id)) + .sortBy(_.index)(Ord.asc) ) ) diff --git a/pollux/lib/sql-doobie/src/test/scala/io/iohk/atala/pollux/sql/VerificationPolicySqlIntegrationSpec.scala b/pollux/lib/sql-doobie/src/test/scala/io/iohk/atala/pollux/sql/VerificationPolicySqlIntegrationSpec.scala index fb75706797..665815dc2e 100644 --- a/pollux/lib/sql-doobie/src/test/scala/io/iohk/atala/pollux/sql/VerificationPolicySqlIntegrationSpec.scala +++ b/pollux/lib/sql-doobie/src/test/scala/io/iohk/atala/pollux/sql/VerificationPolicySqlIntegrationSpec.scala @@ -286,7 +286,7 @@ object VerificationPolicySqlIntegrationSpec extends ZIOSpecDefault, PostgresTest name <- name description <- description constraints <- Gen - .setOfBounded(min = 1, max = 10)(verificationPolicyConstraint) + .setOfBounded(min = 2, max = 10)(verificationPolicyConstraint) .map(_.toVector) } yield VerificationPolicy.make( name = name, 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 \