fuhrysteve / marshmallow-jsonschema

JSON Schema Draft v7 (http://json-schema.org/) formatting with marshmallow
MIT License
209 stars 72 forks source link

Fix to enable compatibility with brutusin/json-forms v1.6.3 #44

Closed xlevus closed 5 years ago

xlevus commented 7 years ago

It looks like json-forms doesn't make any accomodations for multiple types [1]. Resulting in Nested(multiple=True) schemas not rendering (as of json-forms v1.6.3).

This small change keeps generated schemas valid, and enables some level of compatibility.

Admittedly, This doesn't solve the issue when required=False on nested fields, but I'm not a competent JS developer, and can't submit a PR for json-forms.

[1] https://github.com/brutusin/json-forms/blob/fcd15f14a7e97003efb12a6b70856c8c582a077b/src/js/brutusin-json-forms.js#L1090

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling 8e23501f90c182b720e2d950890df567702c65ae on xlevus:fix/array-objects into e6a6bcec14f2ff72e8a404c396673fa86b7a452c on fuhrysteve:master.