marshmallow-jsonschema
marshmallow-jsonschema copied to clipboard
Skip title if either fields are None
Addresses #87
Because of lack of support of doubly (or more) nested schemas, some title
s get rendered as null
which breaks JSON schema validation. This PR simply skips title
if field.attribute
or field.name
are None
Coverage remained the same at 100.0% when pulling eab1de0a0ae5676b3a3f02598d546b42e60b4db2 on yeralin:fix-doubly-nested-null-titles into 47418df6fe7d618c54d24433e471435875459f2c on fuhrysteve:master.
Coverage decreased (-1.6%) to 98.44% when pulling 4f563ad2f377acad875b10ac687510cffc2a6cc3 on yeralin:fix-doubly-nested-null-titles into 307a911c38a4d827d06794a04f29794fee788c4a on fuhrysteve:master.
The build is failing because tox
is installing marshmallow-jsonschema==0.7.0
that does not contain recently merged change from #86
After a new version is released, the build is supposed to pass.
Hmmm even after a new release, the build is still failing... I also added an extra test case, but the coveralls are still -1.8% :(
Hi @yeralin! The build is failing because of a subtle bug that was introduced in previous PRs. See #102 for details. I'm afraid that we'll have to wait until that PR fixes master, and only then you can rebase your branch and have clean builds.
I think that your solution works just fine: it maintains backward compatibility and in my opinion we will need to drop Python 2 support and Marshmallow 2 support very soon anyway.