Docs: generated plugin overview examples call required (and destructive) operations with empty args `({})`
Author: Arindam200Created Jun 19, 2026Updated Sep 18, 2026
LabelsStale
Summary
Generated plugin overview pages show example API calls with empty arguments — await corsair.<plugin>.api.<group>.<method>({}) — even when the operation requires fields. These examples don't run, and several of them are destructive operations shown with no guardrail.
Scope
117 such ({}) example calls across docs/plugins/*/overview.mdx.
Verified example
docs/plugins/slack/overview.mdx:140:
await corsair.slack.api.channels.archive({});But the source requires a channel — packages/slack/endpoints/channels.ts:14:
body: { channel: input.channel },So this call throws on a missing required field.
Two compounding problems
- Doesn't run — required fields are omitted, so the snippet fails.
- Destructive and unguarded — many of these are labeled "Write-style (destructive)" right in the doc, yet shown as bare copy-paste with no warning/permissions note. Examples:
docs/plugins/cal/overview.mdx:127—bookings.cancel({})docs/plugins/discord/overview.mdx:127—messages.delete({})docs/plugins/github/overview.mdx:140—comments.delete({})docs/plugins/monday/overview.mdx:127—boards.archive({})
Suggested fix
- Have the doc generator populate placeholder values from each operation's input schema (required fields first), e.g.:
await corsair.slack.api.channels.archive({ channel: 'C0123456789' }); - For destructive operations, either omit them from the overview's example block or wrap them in a
<Warning>that links to/concepts/permissionsand/concepts/hooks.
Prevention
A docs lint that flags .api.*({}) where the operation's input schema has required fields would catch this automatically.
Source: corsairdev/corsair