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
We are generated schema automatically from java pojos using jackson libraries. in that library boolean values automatically get "required", which makes sense as in java this is a primitive and so cannot contain null.
Unfortunately, forms are now generating with a checkbox that only allows "true" as the value. This appears new as it did not occur in prior versions of angular-schema-form. Also, I don't believe this matches the schema where required would allow true or false but not null.
@json-schema-form/angular-schema-form-lead
The text was updated successfully, but these errors were encountered:
Rereading my post, apologies if my ranting is unclear. So to clarify, the schema below has "myBoolean" as a required field. The generated form using the default form ["*"] displays an error when the checkbox is empty even though the underlying json value is set to false, which is valid according to the schema. This started occurring after upgrading to the latest download.
{"$schema":"http://json-schema.org/draft-04/schema#",
"title":"my_schema",
"type":"object",
"additionalProperties":true,
"properties":{
"myArray":{"type":"array","items":{"type":"string","pattern":"^\d+$"},
"description":"string of numbers","title":"numbers"},
"myBoolean":{"type":"boolean","description":"If true, do something","title":"Do Something"}},
"required":["myArray","myBoolean"]}}
This is ready to be released in the next alpha as it was a logic fail when I moved Angular specific code into the core and replaced it with code that wasn't identical.
We are generated schema automatically from java pojos using jackson libraries. in that library boolean values automatically get "required", which makes sense as in java this is a primitive and so cannot contain null.
Unfortunately, forms are now generating with a checkbox that only allows "true" as the value. This appears new as it did not occur in prior versions of angular-schema-form. Also, I don't believe this matches the schema where required would allow true or false but not null.
@json-schema-form/angular-schema-form-lead
The text was updated successfully, but these errors were encountered: