feat: implement mapping engine
This commit is contained in:
@@ -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,
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user