FakeDataDSL Documentation
Welcome to the FakeDataDSL documentation! This directory contains comprehensive guides and references for using the FakeDataDSL gem.
📚 Quick Access
After Generating YARD Docs
Once you've run bundle exec yard doc, access documentation via:
Documentation Index (Recommended):
open docs/index.htmlOr if copied to doc folder:
open doc/docs_index.htmlYARD File List:
open doc/file_list.htmlThen click on any guide (files starting with
file.)Direct Links:
open doc/file.getting_started.html open doc/file.dsl_reference.html open doc/file.type_reference.html
📖 Documentation Files
Getting Started
- Getting Started - Quick start guide for new users
- Usage Guide - Complete guide: DSL, types, formula, unique, options
- Quick Reference - Quick reference card
Reference Guides
- DSL Reference - Complete DSL syntax reference
- Type Reference - All available data types
- API Reference - Programmatic API documentation
Feature Guides
- Behaviors Guide - Using behaviors (latency, failure, etc.)
- Generation Modes - Random, edge, invalid, mixed modes
- Advanced Features - References, custom functions, streaming
Integration & Export
- Factory Bot Integration - Bridge to Factory Bot for test data
- Rails Integration - Rails-specific features
- Config File Guide - YAML configuration reference
- LSP Server - IDE integration
- Native Engine - High-performance Rust engine
Export Formats
- GraphQL Export - Standard GraphQL SDL export
- OpenAPI Export - Export to OpenAPI 3.0 specs
- Protobuf Export - Generate .proto files for microservices
Testing
- Property-Based Testing - RSpec property verification
- Snapshot Testing - Detect schema changes in CI
- Security Testing - Hostile mode for security fuzzing
- Enhanced REPL - Visual inspection and debugging
- REPL Quick Reference - REPL commands cheat sheet
Production Features
- API Server - REST API for production use
- Mock Server - Record & replay mock responses
- Data Contracts - Schema versioning registry
- Performance Mode - Generate millions of records
Rails-Level Features 🚀 NEW
- Rails Engine - Zero-config Rails integration with auto-discovery
- ActiveRecord Inference - Generate schemas from your ActiveRecord models
- Scenarios - Complex test data fixtures with relationships
- Time Travel - Generate historical/time-series data
- Personas - Named data profiles (happy_path, edge_cases, etc.)
- Quality Metrics - Analyze data realism and distribution
- GraphQL Federation - Apollo Federation v2 export
- Webhook Simulator - Test Stripe, GitHub, Twilio webhooks
- Migration Generator - Generate Rails migrations from schemas
- Terraform Export - Generate AWS/GCP infrastructure code
- GitHub Action - CI/CD integration for schema validation
Examples & Best Practices
- Examples - Real-world usage examples
- Best Practices - Tips and recommendations
- Troubleshooting - Common issues and solutions
Additional Resources
- How to Generate Docs - Documentation generation guide
- Rust Integration Guide - Native Rust engine details
🔄 Generating Documentation
# Generate YARD documentation (includes all markdown files)
bundle exec yard doc
# View documentation
open doc/index.html
📝 File Structure
docs/
├── README.md # This file
├── getting_started.md # Quick start
├── dsl_reference.md # DSL syntax
├── type_reference.md # All types
├── behaviors.md # Behaviors guide
├── generation_modes.md # Generation modes
├── advanced_features.md # Advanced topics
├── examples.md # Usage examples
├── api_reference.md # API docs
├── best_practices.md # Best practices
├── troubleshooting.md # Troubleshooting
├── QUICK_REFERENCE.md # Quick reference
├── HOW_TO_GENERATE_DOCS.md # Doc generation guide
│
├── # Integration
├── FACTORY_BOT.md # Factory Bot integration
├── RAILS_INTEGRATION.md # Rails features
├── CONFIG_FILE.md # YAML configuration
├── LSP.md # IDE integration
├── NATIVE_ENGINE.md # Rust engine
│
├── # Export Formats
├── GRAPHQL_EXPORT.md # GraphQL SDL
├── OPENAPI_EXPORT.md # OpenAPI 3.0
├── PROTOBUF_EXPORT.md # Protocol Buffers
│
├── # Testing
├── PROPERTY_TESTING.md # Property-based testing
├── SNAPSHOT_TESTING.md # Snapshot testing
├── SECURITY_TESTING.md # Security testing
├── ENHANCED_REPL.md # REPL debugging
├── REPL_QUICK_REFERENCE.md # REPL cheat sheet
│
├── # Production
├── API_SERVER.md # REST API server
├── MOCK_SERVER.md # Mock server
├── DATA_CONTRACTS.md # Schema versioning
├── PERFORMANCE_MODE.md # High-performance generation
│
├── # Rails-Level Features (NEW)
├── RAILS_ENGINE.md # Rails Engine
├── ACTIVERECORD_INFERENCE.md # Model inference
├── SCENARIOS.md # Test scenarios
├── TIME_TRAVEL.md # Time travel
├── PERSONAS.md # Data personas
├── QUALITY_METRICS.md # Quality analysis
├── GRAPHQL_FEDERATION.md # GraphQL Federation
├── WEBHOOK_SIMULATOR.md # Webhook simulation
├── MIGRATION_GENERATOR.md # Migration generation
├── TERRAFORM_EXPORT.md # Terraform/IaC
├── GITHUB_ACTION.md # GitHub Action
│
└── index.html # Documentation hub (HTML)
🔗 Links
Contributing
See CONTRIBUTING.md for guidelines on contributing to FakeDataDSL.