Skip to content

Commit b555efc

Browse files
authored
default to any if type not found in schema (#1888)
2 parents 29e1a3b + e2b342d commit b555efc

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

python/composio/utils/openapi.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,10 @@ def function_signature_from_jsonschema(
8787
elif "type" in p_schema:
8888
p_type = _type_to_parameter(schema=p_schema)
8989
else:
90-
raise InvalidSchemaError(f"Invalid property object {p_name}: {p_schema!r}")
90+
# Handle cases where no type is specified (e.g., Pydantic's Any type)
91+
# This typically happens when using typing.Any in Pydantic models,
92+
# which intentionally omits the 'type' field in JSON schema
93+
p_type = t.Any
9194

9295
p_val = p_schema.get("default", None)
9396
if p_name in required or p_schema.get("required", False) or skip_default:

0 commit comments

Comments
 (0)