website-htmx-rustelo-code/site/info/automation_guide.md
2026-07-10 03:44:13 +01:00

1.5 KiB

Route Documentation Automation Guide

Generated at: 2026-07-07T10:42:31.128605+00:00

Overview

This documentation is automatically generated during the build process from the actual route definitions and component code. The generated TOML files can be consumed by external tools for automation purposes.

Generated Files

  • server_routes.toml - API endpoint definitions in TOML format
  • client_routes.toml - Page route definitions in TOML format
  • components.toml - Component documentation in TOML format
  • *.md files - Human-readable documentation

TOML Schema

Server Routes

[[api_routes]]
path = "/api/example"
methods = ["GET", "POST"]
handler = "handlers::example_handler"
module = "crates/server/src/handlers/mod.rs"
response_type = "Json<ExampleResponse>"
requires_auth = false
middleware = ["cors"]
description = "Example API endpoint"

Client Routes

[[page_routes]]
path = "/example"
component = "Example"
page_component = "ExamplePage"
unified_component = "UnifiedExamplePage"
language = "en"
enabled = true
priority = 0.8

Usage in External Tools

These TOML files can be consumed by:

  • API client generators
  • Testing frameworks
  • Documentation generators
  • CI/CD pipelines
  • Monitoring and alerting systems

Configuration

The documentation generation is controlled by:

  • SITE_CONFIG_PATH environment variable (default: site/config)
  • Build system integration in crates/*/build.rs
  • Route configuration files in site/config/routes/