()
| 875 | |
| 876 | #[test] |
| 877 | fn test_validate_additional_properties_false() { |
| 878 | let schema = serde_json::json!({ |
| 879 | "type": "object", |
| 880 | "properties": {"name": {"type": "string"}}, |
| 881 | "additionalProperties": false |
| 882 | }); |
| 883 | assert!(validate_against_schema(&serde_json::json!({"name": "ok"}), &schema).is_ok()); |
| 884 | let errors = |
| 885 | validate_against_schema(&serde_json::json!({"name": "ok", "extra": true}), &schema) |
| 886 | .unwrap_err(); |
| 887 | assert!(errors.iter().any(|e| e.contains("extra"))); |
| 888 | } |
| 889 | |
| 890 | #[test] |
| 891 | fn test_validate_number_range() { |
nothing calls this directly
no test coverage detected