boon now included

This commit is contained in:
2025-09-30 01:10:58 -04:00
parent c9b1245a57
commit cc04f38c14
77 changed files with 12905 additions and 52 deletions

View File

@ -488,6 +488,25 @@ fn test_validate_format_empty_string() {
assert_success(&result);
}
#[pg_test]
fn test_validate_format_empty_string_with_ref() {
let cache_result = format_with_ref_schemas();
assert_success(&cache_result);
// Test that an optional field with a format constraint passes validation
// when the value is an empty string, even when the schema is referenced by a punc.
let instance = json!({
"id": "123e4567-e89b-12d3-a456-426614174000",
"type": "job",
"worker_id": "" // Optional field with format, but empty string
});
let result = validate_json_schema("save_job.request", jsonb(instance));
// This should succeed because empty strings are ignored for format validation.
assert_success(&result);
}
#[pg_test]
fn test_validate_property_merging() {
let cache_result = property_merging_schemas();