From 82feea0ab1329fcd09cd0dce8f040405a2e2c15e Mon Sep 17 00:00:00 2001 From: Fred Sonnenwald Date: Mon, 15 Sep 2025 16:46:30 +0100 Subject: [PATCH] Fix string Field deprecation warning (partial revert of fbbff0b) --- jambo/parser/string_type_parser.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jambo/parser/string_type_parser.py b/jambo/parser/string_type_parser.py index f8d0c9e..0cd3aa1 100644 --- a/jambo/parser/string_type_parser.py +++ b/jambo/parser/string_type_parser.py @@ -19,7 +19,6 @@ class StringTypeParser(GenericTypeParser): "maxLength": "max_length", "minLength": "min_length", "pattern": "pattern", - "format": "format", } format_type_mapping = { @@ -63,4 +62,8 @@ class StringTypeParser(GenericTypeParser): if format_type in self.format_pattern_mapping: mapped_properties["pattern"] = self.format_pattern_mapping[format_type] + if "json_schema_extra" not in mapped_properties: + mapped_properties["json_schema_extra"] = {} + mapped_properties["json_schema_extra"]["format"] = format_type + return mapped_type, mapped_properties -- 2.49.1