First of all this library is awesome, thanks for all of your hard work.
I have a schema with an anyOf with the sole purpose of being used for validation, specifically validating that one or another property is present in the model. When VSJF tries to render this, the form is never created and I see this stack trace:
loggingService.js?63fe:29 TypeError: Cannot convert undefined or null to object
at Function.keys (<anonymous>)
at VueComponent.subSchemasConstProp (main.js?530e:2:42034)
at Watcher.get (vue.esm.js?deef:4504:1)
at Watcher.evaluate (vue.esm.js?deef:4606:1)
at VueComponent.computedGetter [as subSchemasConstProp] (vue.esm.js?deef:4860:1)
at VueComponent.renderObjectContainer (main.js?530e:2:49284)
at Proxy.render (main.js?530e:2:134921)
at Vue._render (vue.esm.js?deef:3578:1)
at VueComponent.updateComponent (vue.esm.js?deef:4090:1)
at Watcher.get (vue.esm.js?deef:4504:1)
Looking at the source code based on the error, it appears that the function subSchemasConstProp() expects that the anyOf sub-schema will have a properties object and blows up when calling Object.keys() with a null object.
As a work around, I am going to investigate a different way of writing the json schema to achieve the same validation results.
First of all this library is awesome, thanks for all of your hard work.
I have a schema with an anyOf with the sole purpose of being used for validation, specifically validating that one or another property is present in the model. When VSJF tries to render this, the form is never created and I see this stack trace:
Here is my schema:
I've been able to reproduce this here: https://codepen.io/pdennistech/pen/BarWjGx
Looking at the source code based on the error, it appears that the function subSchemasConstProp() expects that the anyOf sub-schema will have a properties object and blows up when calling Object.keys() with a null object.
As a work around, I am going to investigate a different way of writing the json schema to achieve the same validation results.