pub enum CodeGenError {
Show 14 variants
RootNotObject,
Io(Error),
Batch {
index: usize,
source: Box<CodeGenError>,
},
AllOfMergeEmpty,
AllOfMergeNonObjectSubschema {
index: usize,
},
AllOfMergeConflictingPropertyType {
property_key: String,
subschema_indices: Vec<usize>,
},
AllOfMergeConflictingNumericBounds {
property_key: String,
keyword: String,
},
AllOfMergeConflictingEnum {
property_key: String,
},
AllOfMergeConflictingConst {
property_key: String,
},
AllOfMergeConflictingPattern {
property_key: String,
},
AllOfMergeUnsupportedSubschema {
index: usize,
reason: String,
},
AnyOfEmpty,
OneOfEmpty,
RefResolution {
ref_str: String,
reason: String,
},
}Expand description
Errors that can occur during code generation.
Variants§
RootNotObject
Root schema is not an object with properties.
Io(Error)
I/O error while writing output.
Batch
One schema in a batch failed; index is the 0-based schema index.
AllOfMergeEmpty
allOf is present but empty (no subschemas to merge).
AllOfMergeNonObjectSubschema
At least one subschema in allOf is not object-like (no type “object” and no non-empty properties).
AllOfMergeConflictingPropertyType
Same property appears in multiple subschemas with incompatible types (e.g. string vs integer).
AllOfMergeConflictingNumericBounds
Same property has conflicting minimum/maximum (or minLength/maxLength, minItems/maxItems) across subschemas that cannot be merged.
AllOfMergeConflictingEnum
Same property has enum in more than one subschema with incompatible value sets.
AllOfMergeConflictingConst
Same property has const in more than one subschema with different values.
AllOfMergeConflictingPattern
Same property has pattern in more than one subschema with different values.
AllOfMergeUnsupportedSubschema
Subschema uses unsupported features for merge (e.g. $ref, non-object type).
AnyOfEmpty
anyOf is present but empty (no subschemas).
OneOfEmpty
oneOf is present but empty (no subschemas).
RefResolution
$ref could not be resolved (or is unsupported in this crate).