ZonIssue path does not seem to point at anything
Describe the bug When raising an issue with any input, all ZonIssues do not seem to set paths as expected. They seem to all be hard coded
To Reproduce Steps to reproduce the behavior:
- Create a
zon.recordwith any properties of zon objects - Try to validate an invalid object
- Observe that the ZonError issues section has no path listing the key of the record
Expected behavior
Assuming the Path was intended to be similar to how Pydantic handles its loc in errors, The ZonErrors should list the path of keys where the error occured.
Screenshots
Environment (please complete the following information):
- OS: Fedora Linux
- Python Version 3.12.3
- Version [e.g. 22] (what does this mean)
Additional context
It's just not implemented in /zon/__init__.py, you can see on as early as line 129.
Hi @FireIsGood. Thank you for reporting this.
This particular thing has been on my mind for a while but I haven't had the time to work on it. PRs are welcome if you want to have a go at it, otherwise I'll try to have this sorted as soon as I can. Thank you :)