Open dlaugh14 opened 6 years ago
The items object should not be an array. This schema is not correct.
Did you mean the oneOf array? In this case, take a look at this issue: https://github.com/makinacorpus/angular2-schema-form/issues/198
That schema is valid array tuple, as per https://json-schema.org/understanding-json-schema/reference/array.html?highlight=tuple#tuple-validation
Facing the same problem with a similar schema.
Many thanks for the correction, especially after this long time! The question is now rather whether this is supported...
Schema -
{ "type": "object", "title": "Types", "properties": { "termsAndConditions": { "type": "array", "items": [ { "type": "object", "properties": { "choice": { "type": "boolean", "title": "I agree to receive an autodialed call from an agent who can help me schedule my service installation:", "enum": [ true ] } }, "required": [ "choice" ] }, { "type": "object", "properties": { "choice": { "type": "boolean", "title": "Second agreement" } }, "required": [ "choice" ] } ], "minItems": 2, "maxItems": 2 } }, "required": [ "termsAndConditions" ] };
This schema seems to come back as a button. We're considering using this library, but our team needs to be able to dynamically insert data into the schema via an array. Is it possible to get this to display or what changes need to be made. The above example would be two agreement checkboxes.