Skip to content

Return the Response object when the content type is unspecified #141

Closed
@emann

Description

@emann

Is your feature request related to a problem? Please describe.
Sometimes the content type is unspecified in the OpenAPI doc (For instance, FastAPI's RedirectResponse doesn't convert to a proper response type), leading to functions accessing these endpoints to simply return None upon success.

Describe the solution you'd like
When an endpoint's content type is unspecified, the generated function should just return the Response object. Returning the Response in any case where a successful operation would return None might be a good idea as well as a catch-all. This is different from #115, as this only applies to certain endpoints and would just return the raw Response object as there is nothing else (schemas etc) to access.

Additional context
In my specific case, I have an endpoint that redirects to a download, and I am unable to use the generated function for said endpoint to download the file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions