libeufin

Integration and sandbox testing for FinTech APIs and data formats
Log | Files | Refs | Submodules | README | LICENSE

commit 622897f109001969f94698063edfaf0dc6926cde
parent 268cee47f231f2b6e785a78aa0be908b28458e7b
Author: Antoine A <>
Date:   Wed, 30 Oct 2024 17:49:41 +0100

bank: cli improvement

Diffstat:
Mbank/src/main/kotlin/tech/libeufin/bank/cli/CreateAccount.kt | 3++-
Mbank/src/main/kotlin/tech/libeufin/bank/cli/CreateToken.kt | 6+++++-
2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/bank/src/main/kotlin/tech/libeufin/bank/cli/CreateAccount.kt b/bank/src/main/kotlin/tech/libeufin/bank/cli/CreateAccount.kt @@ -36,7 +36,8 @@ import tech.libeufin.common.* class CreateAccountOption: OptionGroup() { val username: String by option( - "--username", "-u", + "--username", "--user", "-u", + metavar = "<username>", help = "Account unique username" ).required() val password: String by option( diff --git a/bank/src/main/kotlin/tech/libeufin/bank/cli/CreateToken.kt b/bank/src/main/kotlin/tech/libeufin/bank/cli/CreateToken.kt @@ -34,7 +34,11 @@ import java.util.concurrent.TimeUnit class CreateToken : CliktCommand("create-token") { override fun help(context: Context) = "Create authentication token for a user" private val common by CommonOption() - private val username by option("--username", "--user", "-u", help = "Account username").required() + private val username by option( + "--username", "--user", "-u", + metavar = "<username>", + help = "Account username" + ).required() private val scope by option("--scope", "-s", help = "Scope for the token").enum<TokenScope>().required() private val duration by option("--duration", "-d", metavar = "<forever|micros>",help = "Custom token validity duration").convert { if (it == "forever") {