Closed igoncharov85 closed 1 year ago
I am not particularly familiar with flask-restx, so take my answer with a grain of salt.
From a quick look at the flask-restx docs, it does not appear than marshal_with is expecting a Marshmallow schema as an argument. If that's correct, then I doubt it will work without some adaptation.
Closing, as this isn't a issue.
Can the Schema generated from dataclass be used for flask-restx response serialization? marshal_with
ModelSchema = marshmallow_dataclass.class_schema(ViewModel)()
class SomeResource(Resource): @api.marshal_with(ModelSchema) def get(self): return result # no need to write ModelSchema.dump(result)