From bd72e0d5741f48acc39f637cebd1e615482bf30b Mon Sep 17 00:00:00 2001 From: = <=> Date: Thu, 19 Jan 2023 09:29:16 -0500 Subject: [PATCH] fix for typed arrays --- pydantic/json_schema.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pydantic/json_schema.py b/pydantic/json_schema.py index 903b9c1..74684ec 100644 --- a/pydantic/json_schema.py +++ b/pydantic/json_schema.py @@ -97,9 +97,10 @@ def get_schema_property_json(field_name: str, inner_schema_field: Dict[str, Any] # If only one type was found, shorten it (not an array). properties['type'] = types[0] if len(types) == 1 else types + print(inner_schema_field) # Include typed array support. if items: - properties['items'] = items + properties['items'] = {'type': items} return properties