Open busoff opened 2 years ago
flask-restx does not support marshalling using JSON schemas afaik.
Here's an example where the JSON schemas are used for documentation, and normal api.model
for marshalling: https://github.com/ActivityWatch/aw-server/blob/master/aw_server/rest.py#L74
I suggest you change the issue title to: "Using SchemaModel
with marshal_with
not supported"
Actually, this is a duplicate of: https://github.com/python-restx/flask-restx/issues/142
I followed the documentation to use JSON schema as model, but I encountered the error described as below.
Code
Repro Steps
Expected Behavior
The flask application shall return a JSON response
{'name': 'foo', 'age': 33}
Actual Behavior
The flask application returns
500
error codeError Messages/Stack Trace
(venv) ➜ webconfig git:(master) ✗ python app.py
Environment