feat: implement mapping engine

This commit is contained in:
a.tolmachev
2026-03-25 16:16:59 +03:00
parent ef128ac25a
commit 87639048ce
9 changed files with 1083 additions and 143 deletions
+20
View File
@@ -0,0 +1,20 @@
use thiserror::Error;
#[derive(Clone, Debug, PartialEq, Eq, Error)]
pub enum MappingError {
#[error("invalid JSONPath: {path}")]
InvalidJsonPath { path: String },
#[error("unsupported source root {root} for {context} mapping")]
UnsupportedSourceRoot { root: String, context: &'static str },
#[error("unsupported target root {root} for {context} mapping")]
UnsupportedTargetRoot { root: String, context: &'static str },
#[error("mixed mapping target contexts are not allowed")]
MixedTargetContext,
#[error("missing required value at {path}")]
MissingRequiredValue { path: String },
#[error("transform {transform} cannot be applied to {actual}")]
InvalidTransformInput {
transform: &'static str,
actual: &'static str,
},
}