| 15 | /// Schema validation errors |
| 16 | #[derive(Debug, thiserror::Error)] |
| 17 | pub enum ValidationError { |
| 18 | #[error("Unknown label: {0}")] |
| 19 | UnknownLabel(String), |
| 20 | |
| 21 | #[error("Unknown property '{property}' for label '{label}'")] |
| 22 | #[allow(dead_code)] // ROADMAP v0.4.0 - Schema validation error for undefined properties |
| 23 | UnknownProperty { label: String, property: String }, |
| 24 | |
| 25 | #[error("Missing required property '{property}' for label '{label}'")] |
| 26 | MissingRequiredProperty { label: String, property: String }, |
| 27 | |
| 28 | #[error("Invalid property type for '{property}': expected {expected}, got {got}")] |
| 29 | InvalidPropertyType { |
| 30 | property: String, |
| 31 | expected: String, |
| 32 | got: String, |
| 33 | }, |
| 34 | |
| 35 | #[error("Constraint violation: {constraint} - {message}")] |
| 36 | ConstraintViolation { constraint: String, message: String }, |
| 37 | |
| 38 | #[error("No graph type associated with graph '{0}'")] |
| 39 | NoGraphType(String), |
| 40 | |
| 41 | #[error("Catalog error: {0}")] |
| 42 | CatalogError(String), |
| 43 | |
| 44 | #[error("Invalid value: {0}")] |
| 45 | InvalidValue(String), |
| 46 | } |
| 47 | |
| 48 | /// Schema validator for validating nodes, edges, and indexes against graph type definitions |
| 49 | #[allow(dead_code)] // ROADMAP v0.4.0 - Schema validation system for graph type enforcement |
no outgoing calls
no test coverage detected