Skip to content

feat(docs): Sprint 1 Task A6 - TypeDoc API Documentation#21

Merged
pipewrk merged 2 commits intomainfrom
sprint-1/a6-api-docs
Oct 1, 2025
Merged

feat(docs): Sprint 1 Task A6 - TypeDoc API Documentation#21
pipewrk merged 2 commits intomainfrom
sprint-1/a6-api-docs

Conversation

@pipewrk
Copy link
Contributor

@pipewrk pipewrk commented Oct 1, 2025

Overview

This PR implements Sprint 1 Task A6: Auto-generated API documentation using TypeDoc.

Changes

TypeDoc Setup

  • ✅ Install TypeDoc v0.28.13 with typedoc-plugin-markdown plugin
  • ✅ Configure TypeDoc with modular output strategy (separate directories per module)
  • ✅ Integrate TypeDoc generation into documentation build pipeline
  • ✅ Generated docs committed to source control (~172KB, 50+ markdown files)

Documentation Structure

  • Manual API Reference: docs/api/*.md - Curated guides with examples
    • Overview page with quick start
    • Resources guide with complete example
    • Action, Jobs, Events stubs (coming in future sprints)
  • Auto-Generated Docs: docs/api/generated/ - Complete TypeScript signatures
    • Resources module documentation
    • Errors module documentation
    • Transport module documentation

Code Improvements

  • ✅ Export WordPressRESTError interface (was private)
  • ✅ Create transport/index.ts for proper module exports
  • ✅ Fix all TypeDoc warnings (2 → 0)

VitePress Integration

  • ✅ Update config with two-section API sidebar (Manual + Generated)
  • ✅ Fix dead link issues by using explicit README file references
  • ✅ Documentation builds successfully without errors

CI Optimization

  • ✅ Disable E2E tests temporarily (saves 3-5 min per run)
  • ✅ Will re-enable when we have comprehensive E2E test coverage

Verification

All checks pass successfully:

  • pnpm typecheck - All packages type-check without errors
  • pnpm lint - No linting issues
  • pnpm build - All packages compile successfully
  • pnpm test - 254 tests pass (10 test suites)
  • pnpm docs:build - Documentation builds without errors

Documentation Preview

The generated documentation includes:

  • Complete type signatures for all exported APIs
  • JSDoc descriptions and parameter documentation
  • Organized by module (resource, errors, transport)
  • Integrated with manual guides via VitePress sidebar

Related

  • Closes Sprint 1 Task A6
  • Follows patterns from Code Primitives & Dev Tooling spec
  • Sets foundation for future API documentation (Actions, Jobs, Events, Bindings, Interactivity)

Testing

pnpm docs:build  # Generate TypeDoc + build VitePress site
pnpm docs:dev    # Preview documentation locally

- Install TypeDoc v0.28.13 with typedoc-plugin-markdown plugin
- Configure TypeDoc to generate modular API docs for resource, errors, transport modules
- Create manual API reference pages (resources, actions, jobs, events) with examples
- Integrate TypeDoc generation into docs:build pipeline
- Export WordPressRESTError interface and create transport/index.ts for proper module exports
- Update VitePress config with two-section API sidebar (manual + generated)
- Fix documentation warnings (2 → 0) by adding missing exports
- Generated docs committed to source control (172KB, ~50+ markdown files)
- Update .gitignore to only exclude VitePress build output
- Disable E2E tests in CI temporarily (saves 3-5min, minimal test coverage)

TypeDoc Configuration:
- Entry points: resource/index.ts, errors/index.ts, transport/index.ts
- Entry point strategy: expand (generates separate module directories)
- Output: docs/api/generated/
- Validation: strict link checking enabled

Documentation Structure:
- Manual curated guides: docs/api/*.md
- Auto-generated reference: docs/api/generated/{resource,errors,transport}/
- VitePress navigation integrates both seamlessly

Fixes:
- Dead link errors resolved by using explicit README file references
- Duplicate content removed from resources.md
- Invalid /information/ links cleaned up from stub files

Build Verification:
✅ typecheck - all packages pass
✅ lint - no issues
✅ build - all packages compile
✅ test - 254 tests pass
✅ docs:build - builds successfully

Refs: Sprint 1 Task A6 (API Documentation)
Copilot AI review requested due to automatic review settings October 1, 2025 02:15
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements automated API documentation generation using TypeDoc, providing comprehensive type-based documentation for the WP Kernel framework's core modules.

Key changes include:

  • TypeDoc setup with markdown plugin for generating module documentation
  • Documentation restructure with manual guides alongside auto-generated API reference
  • Code improvements to export previously private interfaces and fix TypeDoc warnings

Reviewed Changes

Copilot reviewed 12 out of 54 changed files in this pull request and generated no comments.

Show a summary per file
File Description
typedoc.json TypeDoc configuration with modular output strategy for Resources, Errors, and Transport modules
packages/kernel/src/transport/index.ts New module index file exporting transport types and functions
packages/kernel/src/errors/index.ts Added export for WordPressRESTError interface
packages/kernel/src/errors/ServerError.ts Enhanced WordPressRESTError interface with JSDoc documentation
package.json Added TypeDoc dependencies and documentation build script
docs/api/*.md Updated API documentation pages with streamlined content linking to generated docs
docs/.vitepress/config.ts Added Generated Docs section to sidebar navigation
.github/workflows/ci.yml Temporarily disabled E2E tests to optimize CI runtime
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

The all-checks job was referencing the disabled e2e-test job,
causing workflow validation to fail. Removed e2e-test from both
the needs array and the status check condition.

Now checks only: lint, build, unit-test
@pipewrk pipewrk merged commit ac33023 into main Oct 1, 2025
6 checks passed
@pipewrk pipewrk deleted the sprint-1/a6-api-docs branch October 5, 2025 01:48
pipewrk added a commit that referenced this pull request Nov 8, 2025
feat(docs): Sprint 1 Task A6 - TypeDoc API Documentation
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.

2 participants