Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use Schema's render_module? #529

Open
Anti-Distinctlyminty opened this issue Aug 3, 2023 · 0 comments
Open

How to use Schema's render_module? #529

Anti-Distinctlyminty opened this issue Aug 3, 2023 · 0 comments
Labels

Comments

@Anti-Distinctlyminty
Copy link

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?

@Anti-Distinctlyminty Anti-Distinctlyminty changed the title render_module in SQLAlchemyAutoSchema How to use Schema's render_module? Aug 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants