You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I got Unable to render schema and I had to tweak the library code to find out which of my 20+ schemas is causing the problem. By tweaking, I mean just printing out schemas in swagger.py's serialize_definitions(self) to until I receive an error. It would be less frustrating if the library directly told the name of my schema.
Here is the full traceback:
Unable to render schema
Traceback (most recent call last):
File "/home/ve/lib/python3.12/site-packages/flask_restx/api.py", line 571, in __schema__
self._schema = Swagger(self).as_dict()
^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ve/lib/python3.12/site-packages/flask_restx/swagger.py", line 304, in as_dict
"definitions": self.serialize_definitions() or None,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ve/lib/python3.12/site-packages/flask_restx/swagger.py", line 661, in serialize_definitions
print(model.__schema__)
^^^^^^^^^^^^^^^^
File "/home/ve/lib/python3.12/site-packages/flask_restx/model.py", line 68, in __schema__
schema = self._schema
^^^^^^^^^^^^
File "/home/ve/lib/python3.12/site-packages/flask_restx/model.py", line 151, in _schema
properties[name] = field.__schema__
^^^^^^^^^^^^^^^^
File "/home/ve/lib/python3.12/site-packages/werkzeug/utils.py", line 107, in __get__
value = self.fget(obj) # type: ignore
^^^^^^^^^^^^^^
File "/home/ve/lib/python3.12/site-packages/flask_restx/fields.py", line 217, in __schema__
return not_none(self.schema())
^^^^^^^^^^^^^
File "/home/ve/lib/python3.12/site-packages/flask_restx/fields.py", line 442, in schema
enum = self._v("enum")
^^^^^^^^^^^^^^^
File "/home/ve/lib/python3.12/site-packages/flask_restx/fields.py", line 213, in _v
return value() if callable(value) else value
^^^^^^^
TypeError: EnumType.__call__() missing 1 required positional argument: 'value'
The text was updated successfully, but these errors were encountered:
I got
Unable to render schema
and I had to tweak the library code to find out which of my 20+ schemas is causing the problem. By tweaking, I mean just printing out schemas in swagger.py's serialize_definitions(self) to until I receive an error. It would be less frustrating if the library directly told the name of my schema.Here is the full traceback:
The text was updated successfully, but these errors were encountered: