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
When I generate a client with this project, this endpoint will not have a sync or async method, but only the sync_detailed and async_detailed. This works, but it looks weird because for all other methods I use sync/async. I would be great to have them implemented to return None (like a void/unit method in python).
The sync method is only generated if the return type is not any - which makes sense. But I think, the return type here is not actually Any - but None. The response type comes from here:
According to that, the difference is having either no content field for empty responses and having a content field defined with an empty object for any type.
I think the trouble here is that there would be no easy way to tell whether or not a request had failed from the non-detailed method unless you set raise_on_unexpected_status to True in the client. It seems like that would provide an easy way for API consumers to accidentally miss failures, unless I'm missing something.
Activity
dbanty commentedon Jul 7, 2023
I think the trouble here is that there would be no easy way to tell whether or not a request had failed from the non-detailed method unless you set
raise_on_unexpected_statustoTruein the client. It seems like that would provide an easy way for API consumers to accidentally miss failures, unless I'm missing something.