(improvement): Adds More Type Formats to String Parser #42
Reference in New Issue
Block a user
Delete Branch "improvement/better-string-validations"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This pull request updates how string formats are parsed and validated, aligning the implementation with the latest pydantic types and improving standards compliance. The changes include switching from generic types to more specific ones for URLs and IP addresses, updating the corresponding parser logic, and adjusting the tests to match these changes.
Parser improvements and standards compliance:
StringTypeParserto useAnyUrlinstead ofHttpUrlfor the"uri"format, and to useIPv4Address/IPv6Addressinstead ofIPvAnyAddressfor"ipv4"and"ipv6"formats. The"uuid"format is also now supported using theUUIDtype. (jambo/parser/string_type_parser.py) [1] [2]Test updates:
AnyUrlinstead ofHttpUrlfor URI formats and to expectIPv4Address/IPv6Addressinstead ofIPvAnyAddressfor IP formats. (tests/parser/test_string_type_parser.py,tests/test_schema_converter.py) [1] [2] [3] [4] [5]⚠️ Please install the
to ensure uploads and comments are reliably processed by Codecov.
Codecov Report
✅ All modified and coverable lines are covered by tests.
📢 Thoughts on this report? Let us know!