Expand description
Intelligent schema discovery from content and HTML Intelligent schema discovery service
Automatically infers JSON Schema definitions from:
- JSON/object examples — type-inspects values to generate schema
- HTML content — uses an AI provider to suggest extraction schemas
- User corrections — applies overrides stored in a correction map
- Evolution detection — compares new inferences against cached schemas
The service sits in the application layer and depends on AIProvider for
LLM-assisted HTML schema inference.
§Example
use stygian_graph::application::schema_discovery::{SchemaDiscoveryService, SchemaDiscoveryConfig};
use serde_json::json;
let service = SchemaDiscoveryService::new(SchemaDiscoveryConfig::default(), None);
// Infer from a JSON example
let example = json!({"name": "Alice", "age": 30, "active": true});
let schema = service.infer_from_example(&example);
assert_eq!(schema["type"].as_str().unwrap(), "object");Structs§
- Discovered
Schema - Discovered schema with metadata
- Schema
Diff - Schema evolution diff — describes changes between two schema versions
- Schema
Discovery Config - Configuration for the schema discovery service
- Schema
Discovery Service - Intelligent schema discovery service
Enums§
- Schema
Source - How a schema was derived