marshmallow-jsonschema icon indicating copy to clipboard operation
marshmallow-jsonschema copied to clipboard

Skip title if either fields are None

Open yeralin opened this issue 5 years ago • 5 comments

Addresses #87

Because of lack of support of doubly (or more) nested schemas, some titles get rendered as null which breaks JSON schema validation. This PR simply skips title if field.attribute or field.name are None

yeralin avatar Oct 03 '19 18:10 yeralin

Coverage Status

Coverage remained the same at 100.0% when pulling eab1de0a0ae5676b3a3f02598d546b42e60b4db2 on yeralin:fix-doubly-nested-null-titles into 47418df6fe7d618c54d24433e471435875459f2c on fuhrysteve:master.

coveralls avatar Oct 03 '19 18:10 coveralls

Coverage Status

Coverage decreased (-1.6%) to 98.44% when pulling 4f563ad2f377acad875b10ac687510cffc2a6cc3 on yeralin:fix-doubly-nested-null-titles into 307a911c38a4d827d06794a04f29794fee788c4a on fuhrysteve:master.

coveralls avatar Oct 03 '19 18:10 coveralls

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.

yeralin avatar Oct 03 '19 20:10 yeralin

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% :(

yeralin avatar Oct 29 '19 13:10 yeralin

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.

atmo avatar Dec 28 '19 20:12 atmo