Integration & Migration Examples
Template Integration Examples
OpenDocs supports multiple templating engines to generate documentation from DocItems. Here are examples using Liquid and Handlebars.Liquid Template Usage
Handlebars Template Usage
Testing Examples
Unit Test for Extractor
Example of testing a TypeScript OpenDocs extractor:Integration Test for Documentation Set
Example of testing a complete documentation set build:Migration Examples
From JSDoc to OpenDocs
Migrating from traditional JSDoc comments to OpenDocs format:From Rust Doc to OpenDocs
Migrating from Rust documentation comments to OpenDocs format:Migration Best Practices
- Preserve Semantics: Ensure all documentation content is preserved during migration
- Map Tags Correctly: Convert language-specific doc tags to OpenDocs standard tags
- Test Thoroughly: Verify that all examples, parameters, and return types are correctly extracted
- Automate When Possible: Build migration scripts for large codebases
- Validate Output: Use JSON Schema validation to ensure generated DocItems are valid
Testing Best Practices
- Test Extractors: Write unit tests for each language extractor
- Integration Tests: Test the complete pipeline from source to documentation
- Snapshot Testing: Use snapshot tests to catch unintended changes in output
- Performance Tests: Test with large codebases to ensure acceptable performance
- Validation Tests: Ensure all output conforms to the OpenDocs schema
See Also
- Simple Project Examples - Basic implementation patterns
- DocItem Model - Understanding the core data model
- Implementation Guide - Step-by-step implementation guide
- Examples Overview - Back to all examples
This example is part of the OpenDocs Specification RFC. Provide feedback to help improve it.

