-
Notifications
You must be signed in to change notification settings - Fork 72
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
Provide option to use data keys as property name and title #65
base: master
Are you sure you want to change the base?
Conversation
Relates to #64 |
Code coverage reduced because data_keys vs load_from / dump_to behavior differs between marshmallow 2 v 3. One statement has been added to differentiate between marshmallow version for this purpose. Current testing does not seem to work for marshmallow v3. Is there a recommended way to test a library across multiple versions of a dependency? |
Also, I will add example of this functionality to readme if this will be merged |
setup.py
Outdated
@@ -23,7 +23,7 @@ def read(fname): | |||
package_dir={'marshmallow-jsonschema': 'marshmallow-jsonschema'}, | |||
include_package_data=True, | |||
install_requires=['marshmallow>=2.9.0'], | |||
tests_require=['pytest>=2.9.2', 'jsonschema', 'strict-rfc3339', 'coverage>=4.1'], | |||
tests_require=['pytest>=2.9.2', 'jsonschema<=2.5.1', 'strict-rfc3339', 'coverage>=4.1'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh boy - what's all this now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
something like 11 tests failed with jsonschema==2.6.0 - I can check again and validate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've removed this - tests work without the change.
Looking good! I'll spend some time looking it over later this week! |
fix build and make test suite compatible with marshmallow 2 and 3
provide option to use data_keys or load_from and dump_to as title
Use as JSONSchema(prefer_data_key=True) to enable