1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
//! Schema system for AuDB
//!
//! This module provides schema definitions supporting multiple formats
//! (native, JSON Schema, TypeScript, Rust).
//!
//! ## Schema Formats
//!
//! AuDB supports multiple schema definition formats:
//!
//! - **Native**: Rust-like syntax in gold files (default)
//! - **JSON Schema**: Standard JSON Schema format (embedded in gold files)
//! - **TypeScript**: TypeScript interface definitions
//! - **Rust**: Direct Rust struct definitions
//!
//! ## Architecture
//!
//! All schema formats are parsed into a unified internal representation
//! (`Schema` with `Field` and `Type`). This allows:
//!
//! - Format-agnostic code generation
//! - Cross-format validation
//! - Consistent type system
//!
//! ## Parsing Pipeline
//!
//! ```ignore
//! Embedded Format → Parser → Schema (unified) → Code Generation
//! ```
//!
//! ## Usage
//!
//! ```ignore
//! use audb::schema::{Schema, SchemaFormat, parsers};
//!
//! // Parse JSON Schema
//! let json = r#"{"type": "object", "properties": {...}}"#;
//! let schema = parsers::parse_json_schema("User", json)?;
//!
//! // Parse TypeScript
//! let ts = "interface User { id: string; name: string; }";
//! let schema = parsers::parse_typescript("User", ts)?;
//! ```
// Re-export key types for convenience
pub use ;
// Re-export parsers
pub use ;