diff --git a/flask_restx/fields.py b/flask_restx/fields.py index 97957f7f..2526fa9d 100644 --- a/flask_restx/fields.py +++ b/flask_restx/fields.py @@ -323,6 +323,9 @@ def format(self, value): if isinstance(value, set): value = list(value) + if not isinstance(value, list) and hasattr(value, "__iter__"): + value = [i for i in value] + is_nested = isinstance(self.container, Nested) or type(self.container) is Raw def is_attr(val):