Repository navigation
chore: command docs needed for new API operations - #206
github-actions[bot] wants to merge 1 commit into
Conversation
| user-id: "The unique ID of the user (including invited users). Must belong to the tenant resolved from the | ||
| bearer token and optional `X-Tenant-Id`." |
There was a problem hiding this comment.
🔴 After the release sync, omni's Prettier lint will fail on these drafts and block it. Eight argument descriptions wrap onto a line at column zero inside a double-quoted scalar. Fix: put each description on one line, or indent its continuation lines under the key, so prettier --check passes for all 8 sites listed. Root cause: yamlQuote in tools/commanddocs/main.go:306 does not fold the newlines in spec descriptions. Same pattern at 8 sites (create-user-notification.yaml:8, list-user-notifications.yaml:8, get-user-notification.yaml:8, update-user-notification.yaml:8, delete-user-notification.yaml:8, get-customer-notification.yaml:8, update-customer-notification.yaml:8, delete-customer-notification.yaml:8).
Why this was flagged
The scaffolder writes " " + parameter.OptionName() + ": " + yamlQuote(description) (tools/commanddocs/main.go:236). yamlQuote (main.go:306-311) escapes only \ and ", so a newline in the OpenAPI description goes straight into the file. The continuation line then starts at column 0, for example bearer token and optional X-Tenant-Id." at create-user-notification.yaml:8, while its key user-id: sits at indent 2. Before this change, no file under command-docs/ had a column-zero continuation line. AGENTS.md says these files must be Prettier-formatted (prettier@ 3.9.6) because omni's CI lints them after the release sync copies them in. Prettier would at least re-indent these lines. Its YAML parser (eemeli/yaml) may reject an under-indented multi-line quoted scalar outright. Either way the lint fails. yaml.v3 in command_docs.go:76 is lenient with quoted scalars, so TestCommandDocs does not catch this. Being marked draft only hides the docs from --help; it does not exempt the files from lint.
Verification: Trigger: any prettier --check run over these files. yamlQuote (tools/commanddocs/main.go:306-311) escapes only \ and ", so an embedded newline goes into the file unchanged. The result is that create-user-notification.yaml:8 starts at column 0, which is under-indented YAML. Because the repo's own CI runs the same prettier check, this PR's CI fails before any sync.
The production OpenAPI spec has operations without a curated command doc. Each
file below is a
draft: truestub scaffolded from the spec (arguments,same-group related commands, one schema-generated example). Drafts render no
examples in
--helpor on the Help Center, and the release gate blocks thenext tag until every one is curated.
To finish a stub: rewrite the example(s) as real usage (2–4, common case
first, quote every
command:value), fix the argument text, add notes onlywhere the CLI adds behavior, then remove
draft: true. Validate with:New operations:
create-customer-notificationcreate-user-notificationdelete-customer-notificationdelete-user-notificationget-customer-notificationget-invoice-pdfget-user-notificationlist-customer-notificationslist-user-notificationsupdate-customer-notificationupdate-user-notificationSee COMMAND-DOCS-SPEC.md §3 for the file format.