Commit 57a03f3
committed
feat: enhance JSON Structure validator with strict object properties validation
- Add validation for object schemas: properties MUST have at least one entry when present
- Allow empty properties for schemas using (properties inherited from base)
- Fix property merging to properly combine base and derived properties
- Add clarifying comment for map key validation (any valid JSON string allowed)
- Add comprehensive tests for empty properties validation
- Add tests for map keys with various valid JSON string formats
- Fix test_extends_valid by improving inheritance property merging
BREAKING CHANGE: Object schemas with empty properties are now rejected unless using1 parent e4da0ef commit 57a03f3
File tree
2 files changed
+79
-4
lines changed- samples/py
2 files changed
+79
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
209 | 209 | | |
210 | 210 | | |
211 | 211 | | |
212 | | - | |
213 | | - | |
214 | | - | |
| 212 | + | |
215 | 213 | | |
216 | 214 | | |
217 | 215 | | |
| |||
225 | 223 | | |
226 | 224 | | |
227 | 225 | | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
228 | 231 | | |
229 | 232 | | |
230 | 233 | | |
| |||
331 | 334 | | |
332 | 335 | | |
333 | 336 | | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
334 | 345 | | |
335 | 346 | | |
336 | 347 | | |
| |||
390 | 401 | | |
391 | 402 | | |
392 | 403 | | |
| 404 | + | |
393 | 405 | | |
394 | 406 | | |
395 | 407 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
484 | 484 | | |
485 | 485 | | |
486 | 486 | | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
487 | 517 | | |
488 | 518 | | |
489 | 519 | | |
| |||
554 | 584 | | |
555 | 585 | | |
556 | 586 | | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
557 | 620 | | |
558 | 621 | | |
559 | 622 | | |
| |||
1429 | 1492 | | |
1430 | 1493 | | |
1431 | 1494 | | |
1432 | | - | |
| 1495 | + | |
1433 | 1496 | | |
1434 | 1497 | | |
1435 | 1498 | | |
| |||
0 commit comments