#[derive(Debug, Clone, PartialEq)]
pub enum SchemaType {
Bool,
Integer,
Float,
Str,
Optional(Box<SchemaType>),
Array(Box<SchemaType>),
Struct(StructSchema),
}
#[derive(Debug, Clone, PartialEq)]
pub struct StructSchema {
pub fields: Vec<FieldSchema>,
}
#[derive(Debug, Clone, PartialEq)]
pub struct FieldSchema {
pub json_key: String,
pub rust_name: String,
pub ty: SchemaType,
}
#[derive(Debug, Clone)]
pub enum TopLevel {
Map { entry: StructSchema },
Array { entry: SchemaType },
Struct(StructSchema),
}