luposlip / json-schema

Clojure library JSON Schema validation and generation - Draft-07 compatible
Apache License 2.0
72 stars 7 forks source link

Nullable infer on array type doesn't add null type #6

Open luposlip opened 4 years ago

luposlip commented 4 years ago

If a set of documents being inferred have a vector of documents, but one document sets this to nil, the resulting inferred schema doesn't add type :null to the generated type.

I.e. the result is :type #{:array}, and not as expected :type #{:array :null}.

This works for other types. Question: Is it because of the initial array type, because the first document used to infer has a nil value, or because of some nested property?

luposlip commented 8 months ago

This need to be re-tested with v0.4.3.