Skip to content
Advertisement

Tag: marshmallow

Flask-Restx not converting enum field type to JSON

I need help with Enum field type as it is not accepted by Swagger and I am getting error message **TypeError: Object or Type eGameLevel is not JSON serializable**. Below is the complete set of code for table. Complete set of code with DB table and sqlalchemy settings is provided. I already tried it with Marshmallow-Enum Flask package and it

Using input parameters for validation with marshmallow

Is it possible to pass parameters to a marshmallow schema to use for validation on load? I have the following schema: and I’m wondering whether, instead of typing “a”, “b”, “c”, I could put parameters in there? Something like except this doesn’t work because the following error comes up on import Any other ideas? Answer No, marshmallow Schema doesn’t do

Advertisement