From df674cb5233575b5914cc19647c93da2927690ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20Mili=C4=87?= Date: Mon, 31 Mar 2025 13:17:37 +0200 Subject: [PATCH] docfix/Tweak comments and props explanation --- .../main/resources/props/sample.props.template | 2 +- .../berlin/group/v1_3/BgSpecValidation.scala | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/obp-api/src/main/resources/props/sample.props.template b/obp-api/src/main/resources/props/sample.props.template index 191d70757..7e3af1fff 100644 --- a/obp-api/src/main/resources/props/sample.props.template +++ b/obp-api/src/main/resources/props/sample.props.template @@ -165,7 +165,7 @@ jwt.use.ssl=false # Bypass TPP signature validation # bypass_tpp_signature_validation = false -## Reject Berlin Group Consents in status "received" after defined time +## Reject Berlin Group Consents in status "received" after defined time in minutes # berlin_group_outdated_consents_interval = 5 diff --git a/obp-api/src/main/scala/code/api/berlin/group/v1_3/BgSpecValidation.scala b/obp-api/src/main/scala/code/api/berlin/group/v1_3/BgSpecValidation.scala index 056fe73bc..363cbce1c 100644 --- a/obp-api/src/main/scala/code/api/berlin/group/v1_3/BgSpecValidation.scala +++ b/obp-api/src/main/scala/code/api/berlin/group/v1_3/BgSpecValidation.scala @@ -48,19 +48,19 @@ object BgSpecValidation { // Example usage def main(args: Array[String]): Unit = { val testDates = Seq( - "2025-05-10", // ❌ More than 180 days ahead - "9999-12-31", // ❌ Exceeds max allowed - "2015-01-01", // ❌ In the past - "invalid-date", // ❌ Invalid format - LocalDate.now().plusDays(90).toString, // ✅ Valid (within 180 days) - LocalDate.now().plusDays(180).toString, // ✅ Valid (exactly 180 days) - LocalDate.now().plusDays(181).toString // ❌ More than 180 days + "2025-05-10", // More than 180 days ahead + "9999-12-31", // Exceeds max allowed + "2015-01-01", // In the past + "invalid-date", // Invalid format + LocalDate.now().plusDays(90).toString, // Valid (within 180 days) + LocalDate.now().plusDays(180).toString, // Valid (exactly 180 days) + LocalDate.now().plusDays(181).toString // More than 180 days ) testDates.foreach { date => validateValidUntil(date) match { - case Right(validDate) => println(s"✅ Valid date: $validDate") - case Left(error) => println(s"❌ Error: $error") + case Right(validDate) => println(s"Valid date: $validDate") + case Left(error) => println(s"Error: $error") } } }