Skip to content

fix: add detailed validation error reporting#30

Open
kings9527 wants to merge 1 commit into
gkz:masterfrom
kings9527:master
Open

fix: add detailed validation error reporting#30
kings9527 wants to merge 1 commit into
gkz:masterfrom
kings9527:master

Conversation

@kings9527

Copy link
Copy Markdown

Summary

Implements the feature requested in #6: instead of only returning /, the library now supports detailed error reporting that pinpoints exactly which part of the input fails type checking.

Changes

  • Added API in
  • Added API in
  • Returns where each error includes the full path (e.g. )
  • Covers all type structures: basic types, arrays, tuples, fields, custom types, union types
  • Added 20 comprehensive unit tests in

Test Results

All 114 tests pass (94 existing + 20 new):

Example Usage

Backward Compatibility

Existing and APIs remain unchanged — they still return plain booleans.

- Add typeCheckDetailed() and parsedTypeCheck.detailed() APIs
- Return {result, errors} object instead of plain boolean when detailed mode is used
- Error messages include full path (e.g., root.a.b[1]) to pinpoint failures
- Cover all structures: basic types, arrays, tuples, fields, custom types, unions
- Add 20 unit tests covering detailed error reporting scenarios
- All 114 tests pass (94 existing + 20 new)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant