Skip to content

Commit

Permalink
annotate required flags in docs (#198)
Browse files Browse the repository at this point in the history
  • Loading branch information
lovromazgon authored Oct 1, 2021
1 parent f046a99 commit 40d95a7
Show file tree
Hide file tree
Showing 134 changed files with 205 additions and 201 deletions.
4 changes: 4 additions & 0 deletions cmd/meroxa/builder/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,10 @@ func buildCommandWithFlags(cmd *cobra.Command, c Command) {
flags = cmd.Flags()
}

if f.Required {
f.Usage += " (required)"
}

switch val := f.Ptr.(type) {
case *string:
if f.Default == nil {
Expand Down
2 changes: 1 addition & 1 deletion cmd/meroxa/global/global.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func RegisterGlobalFlags(cmd *cobra.Command) {
cmd.PersistentFlags().StringVar(&flagCLIConfigFile, "cli-config-file", "", "meroxa configuration file")
cmd.PersistentFlags().StringVar(&flagAPIURL, "api-url", "", "API url")
cmd.PersistentFlags().BoolVar(&flagDebug, "debug", false, "display any debugging information")
cmd.PersistentFlags().DurationVar(&flagTimeout, "timeout", time.Second*10, "set the duration of the client timeout in seconds (default 10s)") // nolint:gomnd,lll
cmd.PersistentFlags().DurationVar(&flagTimeout, "timeout", time.Second*10, "set the duration of the client timeout in seconds") // nolint:gomnd,lll

if err := cmd.PersistentFlags().MarkHidden("api-url"); err != nil {
panic(fmt.Sprintf("could not mark flag as hidden: %v", err))
Expand Down
2 changes: 1 addition & 1 deletion docs/cmd/md/meroxa.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ meroxa resources list --types
--debug display any debugging information
-h, --help help for meroxa
--json output json
--timeout duration set the duration of the client timeout in seconds (default 10s) (default 10s)
--timeout duration set the duration of the client timeout in seconds (default 10s)
```

### SEE ALSO
Expand Down
2 changes: 1 addition & 1 deletion docs/cmd/md/meroxa_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ meroxa api POST /v1/endpoints '{"protocol": "HTTP", "stream": "resource-2-499379
--cli-config-file string meroxa configuration file
--debug display any debugging information
--json output json
--timeout duration set the duration of the client timeout in seconds (default 10s) (default 10s)
--timeout duration set the duration of the client timeout in seconds (default 10s)
```

### SEE ALSO
Expand Down
2 changes: 1 addition & 1 deletion docs/cmd/md/meroxa_auth.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Authentication commands for Meroxa
--cli-config-file string meroxa configuration file
--debug display any debugging information
--json output json
--timeout duration set the duration of the client timeout in seconds (default 10s) (default 10s)
--timeout duration set the duration of the client timeout in seconds (default 10s)
```

### SEE ALSO
Expand Down
2 changes: 1 addition & 1 deletion docs/cmd/md/meroxa_auth_login.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ meroxa auth login [flags]
--cli-config-file string meroxa configuration file
--debug display any debugging information
--json output json
--timeout duration set the duration of the client timeout in seconds (default 10s) (default 10s)
--timeout duration set the duration of the client timeout in seconds (default 10s)
```

### SEE ALSO
Expand Down
2 changes: 1 addition & 1 deletion docs/cmd/md/meroxa_auth_logout.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ meroxa auth logout [flags]
--cli-config-file string meroxa configuration file
--debug display any debugging information
--json output json
--timeout duration set the duration of the client timeout in seconds (default 10s) (default 10s)
--timeout duration set the duration of the client timeout in seconds (default 10s)
```

### SEE ALSO
Expand Down
2 changes: 1 addition & 1 deletion docs/cmd/md/meroxa_auth_whoami.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ meroxa whoami
--cli-config-file string meroxa configuration file
--debug display any debugging information
--json output json
--timeout duration set the duration of the client timeout in seconds (default 10s) (default 10s)
--timeout duration set the duration of the client timeout in seconds (default 10s)
```

### SEE ALSO
Expand Down
2 changes: 1 addition & 1 deletion docs/cmd/md/meroxa_billing.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ meroxa billing [flags]
--cli-config-file string meroxa configuration file
--debug display any debugging information
--json output json
--timeout duration set the duration of the client timeout in seconds (default 10s) (default 10s)
--timeout duration set the duration of the client timeout in seconds (default 10s)
```

### SEE ALSO
Expand Down
2 changes: 1 addition & 1 deletion docs/cmd/md/meroxa_completion.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ meroxa completion [bash|zsh|fish|powershell]
--cli-config-file string meroxa configuration file
--debug display any debugging information
--json output json
--timeout duration set the duration of the client timeout in seconds (default 10s) (default 10s)
--timeout duration set the duration of the client timeout in seconds (default 10s)
```

### SEE ALSO
Expand Down
2 changes: 1 addition & 1 deletion docs/cmd/md/meroxa_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ meroxa config [flags]
--cli-config-file string meroxa configuration file
--debug display any debugging information
--json output json
--timeout duration set the duration of the client timeout in seconds (default 10s) (default 10s)
--timeout duration set the duration of the client timeout in seconds (default 10s)
```

### SEE ALSO
Expand Down
2 changes: 1 addition & 1 deletion docs/cmd/md/meroxa_config_describe.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ refresh_token: c337a0d...c0f928b
--cli-config-file string meroxa configuration file
--debug display any debugging information
--json output json
--timeout duration set the duration of the client timeout in seconds (default 10s) (default 10s)
--timeout duration set the duration of the client timeout in seconds (default 10s)
```

### SEE ALSO
Expand Down
8 changes: 4 additions & 4 deletions docs/cmd/md/meroxa_connect.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ meroxa connect --from RESOURCE-NAME --to RESOURCE-NAME [flags]

```
-c, --config string connector configuration
--from string source resource name
--from string source resource name (required)
-h, --help help for connect
--input string command delimited list of input streams
--pipeline string pipeline name to attach connectors to
--to string destination resource name
--pipeline string pipeline name to attach connectors to (required)
--to string destination resource name (required)
```

### Options inherited from parent commands
Expand All @@ -39,7 +39,7 @@ meroxa connect --from RESOURCE-NAME --to RESOURCE-NAME [flags]
--cli-config-file string meroxa configuration file
--debug display any debugging information
--json output json
--timeout duration set the duration of the client timeout in seconds (default 10s) (default 10s)
--timeout duration set the duration of the client timeout in seconds (default 10s)
```

### SEE ALSO
Expand Down
2 changes: 1 addition & 1 deletion docs/cmd/md/meroxa_connectors.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Manage connectors on Meroxa
--cli-config-file string meroxa configuration file
--debug display any debugging information
--json output json
--timeout duration set the duration of the client timeout in seconds (default 10s) (default 10s)
--timeout duration set the duration of the client timeout in seconds (default 10s)
```

### SEE ALSO
Expand Down
4 changes: 2 additions & 2 deletions docs/cmd/md/meroxa_connectors_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ meroxa connectors create [NAME] --to pg2redshift --input orders --pipeline my-pi
--from string resource name to use as source
-h, --help help for create
--input string command delimited list of input streams
--pipeline string pipeline name to attach connector to
--pipeline string pipeline name to attach connector to (required)
--to string resource name to use as destination
```

Expand All @@ -37,7 +37,7 @@ meroxa connectors create [NAME] --to pg2redshift --input orders --pipeline my-pi
--cli-config-file string meroxa configuration file
--debug display any debugging information
--json output json
--timeout duration set the duration of the client timeout in seconds (default 10s) (default 10s)
--timeout duration set the duration of the client timeout in seconds (default 10s)
```

### SEE ALSO
Expand Down
2 changes: 1 addition & 1 deletion docs/cmd/md/meroxa_connectors_describe.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ meroxa connectors describe [NAME] [flags]
--cli-config-file string meroxa configuration file
--debug display any debugging information
--json output json
--timeout duration set the duration of the client timeout in seconds (default 10s) (default 10s)
--timeout duration set the duration of the client timeout in seconds (default 10s)
```

### SEE ALSO
Expand Down
2 changes: 1 addition & 1 deletion docs/cmd/md/meroxa_connectors_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ meroxa connectors list [flags]
--cli-config-file string meroxa configuration file
--debug display any debugging information
--json output json
--timeout duration set the duration of the client timeout in seconds (default 10s) (default 10s)
--timeout duration set the duration of the client timeout in seconds (default 10s)
```

### SEE ALSO
Expand Down
2 changes: 1 addition & 1 deletion docs/cmd/md/meroxa_connectors_logs.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ meroxa connectors logs NAME [flags]
--cli-config-file string meroxa configuration file
--debug display any debugging information
--json output json
--timeout duration set the duration of the client timeout in seconds (default 10s) (default 10s)
--timeout duration set the duration of the client timeout in seconds (default 10s)
```

### SEE ALSO
Expand Down
2 changes: 1 addition & 1 deletion docs/cmd/md/meroxa_connectors_remove.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ meroxa connectors remove NAME [flags]
--cli-config-file string meroxa configuration file
--debug display any debugging information
--json output json
--timeout duration set the duration of the client timeout in seconds (default 10s) (default 10s)
--timeout duration set the duration of the client timeout in seconds (default 10s)
```

### SEE ALSO
Expand Down
2 changes: 1 addition & 1 deletion docs/cmd/md/meroxa_connectors_update.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ meroxa connector update connector-name --config '{"table.name.format":"public.co
--cli-config-file string meroxa configuration file
--debug display any debugging information
--json output json
--timeout duration set the duration of the client timeout in seconds (default 10s) (default 10s)
--timeout duration set the duration of the client timeout in seconds (default 10s)
```

### SEE ALSO
Expand Down
2 changes: 1 addition & 1 deletion docs/cmd/md/meroxa_endpoints.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Manage endpoints on Meroxa
--cli-config-file string meroxa configuration file
--debug display any debugging information
--json output json
--timeout duration set the duration of the client timeout in seconds (default 10s) (default 10s)
--timeout duration set the duration of the client timeout in seconds (default 10s)
```

### SEE ALSO
Expand Down
6 changes: 3 additions & 3 deletions docs/cmd/md/meroxa_endpoints_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ meroxa endpoints create my-endpoint --protocol http --stream my-stream

```
-h, --help help for create
-p, --protocol string protocol, value can be http or grpc
-s, --stream string stream name
-p, --protocol string protocol, value can be http or grpc (required)
-s, --stream string stream name (required)
```

### Options inherited from parent commands
Expand All @@ -30,7 +30,7 @@ meroxa endpoints create my-endpoint --protocol http --stream my-stream
--cli-config-file string meroxa configuration file
--debug display any debugging information
--json output json
--timeout duration set the duration of the client timeout in seconds (default 10s) (default 10s)
--timeout duration set the duration of the client timeout in seconds (default 10s)
```

### SEE ALSO
Expand Down
2 changes: 1 addition & 1 deletion docs/cmd/md/meroxa_endpoints_describe.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ meroxa endpoints describe [NAME] [flags]
--cli-config-file string meroxa configuration file
--debug display any debugging information
--json output json
--timeout duration set the duration of the client timeout in seconds (default 10s) (default 10s)
--timeout duration set the duration of the client timeout in seconds (default 10s)
```

### SEE ALSO
Expand Down
2 changes: 1 addition & 1 deletion docs/cmd/md/meroxa_endpoints_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ meroxa endpoints list [flags]
--cli-config-file string meroxa configuration file
--debug display any debugging information
--json output json
--timeout duration set the duration of the client timeout in seconds (default 10s) (default 10s)
--timeout duration set the duration of the client timeout in seconds (default 10s)
```

### SEE ALSO
Expand Down
2 changes: 1 addition & 1 deletion docs/cmd/md/meroxa_endpoints_remove.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ meroxa endpoints remove NAME [flags]
--cli-config-file string meroxa configuration file
--debug display any debugging information
--json output json
--timeout duration set the duration of the client timeout in seconds (default 10s) (default 10s)
--timeout duration set the duration of the client timeout in seconds (default 10s)
```

### SEE ALSO
Expand Down
2 changes: 1 addition & 1 deletion docs/cmd/md/meroxa_login.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ meroxa login [flags]
--cli-config-file string meroxa configuration file
--debug display any debugging information
--json output json
--timeout duration set the duration of the client timeout in seconds (default 10s) (default 10s)
--timeout duration set the duration of the client timeout in seconds (default 10s)
```

### SEE ALSO
Expand Down
2 changes: 1 addition & 1 deletion docs/cmd/md/meroxa_logout.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ meroxa logout [flags]
--cli-config-file string meroxa configuration file
--debug display any debugging information
--json output json
--timeout duration set the duration of the client timeout in seconds (default 10s) (default 10s)
--timeout duration set the duration of the client timeout in seconds (default 10s)
```

### SEE ALSO
Expand Down
2 changes: 1 addition & 1 deletion docs/cmd/md/meroxa_open.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Open in a web browser
--cli-config-file string meroxa configuration file
--debug display any debugging information
--json output json
--timeout duration set the duration of the client timeout in seconds (default 10s) (default 10s)
--timeout duration set the duration of the client timeout in seconds (default 10s)
```

### SEE ALSO
Expand Down
2 changes: 1 addition & 1 deletion docs/cmd/md/meroxa_open_billing.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ meroxa open billing [flags]
--cli-config-file string meroxa configuration file
--debug display any debugging information
--json output json
--timeout duration set the duration of the client timeout in seconds (default 10s) (default 10s)
--timeout duration set the duration of the client timeout in seconds (default 10s)
```

### SEE ALSO
Expand Down
2 changes: 1 addition & 1 deletion docs/cmd/md/meroxa_pipelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Manage pipelines on Meroxa
--cli-config-file string meroxa configuration file
--debug display any debugging information
--json output json
--timeout duration set the duration of the client timeout in seconds (default 10s) (default 10s)
--timeout duration set the duration of the client timeout in seconds (default 10s)
```

### SEE ALSO
Expand Down
2 changes: 1 addition & 1 deletion docs/cmd/md/meroxa_pipelines_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ meroxa pipelines create NAME [flags]
--cli-config-file string meroxa configuration file
--debug display any debugging information
--json output json
--timeout duration set the duration of the client timeout in seconds (default 10s) (default 10s)
--timeout duration set the duration of the client timeout in seconds (default 10s)
```

### SEE ALSO
Expand Down
2 changes: 1 addition & 1 deletion docs/cmd/md/meroxa_pipelines_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ meroxa pipelines list [flags]
--cli-config-file string meroxa configuration file
--debug display any debugging information
--json output json
--timeout duration set the duration of the client timeout in seconds (default 10s) (default 10s)
--timeout duration set the duration of the client timeout in seconds (default 10s)
```

### SEE ALSO
Expand Down
2 changes: 1 addition & 1 deletion docs/cmd/md/meroxa_pipelines_remove.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ meroxa pipelines remove NAME [flags]
--cli-config-file string meroxa configuration file
--debug display any debugging information
--json output json
--timeout duration set the duration of the client timeout in seconds (default 10s) (default 10s)
--timeout duration set the duration of the client timeout in seconds (default 10s)
```

### SEE ALSO
Expand Down
2 changes: 1 addition & 1 deletion docs/cmd/md/meroxa_pipelines_update.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ meroxa pipeline update pipeline-name --metadata '{"key":"value"}'
--cli-config-file string meroxa configuration file
--debug display any debugging information
--json output json
--timeout duration set the duration of the client timeout in seconds (default 10s) (default 10s)
--timeout duration set the duration of the client timeout in seconds (default 10s)
```

### SEE ALSO
Expand Down
2 changes: 1 addition & 1 deletion docs/cmd/md/meroxa_resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Manage resources on Meroxa
--cli-config-file string meroxa configuration file
--debug display any debugging information
--json output json
--timeout duration set the duration of the client timeout in seconds (default 10s) (default 10s)
--timeout duration set the duration of the client timeout in seconds (default 10s)
```

### SEE ALSO
Expand Down
6 changes: 3 additions & 3 deletions docs/cmd/md/meroxa_resources_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ meroxa resources create slack --type url -u $WEBHOOK_URL
--ssh-private-key string SSH tunneling private key
--ssh-url string SSH tunneling address
--ssl use SSL
--type string resource type
-u, --url string resource url
--type string resource type (required)
-u, --url string resource url (required)
--username string username
```

Expand All @@ -44,7 +44,7 @@ meroxa resources create slack --type url -u $WEBHOOK_URL
--cli-config-file string meroxa configuration file
--debug display any debugging information
--json output json
--timeout duration set the duration of the client timeout in seconds (default 10s) (default 10s)
--timeout duration set the duration of the client timeout in seconds (default 10s)
```

### SEE ALSO
Expand Down
2 changes: 1 addition & 1 deletion docs/cmd/md/meroxa_resources_describe.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ meroxa resources describe [NAME] [flags]
--cli-config-file string meroxa configuration file
--debug display any debugging information
--json output json
--timeout duration set the duration of the client timeout in seconds (default 10s) (default 10s)
--timeout duration set the duration of the client timeout in seconds (default 10s)
```

### SEE ALSO
Expand Down
2 changes: 1 addition & 1 deletion docs/cmd/md/meroxa_resources_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ meroxa resources list [flags]
--cli-config-file string meroxa configuration file
--debug display any debugging information
--json output json
--timeout duration set the duration of the client timeout in seconds (default 10s) (default 10s)
--timeout duration set the duration of the client timeout in seconds (default 10s)
```

### SEE ALSO
Expand Down
2 changes: 1 addition & 1 deletion docs/cmd/md/meroxa_resources_remove.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ meroxa resources remove NAME [flags]
--cli-config-file string meroxa configuration file
--debug display any debugging information
--json output json
--timeout duration set the duration of the client timeout in seconds (default 10s) (default 10s)
--timeout duration set the duration of the client timeout in seconds (default 10s)
```

### SEE ALSO
Expand Down
Loading

0 comments on commit 40d95a7

Please sign in to comment.