Skip to content

Commit e3aee94

Browse files
committed
Add help text to client CLI options
1 parent 7b0e2d5 commit e3aee94

File tree

3 files changed

+23
-1
lines changed

3 files changed

+23
-1
lines changed

Cargo.lock

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ async-graphql-axum = "7.0.16"
2020
axum = "0.8.4"
2121
axum-extra = { version = "0.10.1", features = ["typed-header"] }
2222
chrono = "0.4.41"
23-
clap = { version = "4.5.38", features = ["cargo", "derive", "env", "string"] }
23+
clap = { version = "4.5.38", features = ["cargo", "derive", "env", "string", "wrap_help"] }
2424
derive_more = { version = "2.0.1", features = ["error", "display", "from", "deref"] }
2525
futures = "0.3.31"
2626
opentelemetry = "0.29.1"

src/cli/client.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ use clap::{Parser, Subcommand};
22
use url::Url;
33

44
#[derive(Debug, Parser)]
5+
#[clap(max_term_width = 100)]
56
pub struct ClientOptions {
67
#[clap(flatten)]
78
pub connection: ConnectionOptions,
@@ -11,8 +12,18 @@ pub struct ClientOptions {
1112

1213
#[derive(Debug, Parser)]
1314
pub struct ConnectionOptions {
15+
/// The host address of the numtracker service
16+
///
17+
/// This should be the root of the service address including the scheme and
18+
/// port (if non-standard) but not including the graphql path,
19+
/// eg https://numtracker.example.com
1420
#[clap(long, short = 'H', env = "NUMTRACKER_SERVICE_HOST")]
1521
pub host: Option<Url>,
22+
/// The host address of the authorisation provider
23+
///
24+
/// This should be the domain that has the .well-known/openid-configuration
25+
/// endpoint including scheme and port (if non-standard).
26+
/// eg https://authn.example.com/realms/master
1627
#[clap(long, env = "NUMTRACKER_AUTH_HOST")]
1728
pub auth: Option<Url>,
1829
}

0 commit comments

Comments
 (0)