You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
RestApiTool crashes on a request body media type that has no schema #7838
Describe the Bug:
A RestApiTool whose request body declares a media type without a schema (OpenAPI allows content: {application/octet-stream: {}}) crashes when called:
AttributeError: 'NoneType' object has no attribute 'type'
OperationParser handles this case: it normalizes the schema with _schema_from_openapi, where None becomes Schema(), and exposes a single body parameter. RestApiTool._prepare_request_params then reads media_type_object.schema_ raw and calls .type on None. So the tool is generated and offered to the model, but every call fails. mypy already reports these lines (Item "None" of "Schema | Reference | Any | None" has no attribute "type").
For triage: #7839 has been open for this since the issue was filed (Oct 29, 19:08 UTC). #7848 was opened about three hours later for the same bug. Happy to consolidate however you prefer.
Activity
adityasingh2400 commentedon Oct 31, 2026
For triage: #7839 has been open for this since the issue was filed (Oct 29, 19:08 UTC). #7848 was opened about three hours later for the same bug. Happy to consolidate however you prefer.