Skip to main content

Implementation Guide

RFC Status: This implementation guide is part of the OpenDocs Specification RFC.Please provide feedback via GitHub Issues or join the discussion.

Overview

This guide walks you through implementing OpenDocs support in your documentation tool, language extractor, or documentation generator. OpenDocs is designed to be easy to implement while providing powerful capabilities.

Implementation Roadmap

Phase 1: Basic DocItem Support

  1. Implement the core DocItem model
  2. Add basic metadata extraction
  3. Generate simple JSON output
Guide: DocItem Model

Phase 2: Documentation Integration

  1. Extract documentation comments
  2. Map to DocBlock format
  3. Handle language-specific features
Guides: DocItem Model, Extractors

Phase 3: Advanced Features

  1. Implement workspace organization
  2. Add file format optimization
  3. Support cross-references
Guides: Documentation Set Builder, Performance

Implementation Path

Quick Start

The fastest way to get started:
  1. Start with DocItem: Implement the basic DocItem class
  2. Add extraction: Extract from your language’s AST
  3. Generate JSON: Serialize to OpenDocs format
  4. Iterate: Add features incrementally

Language-Specific Resources

TypeScript

Rust

  • Syn - Rust parser
  • Quote - Rust code generation

Go

Python

Common Libraries

JSON Processing

Validation

  • ajv - JSON Schema validation

Next Steps

Choose your path based on your needs:

Contributing

Help improve this implementation guide by:
  1. Sharing your implementation experiences in Discussions
  2. Contributing language-specific examples via Pull Requests
  3. Reporting issues or suggesting improvements via Issues

See Also