fix(jambo): Fix allOf, anyOf, null and array type parsing #33

Closed
thommann wants to merge 10 commits from main into main

10 Commits

Author SHA1 Message Date
Thomas
545ec8dda7 chore(jambo): Clean up __future__ typing (#10)
* Replace forward-referenced strings with direct type annotations in `json_schema_type.py`.

* refactor(ref_type_parser): eliminate unused future annotations import
2025-07-08 16:50:53 +02:00
Thomas
9c598eeacc fix(jambo): Update legacy typing to built in types (#9)
* Migrate from `typing_extensions` to `typing` for supported Python versions, and update code to use modern type hinting with unions and annotations.

* Update type hinting to use lowercase generics for Python 3.9+ compatibility.
2025-07-08 16:41:09 +02:00
Thomas
8dbe84fd1c chore(jambo): Remove redundant comments and docstrings (#8)
* Remove redundant comments in type parsers and tests

* Clean up redundant comments in `test_oneof_type_parser.py`

* Remove redundant comments across parsers and tests
2025-07-08 09:06:07 +02:00
Thomas
053279ba95 fix(jambo): Add support for file-path format in StringTypeParser (#7) 2025-07-07 17:31:33 +02:00
Thomas
45018eadd1 fix(jambo): Add binary string support (#6) 2025-07-07 17:20:45 +02:00
Thomas
c7afb5f80b feat(jambo): Add oneOf parser (#5)
* Add support for `oneOf` type parsing with validation and example cases

* Improve `oneOf` type parsing: refine validators, add discriminator support, and expand test coverage

* Add hashable and non-hashable value support to `ConstTypeParser` with expanded test cases

* Refine `field_props` check in `_type_parser` for cleaner default handling

* Update `StringTypeParser` to refine `format` handling and enrich `json_schema_extra`

* Remove outdated `oneOf` examples from docs, expand test cases and provide refined examples with discriminator support
2025-07-07 15:49:58 +02:00
Thomas
06a5ef71ca fix(jambo): Fix required array fields without defaults (#4)
- Adds a test to ensure required array fields without defaults are enforced as required.
- Updates `ArrayTypeParser` to correctly handle `default_factory` for required fields and fields with defaults.
2025-07-04 12:04:37 +02:00
Thomas
0c4de62bba fix(jambo): skip Annotated wrapping for trivial anyOf field constraints (#3) 2025-07-04 11:56:29 +02:00
Thomas
7c1278af16 fix(jambo): Add NullTypeParser implementation and tests (#2) 2025-07-04 11:24:56 +02:00
Thomas
cbcb56c3c4 fix(jambo): Fix allOf constraints (#1)
* Fix incorrect min/max length handling in allOf type parser and update tests accordingly

* Fix schema converter test to correct allOf handling
2025-07-04 11:00:06 +02:00