{"record":{"id":"6d4b31577d85285b","repo":"ComposioHQ/composio","slug":"invalid-property-type-p-type-schema-r","errorCode":null,"errorMessage":"Invalid property type {p_type}: {schema!r}","messagePattern":"Invalid property type (.+?): (.+?)","errorType":"exception","errorClass":"InvalidSchemaError","httpStatus":null,"severity":"error","filePath":"python/composio/utils/openapi.py","lineNumber":68,"sourceCode":"                for member in p_type\n            )\n        ]\n\n    if p_type in OPENAPI_TO_PYTHON:\n        return OPENAPI_TO_PYTHON[p_type]\n\n    if p_type == \"object\":\n        return _handle_object_type(schema=schema)\n\n    if p_type == \"array\":\n        return _handle_array_type(schema=schema)\n\n    if p_type is None:\n        # No type specified (e.g. a combiner option that is description-only or\n        # an explicit Any), mirroring the top-level fallback below.\n        return t.Any\n\n    raise InvalidSchemaError(f\"Invalid property type {p_type}: {schema!r}\")\n\n\ndef _handle_composite_type(schemas: t.List[t.Dict]) -> t.Any:\n    if not schemas:\n        # An empty oneOf/anyOf has no options to union; fall back to Any.\n        return t.Any\n    return t.Union[tuple(map(_type_to_parameter, schemas))]\n\n\ndef _one_of_to_parameter(schema: t.Dict[str, t.Any]) -> t.Any:\n    return _handle_composite_type(schemas=schema[\"oneOf\"])\n\n\ndef _any_of_to_parameter(schema: t.Dict[str, t.Any]) -> t.Any:\n    return _handle_composite_type(schemas=schema[\"anyOf\"])\n\n\ndef _all_of_to_parameter(schema: t.Dict[str, t.Any]) -> t.Type:","sourceCodeStart":50,"sourceCodeEnd":86,"githubUrl":"https://github.com/ComposioHQ/composio/blob/64b1b85502b1beeb2379e6c9e8bf1104504fa637/python/composio/utils/openapi.py#L50-L86","documentation":"The OpenAPI→schema converter encountered a property 'type' value it cannot map to a Python type annotation (not string/integer/number/boolean/array/object/file/None) and raises InvalidSchemaError.","triggerScenarios":"function_signature_from_jsonschema / _type_to_parameter receiving a schema dict whose 'type' is an unexpected value (e.g. 'float64', 'timestamp', a list of types not handled by _handle_array_type, or a custom vendor string).","commonSituations":"Hand-written OpenAPI specs with non-standard type names; third-party OpenAPI documents using vendor extension types; format confused with type (type: 'date-time').","solutions":["Normalize the spec so type is one of the standard JSON Schema primitives before conversion","Move non-standard type info into 'format' (e.g. type: string, format: date-time)","Omit 'type' entirely for combiner/description-only nodes — the converter falls back to Any"],"exampleFix":"# before\n{\"name\": \"when\", \"type\": \"date-time\"}\n# after\n{\"name\": \"when\", \"type\": \"string\", \"format\": \"date-time\"}","handlingStrategy":"validation","validationCode":"ALLOWED = {'string','integer','number','boolean','array','object','file',None}\ndef types_ok(node):\n    if isinstance(node, dict):\n        if node.get('type') is not None and node['type'] not in ALLOWED and not isinstance(node['type'], list):\n            return False\n        return all(types_ok(v) for v in node.values())\n    if isinstance(node, list): return all(types_ok(v) for v in node)\n    return True\nassert types_ok(spec), 'non-standard type values in spec'","typeGuard":null,"tryCatchPattern":"from composio.exceptions import InvalidSchemaError\ntry:\n    sig = function_signature_from_jsonschema(schema)\nexcept InvalidSchemaError as e:\n    normalize_types(schema)  # rewrite vendor types to format\n    sig = function_signature_from_jsonschema(schema)","preventionTips":["Keep type limited to JSON Schema primitives; use format for variants","Validate third-party OpenAPI specs with a linter before conversion"],"tags":["openapi","json-schema","type-mapping","python"],"backgroundTag":"openapi-invalid-type","analyzedSha":"64b1b85502b1beeb2379e6c9e8bf1104504fa637","analyzedAt":"2026-08-28T15:39:33.623Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}