Final Working Pydantics Validations

This commit is contained in:
2025-04-09 21:37:58 -03:00
parent 63dc0de4b2
commit 6ea5d204ae
2 changed files with 62 additions and 11 deletions

View File

@@ -21,9 +21,12 @@ class ArrayTypeParser(GenericTypeParser):
).from_properties(name, properties["items"])
_mappings = {
"maxItems": "max_items",
"minItems": "min_items",
"uniqueItems": "unique_items",
"maxItems": "max_length",
"minItems": "min_length",
}
return list[_item_type], mappings_properties_builder(properties, _mappings)
wrapper_type = set if properties.get("uniqueItems", False) else list
return wrapper_type[_item_type], mappings_properties_builder(
properties, _mappings
)