Skip to content

chore: command docs needed for new API operations - #206

Open
github-actions[bot] wants to merge 1 commit into
mainfrom
chore/command-docs-drift-20261102
Open

github-actions[bot] wants to merge 1 commit into
mainfrom
chore/command-docs-drift-20261102

Conversation

@github-actions

@github-actions github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

The production OpenAPI spec has operations without a curated command doc. Each
file below is a draft: true stub scaffolded from the spec (arguments,
same-group related commands, one schema-generated example). Drafts render no
examples in --help or on the Help Center, and the release gate blocks the
next 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 only
where the CLI adds behavior, then remove draft: true. Validate with:

curl -sSL https://api.doit.com/openapi.yaml -o /tmp/openapi.yaml
DCI_COMMAND_DOCS_SPEC=/tmp/openapi.yaml go test -run TestCommandDocs .

New operations:

  • create-customer-notification
  • create-user-notification
  • delete-customer-notification
  • delete-user-notification
  • get-customer-notification
  • get-invoice-pdf
  • get-user-notification
  • list-customer-notifications
  • list-user-notifications
  • update-customer-notification
  • update-user-notification

See COMMAND-DOCS-SPEC.md §3 for the file format.

@github-actions
github-actions Bot requested review from a team, apgiorgi, chaim0m and taltultc as code owners November 2, 2026 06:47
Comment on lines +7 to +8
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`."

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants