API: add dry-run validation with change preview and runtime guards

This commit is contained in:
Alexey
2026-11-02 21:03:19 +03:00
parent 108e14f628
commit e0cbced3e9
28 changed files with 1910 additions and 182 deletions
+8
View File
@@ -104,6 +104,14 @@ pub(in crate::api) fn config_schema() -> Result<&'static ConfigSchemaData, ApiFa
.map_err(|error| ApiFailure::internal(error.clone()))
}
pub(super) fn field_paths() -> Result<Vec<&'static str>, ApiFailure> {
Ok(config_schema()?
.fields
.iter()
.map(|field| field.spec.path.as_str())
.collect())
}
fn field_specs() -> Result<Vec<FieldSpec>, String> {
serde_json::from_str(include_str!("fields.json"))
.map_err(|error| format!("invalid compiled config field catalog: {error}"))