pub const META_SCHEMA_JSON: &str = include_str!("graphersal-schema-v1.json");
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_meta_schema_is_valid_json() {
let parsed = crate::value::physical::read_json(META_SCHEMA_JSON, 64)
.expect("META_SCHEMA_JSON must be valid JSON");
let crate::value::physical::PhysicalValue::Object(fields) = parsed else {
panic!("the meta-schema is an object");
};
let id = fields
.iter()
.find(|(k, _)| k == "$id")
.map(|(_, v)| v.clone());
assert_eq!(
id,
Some(crate::value::physical::PhysicalValue::String(
crate::graph::schema::SCHEMA_FORMAT_URL.into()
))
);
}
}