From a795b511dd9d53448e31dde13c4da13b2eb9ae77 Mon Sep 17 00:00:00 2001 From: hongwei Date: Thu, 19 Oct 2023 13:37:47 +0200 Subject: [PATCH] refactor/added the checkShortString to createBank endpoint-fixed test --- .../code/api/ResourceDocs1_4_0/SwaggerDefinitionsJSON.scala | 2 +- obp-api/src/test/scala/code/api/v5_0_0/BankTests.scala | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/obp-api/src/main/scala/code/api/ResourceDocs1_4_0/SwaggerDefinitionsJSON.scala b/obp-api/src/main/scala/code/api/ResourceDocs1_4_0/SwaggerDefinitionsJSON.scala index 5436175d1d..971fed226d 100644 --- a/obp-api/src/main/scala/code/api/ResourceDocs1_4_0/SwaggerDefinitionsJSON.scala +++ b/obp-api/src/main/scala/code/api/ResourceDocs1_4_0/SwaggerDefinitionsJSON.scala @@ -1020,7 +1020,7 @@ object SwaggerDefinitionsJSON { ) val postBankJson500 = PostBankJson500( - id = Some(idExample.value), + id = Some(bankIdExample.value), bank_code = bankCodeExample.value, full_name = Some(fullNameExample.value), logo = Some(logoExample.value), diff --git a/obp-api/src/test/scala/code/api/v5_0_0/BankTests.scala b/obp-api/src/test/scala/code/api/v5_0_0/BankTests.scala index bce093f041..5a2d860e24 100644 --- a/obp-api/src/test/scala/code/api/v5_0_0/BankTests.scala +++ b/obp-api/src/test/scala/code/api/v5_0_0/BankTests.scala @@ -69,7 +69,7 @@ class BankTests extends V500ServerSetupAsync with DefaultUsers { And("We make the request") val firstFullName = "A new full name" val secondFullName = "A second new full name" - val postBank = postBankJson500.copy(id = Some(APIUtil.generateUUID())) + val postBank = postBankJson500.copy(id = Some(APIUtil.generateUUID().substring(25))) val bankId = postBank.id.getOrElse("some_bank_id") val request = (v5_0_0_Request / "banks").POST <@ (user1) val requestPut = (v5_0_0_Request / "banks").PUT <@ (user1)