Skip to content

Commit

Permalink
inline help: scripts JSON API clarification (#9057)
Browse files Browse the repository at this point in the history
* inline help: scripts JSON API clarification

While writing a forum response and trying to use `daml script` against
the JSON API, I was a bit confused by the existing help texts.

CHANGELOG_BEGIN
CHANGELOG_END

* thanks, scalafmt, that's very useful feedback
  • Loading branch information
garyverhaegen-da committed Mar 9, 2021
1 parent 642385a commit 7859bc1
Showing 1 changed file with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,16 @@ object RunnerConfig {
opt[String]("ledger-host")
.optional()
.action((t, c) => c.copy(ledgerHost = Some(t)))
.text("Ledger hostname")
.text(
"Ledger hostname. If --json-api is specified, this is used to connect to the JSON API and must include the protocol, e.g. \"http://localhost\"."
)

opt[Int]("ledger-port")
.optional()
.action((t, c) => c.copy(ledgerPort = Some(t)))
.text("Ledger port")
.text(
"Ledger port. If --json-api is specified, this is the port used to connect to the JSON API."
)

opt[File]("participant-config")
.optional()
Expand Down Expand Up @@ -101,7 +105,7 @@ object RunnerConfig {
c.copy(accessTokenFile = Some(Paths.get(f)))
}
.text(
"File from which the access token will be read, required to interact with an authenticated ledger"
"File from which the access token will be read, required to interact with an authenticated ledger or the JSON API."
)

TlsConfigurationCli.parse(this, colSpacer = " ")((f, c) =>
Expand All @@ -112,7 +116,9 @@ object RunnerConfig {
.action { (_, c) =>
c.copy(jsonApi = true)
}
.text("Run DAML Script via the HTTP JSON API instead of via gRPC.")
.text(
"Run DAML Script via the HTTP JSON API instead of via gRPC; use --ledger-host and --ledger-port for JSON API host and port. The JSON API requires an access token."
)

opt[Int]("max-inbound-message-size")
.action((x, c) => c.copy(maxInboundMessageSize = x))
Expand Down

0 comments on commit 7859bc1

Please sign in to comment.