Repository navigation
docs: Deep README accuracy review - #3
Conversation
Verified every claim against the actual codebase (CLI, emitters, generated SDKs, files). Fixes: Code examples (TS): - bearerAuth/apiKeyAuth are emitted only when the spec declares those security schemes (petstore has none) — added a clarifying note - streamSse is NOT re-exported from index.ts (barrel gap) — fixed import to ./streaming - client.request() lives on ApiClient, not the SdkClient returned by createClient — show streaming via ApiClient directly CLI reference: - Replaced the stale 13-command subset block (missing 12 commands, wrong order) with a pointer to 'specforge --help' + the most-used commands - generate: removed bogus '-V, --version' (it's a top-level flag), added the 6 real undocumented flags (--include-webhooks, --locale, --changelog, --changelog-previous, --version-prefix, --plugin) - check: added the 5 real undocumented flags (--deprecations, --disable, --enable, --severity, --config) - Added missing 'version' command to the subcommand table Roadmap + version pins: - Added v1.6.0/v1.6.1 checkpoints; the section stopped at v1.5.0 (implying it was current); updated closing statement to 1.6.1 - GitHub Action pin @v0.2.2 -> @v1 (was badly stale) - Release example tag v0.1.0 -> v1.6.1
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
PR Summary by QodoDocs: Correct README examples, CLI flags, roadmap, and version pins
AI Description
Diagram
High-Level Assessment
Files changed (1)
|
Code Review by Qodo
1. Tree-shaking claim incorrect
|
| } | ||
| ``` | ||
|
|
||
| > `createClient()` returns a tree-shakeable tag namespace (`client.pets.listPets`). For raw requests / streaming, use the `ApiClient` directly. The auth helpers (`bearerAuth`, `apiKeyAuth`) appear only when your spec declares those schemes. |
There was a problem hiding this comment.
1. Tree-shaking claim incorrect 🐞 Bug ≡ Correctness
README now states that createClient() returns a "tree-shakeable" tag namespace, but the generated TS SDK explicitly warns that createClient() imports all tag modules and is not the tree-shakeable path. This can mislead users into shipping larger bundles than expected.
Agent Prompt
## Issue description
README claims `createClient()` is tree-shakeable, but generated SDK docs state the opposite (it eagerly imports all tags). This mismatch misguides users about bundle size behavior.
## Issue Context
The generated TS barrel (`src/index.ts`) documents tree-shaking behavior and explicitly recommends importing individual tag modules instead of using `createClient()` when bundle size matters.
## Fix Focus Areas
- README.md[334-335]
## Proposed fix
Change the note to something like:
- “`createClient()` returns a convenient tag namespace (`client.pets.listPets`), but it imports all tags. For tree-shaking, import individual tag modules directly.”
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
| const api = new ApiClient({ baseUrl: "https://api.example.com" }); | ||
| const res = await api.request("GET", "/events"); |
There was a problem hiding this comment.
2. Streaming client drops auth 🐞 Bug ≡ Correctness
The updated streaming example constructs a new ApiClient without passing auth, so streaming requests will default to anonymousAuth() even though the example configures bearerAuth earlier. This will fail (401/403) for authenticated streaming endpoints and is misleading as a copy/paste snippet.
Agent Prompt
## Issue description
README’s streaming example creates `new ApiClient({ baseUrl })` which drops the configured auth. In generated SDKs, omitting `auth` defaults to `anonymousAuth()`, so secured streaming endpoints won’t receive credentials.
## Issue Context
Earlier in the snippet, `createClient({... auth: bearerAuth(...) ...})` is shown. The streaming example should reuse the same options (at least `auth`) to avoid a surprising unauthenticated request.
## Fix Focus Areas
- README.md[315-331]
## Proposed fix
Refactor to share options:
```ts
const options = {
baseUrl: "https://api.example.com",
auth: bearerAuth(() => process.env.API_TOKEN!),
maxConcurrent: 8,
dedupe: true,
idempotency: true,
retry: { maxRetries: 3 },
};
const client = createClient(options);
const api = new ApiClient(options);
const res = await api.request("GET", "/events");
```
(Or at minimum: `new ApiClient({ baseUrl, auth: bearerAuth(...) })`.)
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
|
|
||
| ```yaml | ||
| - uses: amafjarkasi/specforge-openapi-sdk-codegen@v0.2.2 | ||
| - uses: amafjarkasi/specforge-openapi-sdk-codegen@v1 |
There was a problem hiding this comment.
3. Action pin docs mismatch 🐞 Bug ⚙ Maintainability
README updates the GitHub Action pin to @v1, but docs-site/docs/intro.md still recommends @v0.2.2, leaving conflicting guidance within this repo. Users following different docs pages will end up on different action versions.
Agent Prompt
## Issue description
The README now recommends using `amafjarkasi/specforge-openapi-sdk-codegen@v1`, but the docs-site intro page still shows `@v0.2.2`, creating inconsistent instructions.
## Issue Context
This PR changed README’s pin; to keep the documentation set coherent, update the docs-site GitHub Action snippet (and any similar snippets elsewhere) to match the chosen recommendation.
## Fix Focus Areas
- docs-site/docs/intro.md[909-923]
## Proposed fix
Update the docs-site snippet to use `@v1` (or explain why it intentionally differs), and optionally mirror the README’s pinning guidance (major pin vs exact tag).
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
Verified every README claim against the actual codebase (CLI, emitters, generated SDKs, files). Found and fixed several inaccuracies.
Code examples (TypeScript) — were broken
CLI reference — stale subset
Roadmap + version pins — stale
Supersedes #2 (which only had the roadmap fix). Doc-only.