You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have detected differences between input and output JSON schemas: Output schemas
objects should have the required: [ <required keys list>] property because after serialization they are guarranteed to exist.
arrays that come from tuples should also have the minItems set to the same value of maxItems property because the tuple will always serialize with full length.
Input schemas
My understanding of the library is not deep enough but I guess due to partial parsing input schemas for objects do not have the required property.
In a recent pull jsonchema prefixItems for tuples and arrays #2461 you added the maxItems for tuple parsing but did not include the minElements because glaze supports partial parsing (I don't find that anymore but I think I have read it)
I think we should make this difference explicit and pass an option to whether we want the input or output JSON schema of a C++ struct because strictly speaking they are different since output has other guarrantees than input has requirements.
I have detected differences between input and output JSON schemas:
Output schemas
required: [ <required keys list>]property because after serialization they are guarranteed to exist.minItemsset to the same value ofmaxItemsproperty because the tuple will always serialize with full length.Input schemas
requiredproperty.maxItemsfor tuple parsing but did not include theminElementsbecause glaze supports partial parsing (I don't find that anymore but I think I have read it)I think we should make this difference explicit and pass an option to whether we want the input or output JSON schema of a C++ struct because strictly speaking they are different since output has other guarrantees than input has requirements.