
In the generated ApiClient.send method, TypeAdapter(type_) will raise a PydanticUserError if type_ is None. This occurs for API endpoints that return no content (e.g., 204 No Content). Additionally, the method should return None when type_ is None to remain consistent with the method's overloads.
if type_ is None:
return None
adapter = TypeAdapter(type_)
if type_ == bytes:
return adapter.validate_python(response.content)
return adapter.validate_python(response.json())
Originally posted by @gemini-code-assist[bot] in #86 (comment)
In the generated
ApiClient.sendmethod,TypeAdapter(type_)will raise aPydanticUserErroriftype_isNone. This occurs for API endpoints that return no content (e.g., 204 No Content). Additionally, the method should returnNonewhentype_isNoneto remain consistent with the method's overloads.Originally posted by @gemini-code-assist[bot] in #86 (comment)