Commit 49d1c26
fix(quickstart): hide unity from --target help text (#2085)
## Problem
PRs keep getting opened against the marketing site re-adding `unity` to
the `speakeasy quickstart` `--target` docs (e.g.
[marketing-site#1720](speakeasy-api/marketing-site#1720)).
The CLI reference docs are regenerated by walking the cobra command tree
(`cmd/docs`). The `quickstart --target` help text is built from
`prompts.GetSupportedTargetNames()`, which returns the full upstream
target list — including `unity`. So every regen re-adds `unity` to
`quickstart.md`.
## Fix
Filter `unity` out of `prompts.GetSupportedTargetNames()`, which is
**display-only** — it's used in exactly one place, the `quickstart
--target` help string. Generation and validation are unaffected: those
paths call `generate.GetSupportedTargetNames()` directly, so `speakeasy
quickstart --target unity` still works. The filter uses a
`hiddenTargetNames` map so future deprecated-but-supported targets can
be hidden the same way.
## Verification
Ran the real `cmd/docs` generator; the regenerated `quickstart.md` line
now matches the desired (unity-free) output byte-for-byte:
```
-t, --target string generation target (available options: [cli, csharp, go, java, mcp-typescript, php, postman, python, ruby, terraform, typescript])
```
`quickstart.md` is the only published doc affected — `run.md`'s
`--target` is a target-ID field, and `generate sdk` isn't in the
published CLI reference.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Hide `unity` from the `speakeasy quickstart --target` help text so it no
longer shows up in published docs. Display-only change:
`prompts.GetSupportedTargetNames()` filters `unity` via a
`hiddenTargetNames` map; generation/validation still use
`generate.GetSupportedTargetNames()`, so `--target unity` still works.
<sup>Written for commit cede30c.
Summary will update on new commits.</sup>
<a
href="https://cubic.dev/pr/speakeasy-api/speakeasy/pull/2085?utm_source=github"
target="_blank" rel="noopener noreferrer"
data-no-image-dialog="true"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img
alt="Review in cubic"
src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a>
<!-- End of auto-generated description by cubic. -->
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>1 parent 0f6be0f commit 49d1c26
1 file changed
Lines changed: 15 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
91 | 99 | | |
92 | | - | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
93 | 107 | | |
94 | 108 | | |
95 | 109 | | |
| |||
0 commit comments