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

Pass marshmallow context into nested schema #160

Merged
merged 2 commits into from
Dec 2, 2021

Conversation

ghostwheel42
Copy link
Contributor

@ghostwheel42 ghostwheel42 commented Nov 5, 2021

also pass context to nested schema

this allows to create a json schema for a (nested) context-sensitive schema

closes #138

@coveralls
Copy link

coveralls commented Nov 8, 2021

Coverage Status

Coverage remained the same at 99.156% when pulling c04359d on ghostwheel42:pass_context_to_nested into 16cb2df on fuhrysteve:master.

@fuhrysteve
Copy link
Owner

It would be awesome if we could have a test case verify that context gets passed correctly! Could probably copy and paste a test case like this one and just add context then verify it gets passed correctly: https://github.com/fuhrysteve/marshmallow-jsonschema/blob/master/tests/test_dump.py#L118

@ghostwheel42
Copy link
Contributor Author

It would be awesome if we could have a test case verify that context gets passed correctly!

Hi. I've added a test case.

@fuhrysteve
Copy link
Owner

Looks good to me! Thanks so much for the PR!!

@fuhrysteve fuhrysteve merged commit 45374be into fuhrysteve:master Dec 2, 2021
@ghostwheel42 ghostwheel42 deleted the pass_context_to_nested branch December 2, 2021 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pass marshmallow context into nested schemas?
3 participants