Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork258
Represent empty responses as None#799
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
When I specify no content for a response, I would expect to generate a Currently, I work against an api that has a few endpoints returning no data (that could be with status code 200 or status code 204). When I generate a client with this project, this endpoint will not have a I think, the problem manifests here:
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
Here is a link with documentation on handling empty responses and any type:https://swagger.io/docs/specification/data-models/data-types/ According to that, the difference is having either no |
BetaWas this translation helpful?Give feedback.
All reactions
Replies: 1 comment 1 reply
-
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 |
BetaWas this translation helpful?Give feedback.
All reactions
-
It seems that somehow this got implemented along the way. It is indeed a bit scary that "success" and "unexpected status" return the same thing. Although the |
BetaWas this translation helpful?Give feedback.
All reactions
This discussion was converted from issue #770 on August 13, 2023 00:22.