Closed Vaevictus closed 8 years ago
http://brutusin.org/json-forms/#11 is throwing this error on your demo page also
Hello, thanks for reporting this. Probably @ocschwar can help us here.
Regarding your questions:
The bug is on line 861
function getDefinition(path) {
var parts = path.split('/');
var def = root;
for (var p in parts) {
if (p === 0) <<<<<HERE
continue;
def = def[parts[p]];
}
return def;
}
the type comparison === is returning false because p is "0" not 0 so the loop does not skip the first key/value pair of the path to the definition.
fixing that the form now renders although my selects are messed up but think that's another issue altogether
Thanks fixed
I'm trying out many of the json schema form generators out there and yours looks like the most flexible. Just testing out your demo page I am getting errors in generating a form based on my following schema:
the schema itself is validated as a valid json4 schema by http://jsonschemalint.com/draft4/#
Do you not fully support Json4 schemas?
Also, do you support loading externally referenced schemas using ajax and $ref?