Skip to content

Cannot return non-dictlike object from handler if BASE_RESPONSE_SCHEMA is set #384

@lorenyu

Description

@lorenyu

If BASE_RESPONSE_SCHEMA is set and a non-dict like object is returned from a route, an exception TypeError: argument of type '<type of object>' is not iterable is thrown from scaffold.py when checking if data_key not in obj (the in keyword doesn't work on all objects).

Environment:

  • Python version:
  • Flask version:
  • APIFlask version:

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions