You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## What was changed
- Updated `commands.yml` to address feedback on
temporalio/documentation#3149 (comment)
- Intended for use with the following, but also is fine to merge
standalone
- #691
- #692
See this branch for [the combined
approach](https://github.com/prasek/temporal-cli/tree/cli-docs-gen-all)
with all PRs merged in.
## Why?
To create CLI docs for Nexus.
## Checklist
1. How was this tested:
- `go run ./temporalcli/internal/cmd/gen-docs `
- also tested with [the combined
appraoch](https://github.com/prasek/temporal-cli/tree/cli-docs-gen-all)
- copied generated docs (or subset) to temporalio/documentation
- `yarn start`
- verified via http://localhost:3000/
Ran `go test ./...`
Tested locally with:
```
go run ./cmd/temporal operator nexus endpoint create --name myendpoint --target-namespace my-target-namespace --target-task-queue my-handler-task-queue --description '## Sales Services
Workflow'\''s to support Customer-to-Order generation.
## other
stuff
'
```
2. Any docs updates needed?
- overall docs gen needs more alignment with the existing docs, but that
is out of scope for these Nexus changes
- will update temporalio/documentation#3149 with
cherry picked generated content from [the combined
approach](https://github.com/prasek/temporal-cli/tree/cli-docs-gen-all).
---------
Signed-off-by: Phil Prasek <prasek@gmail.com>
Signed-off-by: Josh Berry <josh.berry@temporal.io>
f.StringVar(&v.Description, "description", "", "Nexus Endpoint description. You may use Markdown formatting in the Nexus Endpoint description.")
263
+
f.StringVar(&v.DescriptionFile, "description-file", "", "Path to the Nexus Endpoint description file. The contents of the description file may use Markdown formatting.")
264
+
f.StringVar(&v.TargetNamespace, "target-namespace", "", "Namespace where a handler Worker polls for Nexus tasks.")
265
+
f.StringVar(&v.TargetTaskQueue, "target-task-queue", "", "Task Queue that a handler Worker polls for Nexus tasks.")
266
+
f.StringVar(&v.TargetUrl, "target-url", "", "An external Nexus Endpoint that receives forwarded Nexus requests. May be used as an alternative to `--target-namespace` and `--target-task-queue`.")
s.Command.PersistentFlags().Var(&s.LogLevel, "log-level", "Log level. Default is \"info\" for most commands and \"warn\" for `server start-dev`. Accepted values: debug, info, warn, error, never.")
s.Command.PersistentFlags().BoolVar(&s.NoJsonShorthandPayloads, "no-json-shorthand-payloads", false, "Raw payload output, even if they are JSON.")
312
+
s.Command.PersistentFlags().BoolVar(&s.NoJsonShorthandPayloads, "no-json-shorthand-payloads", false, "Raw payload output, even if the JSON option was used.")
288
313
s.CommandTimeout=0
289
314
s.Command.PersistentFlags().Var(&s.CommandTimeout, "command-timeout", "Timeout for the span of a command.")
s.Command.Short="Create a new Nexus Endpoint (EXPERIMENTAL)"
1125
+
s.Command.Short="Create a Nexus Endpoint (EXPERIMENTAL)"
1105
1126
ifhasHighlighting {
1106
-
s.Command.Long="Create a new Nexus Endpoint on the Server.\n\nAn endpoint name is used in workflow code to invoke Nexus operations. The\nendpoint target may either be a worker, in which case\x1b[1m--target-namespace\x1b[0m and\n\x1b[1m--target-task-queue\x1b[0m must both be provided, or an external URL, in which case\n\x1b[1m--target-url\x1b[0m must be provided.\n\nThis command will fail if an endpoint with the same name is already registered.\n\n\x1b[1mtemporal operator nexus endpoint create \\\n --name your-endpoint \\\n --target-namespace your-namespace \\\n --target-task-queue your-task-queue \\\n --description-file DESCRIPTION.md\x1b[0m"
1127
+
s.Command.Long="Create a Nexus Endpoint on the Server.\n\nA Nexus Endpoint name is used in Workflow code to invoke Nexus Operations.\nThe endpoint target may either be a Worker, in which case\n\x1b[1m--target-namespace\x1b[0m and\x1b[1m--target-task-queue\x1b[0m must both be provided, or\nan external URL, in which case\x1b[1m--target-url\x1b[0m must be provided.\n\nThis command will fail if an Endpoint with the same name is already\nregistered.\n\n\x1b[1mtemporal operator nexus endpoint create \\\n --name your-endpoint \\\n --target-namespace your-namespace \\\n --target-task-queue your-task-queue \\\n --description-file DESCRIPTION.md\x1b[0m"
1107
1128
} else {
1108
-
s.Command.Long="Create a new Nexus Endpoint on the Server.\n\nAn endpoint name is used in workflow code to invoke Nexus operations. The\nendpoint target may either be a worker, in which case`--target-namespace` and\n`--target-task-queue` must both be provided, or an external URL, in which case\n`--target-url` must be provided.\n\nThis command will fail if an endpoint with the same name is already registered.\n\n```\ntemporal operator nexus endpoint create \\\n --name your-endpoint \\\n --target-namespace your-namespace \\\n --target-task-queue your-task-queue \\\n --description-file DESCRIPTION.md\n```"
1129
+
s.Command.Long="Create a Nexus Endpoint on the Server.\n\nA Nexus Endpoint name is used in Workflow code to invoke Nexus Operations.\nThe endpoint target may either be a Worker, in which case\n`--target-namespace` and`--target-task-queue` must both be provided, or\nan external URL, in which case`--target-url` must be provided.\n\nThis command will fail if an Endpoint with the same name is already\nregistered.\n\n```\ntemporal operator nexus endpoint create \\\n --name your-endpoint \\\n --target-namespace your-namespace \\\n --target-task-queue your-task-queue \\\n --description-file DESCRIPTION.md\n```"
s.Command.Flags().StringVar(&s.Description, "description", "", "Endpoint description in markdown format (encoded using the configured codec server).")
1114
-
s.Command.Flags().StringVar(&s.DescriptionFile, "description-file", "", "Endpoint description file in markdown format (encoded using the configured codec server).")
1115
-
s.Command.Flags().StringVar(&s.TargetNamespace, "target-namespace", "", "Namespace in which a handler worker will be polling for Nexus tasks on.")
1116
-
s.Command.Flags().StringVar(&s.TargetTaskQueue, "target-task-queue", "", "Task Queue in which a handler worker will be polling for Nexus tasks on.")
1117
-
s.Command.Flags().StringVar(&s.TargetUrl, "target-url", "", "URL to direct Nexus requests to.")
s.Command.Short="Get a Nexus Endpoint by name (EXPERIMENTAL)"
1166
1181
ifhasHighlighting {
1167
-
s.Command.Long="Get a Nexus Endpoint configuration by name from the Server.\n\n\x1b[1mtemporal operator nexus endpoint get --name your-endpoint\x1b[0m"
1182
+
s.Command.Long="Get a Nexus Endpoint by name from the Server.\n\n\x1b[1mtemporal operator nexus endpoint get --name your-endpoint\x1b[0m"
1168
1183
} else {
1169
-
s.Command.Long="Get a Nexus Endpoint configuration by name from the Server.\n\n```\ntemporal operator nexus endpoint get --name your-endpoint\n```"
1184
+
s.Command.Long="Get a Nexus Endpoint by name from the Server.\n\n```\ntemporal operator nexus endpoint get --name your-endpoint\n```"
s.Command.Short="Update an existing Nexus Endpoint (EXPERIMENTAL)"
1225
1235
ifhasHighlighting {
1226
-
s.Command.Long="Update an existing Nexus Endpoint on the Server.\n\nAn endpoint name is used in workflow code to invoke Nexus operations. The\nendpoint target may either be a worker, in which case\x1b[1m--target-namespace\x1b[0m and\n\x1b[1m--target-task-queue\x1b[0m must both be provided, or an external URL, in which case\n\x1b[1m--target-url\x1b[0m must be provided.\n\nThe endpoint is patched; existing fields for which flags are not provided are\nleft as they were.\n\nUpdate only the target task queue:\n\n\x1b[1mtemporal operator nexus endpoint update \\\n --name your-endpoint \\\n --target-task-queue your-other-queue\x1b[0m\n\nUpdate only the description:\n\n\x1b[1mtemporal operator nexus endpoint update \\\n --name your-endpoint \\\n --description-file DESCRIPTION.md\x1b[0m"
1236
+
s.Command.Long="Update an existing Nexus Endpoint on the Server.\n\nA Nexus Endpoint name is used in Workflow code to invoke Nexus Operations.\nThe Endpoint target may either be a Worker, in which case\n\x1b[1m--target-namespace\x1b[0m and\x1b[1m--target-task-queue\x1b[0m must both be provided, or\nan external URL, in which case\x1b[1m--target-url\x1b[0m must be provided.\n\nThe Endpoint is patched; existing fields for which flags are not provided\nare left as they were.\n\nUpdate only the target task queue:\n\n\x1b[1mtemporal operator nexus endpoint update \\\n --name your-endpoint \\\n --target-task-queue your-other-queue\x1b[0m\n\nUpdate only the description:\n\n\x1b[1mtemporal operator nexus endpoint update \\\n --name your-endpoint \\\n --description-file DESCRIPTION.md\x1b[0m"
1227
1237
} else {
1228
-
s.Command.Long="Update an existing Nexus Endpoint on the Server.\n\nAn endpoint name is used in workflow code to invoke Nexus operations. The\nendpoint target may either be a worker, in which case`--target-namespace` and\n`--target-task-queue` must both be provided, or an external URL, in which case\n`--target-url` must be provided.\n\nThe endpoint is patched; existing fields for which flags are not provided are\nleft as they were.\n\nUpdate only the target task queue:\n\n```\ntemporal operator nexus endpoint update \\\n --name your-endpoint \\\n --target-task-queue your-other-queue\n```\n\nUpdate only the description:\n\n```\ntemporal operator nexus endpoint update \\\n --name your-endpoint \\\n --description-file DESCRIPTION.md\n```"
1238
+
s.Command.Long="Update an existing Nexus Endpoint on the Server.\n\nA Nexus Endpoint name is used in Workflow code to invoke Nexus Operations.\nThe Endpoint target may either be a Worker, in which case\n`--target-namespace` and`--target-task-queue` must both be provided, or\nan external URL, in which case`--target-url` must be provided.\n\nThe Endpoint is patched; existing fields for which flags are not provided\nare left as they were.\n\nUpdate only the target task queue:\n\n```\ntemporal operator nexus endpoint update \\\n --name your-endpoint \\\n --target-task-queue your-other-queue\n```\n\nUpdate only the description:\n\n```\ntemporal operator nexus endpoint update \\\n --name your-endpoint \\\n --description-file DESCRIPTION.md\n```"
s.Command.Flags().StringVar(&s.Description, "description", "", "Endpoint description in markdown format (encoded using the configured codec server).")
1234
-
s.Command.Flags().StringVar(&s.DescriptionFile, "description-file", "", "Endpoint description file in markdown format (encoded using the configured codec server).")
1235
1241
s.Command.Flags().BoolVar(&s.UnsetDescription, "unset-description", false, "Unset the description.")
1236
-
s.Command.Flags().StringVar(&s.TargetNamespace, "target-namespace", "", "Namespace in which a handler worker will be polling for Nexus tasks on.")
1237
-
s.Command.Flags().StringVar(&s.TargetTaskQueue, "target-task-queue", "", "Task Queue in which a handler worker will be polling for Nexus tasks on.")
1238
-
s.Command.Flags().StringVar(&s.TargetUrl, "target-url", "", "URL to direct Nexus requests to.")
0 commit comments