()
| 308 | |
| 309 | #[test] |
| 310 | fn test_validate_missing_required() { |
| 311 | let schema = serde_json::json!({ |
| 312 | "type": "object", |
| 313 | "required": ["name", "age"], |
| 314 | "properties": { |
| 315 | "name": {"type": "string"}, |
| 316 | "age": {"type": "integer"} |
| 317 | } |
| 318 | }); |
| 319 | let value = serde_json::json!({"name": "Alice"}); |
| 320 | let errors = validate_against_schema(&value, &schema).unwrap_err(); |
| 321 | assert!(errors.iter().any(|e| e.contains("age"))); |
| 322 | } |
| 323 | |
| 324 | #[test] |
| 325 | fn test_validate_wrong_type() { |
nothing calls this directly
no test coverage detected