marshmallow-sqlalchemy
marshmallow-sqlalchemy copied to clipboard
How to use Schema's render_module?
I am trying to use jsonref in place of the json module in a schema so that I can use json references. I have tested the jsonref module and it works just fine, however I am using it as follows in a schema
import jsonref
class BodySchema(Schema):
class Meta:
render_module = jsonref
partial = True
unknown = INCLUDE
...
# flask-smorest stuff
bp = Blueprint(...)
@bp.route("<int:model_id>/submit")
class ModelInstanceResource(MethodView):
@bp.arguments(
BodySchema,
location="json",
as_kwargs=True,
)
def post(self, **kwargs):
pass
Unfortunately it just does not work, as $refs are not resolved.
Am I doing something wrong here?