Skip to content

feat: use typedoc and config to generate API methods and types in mar… - #14

Open
Lazare-42 wants to merge 1 commit into
mainfrom
feat/markdown_generation_with_typedoc
Open

Lazare-42 wants to merge 1 commit into
mainfrom
feat/markdown_generation_with_typedoc

Conversation

@Lazare-42

Copy link
Copy Markdown
Contributor

…kdown

@coderabbitai

coderabbitai Bot commented Dec 4, 2025

Copy link
Copy Markdown

Summary by CodeRabbit

  • New Features

    • Introduced API documentation generation with new npm scripts (docs:generate, docs:clean) for automated documentation creation.
  • Documentation

    • Updated README with documentation generation workflow and instructions.
  • Chores

    • Added TypeDoc and documentation tooling to development dependencies.
    • Updated .gitignore patterns for generated files.

✏️ Tip: You can customize this high-level summary in your review settings.

Walkthrough

A TypeDoc-based documentation generation system is added with configuration files for client, v1, and v2 API versions. Related npm scripts (docs:clean, docs:generate) are introduced, along with TypeDoc dependencies. The .gitignore and README are updated accordingly.

Changes

Cohort / File(s) Summary
Build & Configuration Setup
.gitignore
Fixes trailing space in coverage entry and adds docs/generated/ to ignored paths.
package.json
Documentation Configuration
typedoc.config.mjs, typedoc.v1.config.mjs, typedoc.v2.config.mjs
Creates three TypeDoc configuration modules for generating Markdown documentation: client API & bridge, V1 API reference, and V2 API reference respectively. Each specifies entry points, output paths, exclusion rules, sorting preferences, and metadata.
Documentation
README.md
Adds Documentation Generation section describing TypeDoc-based documentation generation, associated commands, configuration files, and output structure.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Review TypeDoc configuration syntax and entry point references for accuracy
  • Verify .gitignore trailing space fix and new entry
  • Confirm npm script chaining logic and command paths
  • Check that generated documentation directories align across configs

Poem

🐰 Docs now flow like carrots in spring,
TypeDoc brings each API to wing,
V1, V2, client side clear,
Generated wisdom for all to revere! ✨📚

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Description check ❓ Inconclusive The description is truncated ('…kdown') and extremely vague, providing no meaningful information about the changeset or its purpose. Provide a complete description explaining the purpose and scope of the TypeDoc integration, such as what documentation is being generated and how it benefits the project.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main feature: using TypeDoc and configuration to generate API methods and types in markdown. It accurately reflects the changeset which adds TypeDoc configuration files and npm scripts for documentation generation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/markdown_generation_with_typedoc

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6ac217a and 562f934.

📒 Files selected for processing (6)
  • .gitignore (1 hunks)
  • README.md (1 hunks)
  • package.json (2 hunks)
  • typedoc.config.mjs (1 hunks)
  • typedoc.v1.config.mjs (1 hunks)
  • typedoc.v2.config.mjs (1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: Yusuf023
Repo: Meeting-BaaS/sdk-generator PR: 13
File: .github/workflows/auto-update.yml:79-80
Timestamp: 2025-12-04T00:48:42.374Z
Learning: In the Meeting-BaaS/sdk-generator repository: v2 webhook files (src/generated/v2/api/webhooks/) contain TypeScript types and Zod schemas that provide type safety for webhook payload handling, unlike v1 webhook files (src/generated/v1/api/webhooks/) which are purely documentation. Changes to v2 webhook files should trigger releases as they provide value to users.
📚 Learning: 2025-12-04T00:48:42.374Z
Learnt from: Yusuf023
Repo: Meeting-BaaS/sdk-generator PR: 13
File: .github/workflows/auto-update.yml:79-80
Timestamp: 2025-12-04T00:48:42.374Z
Learning: In the Meeting-BaaS/sdk-generator repository: v2 webhook files (src/generated/v2/api/webhooks/) contain TypeScript types and Zod schemas that provide type safety for webhook payload handling, unlike v1 webhook files (src/generated/v1/api/webhooks/) which are purely documentation. Changes to v2 webhook files should trigger releases as they provide value to users.

Applied to files:

  • typedoc.v1.config.mjs
  • README.md
  • typedoc.v2.config.mjs
🪛 GitHub Actions: Test SDK
package.json

[error] 1-1: Lockfile specifiers do not match package.json: the lockfile contains versions (e.g., axios 1.8.3, zod 3.24.2) that do not align with package.json. Run 'pnpm install' to synchronize lockfile.

🔇 Additional comments (7)
.gitignore (1)

29-34: LGTM! Clean gitignore updates.

The trailing space fix on line 29 and the new docs/generated/ ignore entry correctly align with the documentation generation workflow introduced in this PR.

package.json (2)

44-48: Scripts structure looks good.

The documentation generation scripts are well-organized:

  • docs:clean removes generated files
  • docs:generate orchestrates the full workflow (clean → v1 → v2 → client)
  • Individual docs:generate:* scripts target specific configs

87-88: No action required—lockfile is already in sync and package versions are appropriate.

The pnpm-lock.yaml is currently synchronized with package.json (working tree clean). The typedoc version (^0.28.15) is the latest stable release as of November 29, 2025. For typedoc-plugin-markdown (^4.9.0), the caret constraint allows compatible versions; npm shows 4.8.1 as the latest published version. No security advisories were found for either package.

Likely an incorrect or invalid review comment.

README.md (1)

478-518: Well-documented TypeDoc workflow.

The documentation generation section is comprehensive and clearly explains the available commands for generating docs, the purpose of each TypeDoc configuration file, and the output structure and organization.

typedoc.config.mjs (1)

1-55: Client API configuration is well-structured and properly configured.

Entry points are correctly set up and reference existing files (src/node/client.ts and src/node/types.d.ts). The configuration is appropriate for client API documentation:

  • Proper exclusion of test and example files
  • defaultCategory: "Other" is contextually appropriate for client bridge docs
  • kindSortOrder including "Enum" aligns with the client's exposed types
typedoc.v1.config.mjs (1)

1-55: Well-structured TypeDoc configuration for v1 API.

The configuration is properly set up for v1 API documentation:

  • Entry points (v1-methods.ts, types.d.ts) exist and are correctly referenced
  • Appropriate exclusion of v2-specific code (v2-methods.ts is present and correctly excluded)
  • Consistent organization and sorting with v2 config structure
  • All required configuration files (tsconfig.json) in place
typedoc.v2.config.mjs (1)

1-55: Well-structured TypeDoc configuration for v2 API.

The configuration is comprehensive and correctly structured. Entry point files exist and are properly referenced: src/node/v2-methods.ts and src/node/types.d.ts. The exclusion patterns correctly filter out v1-specific code and test files. Organization and sorting settings are sensible, and the depth limit for readability is appropriate.

Comment thread typedoc.config.mjs
Comment on lines +41 to +46
kindSortOrder: [
"Function",
"Interface",
"TypeAlias",
"Enum"
],

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick | 🔵 Trivial

Consider consistent kindSortOrder across all configs.

The client config includes "Enum" in kindSortOrder (line 45), while the v1 and v2 configs don't. If enums are present in v1/v2 APIs, consider adding "Enum" to their configs for consistency.

If this difference is intentional (client API exposes enums while v1/v2 don't), consider adding a comment explaining why. Otherwise, align all three configs:

 kindSortOrder: [
   "Function",
   "Interface",
-  "TypeAlias"
+  "TypeAlias",
+  "Enum"
 ],

Apply this change to both typedoc.v1.config.mjs and typedoc.v2.config.mjs if enums exist in those APIs.

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In typedoc.config.mjs around lines 41 to 46, kindSortOrder includes "Enum" while
typedoc.v1.config.mjs and typedoc.v2.config.mjs do not; update the other two
configs to match or document the intentional difference. Check if v1/v2 APIs
contain enums—if they do, add "Enum" to their kindSortOrder arrays; if they do
not or the omission is intentional, add a short comment in each config
explaining why enums are excluded to avoid confusion.

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.

1 participant