Skip to content

Add comprehensive API documentation generator#351

Merged
Kingsman-99 merged 1 commit into
Stellar-split:mainfrom
wendypetersondev:feat/api-doc-generator
Jun 27, 2026
Merged

Add comprehensive API documentation generator#351
Kingsman-99 merged 1 commit into
Stellar-split:mainfrom
wendypetersondev:feat/api-doc-generator

Conversation

@wendypetersondev

@wendypetersondev wendypetersondev commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Closes #144
Implements issue #144: Build SDK comprehensive documentation generator.

Adds a new TypeScript script that automatically generates complete API documentation from JSDoc comments in the SDK source code.

Changes

  • scripts/generate-docs.ts: New documentation generator script using TypeScript compiler API

    • Parses src/index.ts to extract all exported declarations
    • Traverses module imports to find JSDoc comments on source definitions
    • Extracts @param, @returns, and @example tags
    • Generates structured Markdown with tables and code blocks
  • docs/API.md: Auto-generated API reference

    • 156 exports fully documented
    • Table of contents with quick navigation
    • Function/class signatures with truncation for readability
    • Parameter tables with descriptions
    • Return type documentation
    • Runnable code examples
  • package.json: Added npm run docs script and ts-node dev dependency

Verification

✓ All 47 existing tests pass
✓ TypeScript strict mode (zero any types)
✓ npm run docs generates docs/API.md successfully
✓ All 156 exports documented with signatures and descriptions
✓ JSDoc tags properly rendered as Markdown tables and code blocks

Technical Details

  • Uses TypeScript's getLeadingCommentRanges API for JSDoc extraction
  • Handles re-exports from multiple modules
  • Supports type aliases, interfaces, classes, functions, enums, and const declarations
  • Gracefully handles unresolvable modules

How to Use

npm run docs

This will generate/update docs/API.md with current API documentation.

- Add scripts/generate-docs.ts using TypeScript compiler API
- Parse src/index.ts and extract exported declarations with JSDoc
- Extract @param, @returns, @example tags from JSDoc comments
- Render parameter tables and code examples in Markdown
- Generate docs/API.md with all 156 exports documented
- Add 'npm run docs' script to package.json
- Include ts-node as dev dependency for script execution
@drips-wave

drips-wave Bot commented Jun 27, 2026

Copy link
Copy Markdown

@wendypetersondev Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Kingsman-99 Kingsman-99 merged commit a3491c5 into Stellar-split:main Jun 27, 2026
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.

Build SDK comprehensive documentation generator

2 participants