pub const SCHEMAS: &[(&str, &str)] = &[
("camp.toml.schema.json", CAMP),
("machine.toml.schema.json", MACHINE),
("mirror.toml.schema.json", MIRROR),
("provider.toml.schema.json", PROVIDER),
("service.toml.schema.json", SERVICE),
("workload.toml.schema.json", WORKLOAD),
];
pub const CAMP: &str = include_str!("../../../../.yah/schema/camp.toml.schema.json");
pub const MACHINE: &str = include_str!("../../../../.yah/schema/machine.toml.schema.json");
pub const MIRROR: &str = include_str!("../../../../.yah/schema/mirror.toml.schema.json");
pub const PROVIDER: &str = include_str!("../../../../.yah/schema/provider.toml.schema.json");
pub const SERVICE: &str = include_str!("../../../../.yah/schema/service.toml.schema.json");
pub const WORKLOAD: &str = include_str!("../../../../.yah/schema/workload.toml.schema.json");
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn schemas_table_is_complete_and_nonempty() {
assert_eq!(SCHEMAS.len(), 6, "expected six embedded schemas");
for (name, body) in SCHEMAS {
assert!(name.ends_with(".toml.schema.json"), "{name} missing suffix");
assert!(!body.is_empty(), "{name} is empty");
assert!(body.contains("\"$schema\""), "{name} missing $schema key");
}
}
}