Skip to content

make_response does not work with pydantic #61

@jo-gre

Description

@jo-gre

Setup:

The API I'm working with uses Connexion and Pydantic as return wrapper for type safety.

Problem:

Connexion can handle pydantic classes and is able to parse them into a proper response. I.e. that a normal response could be a single pydantic dataclass object even without any status code. (https://pydantic-docs.helpmanual.io/usage/dataclasses/)
As soon as I use a decorator on such an endpoint the response is 500.

It would be really appreciated if this behavior could be deactivated somehow.

response = make_response(response)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions