json-model
json-model copied to clipboard
Uncaught Error: URL fragments not allowed in create()
having
rootschema = {
"id": "root.json",
"person": {
"id": "#personDetails",
"type": "object",
"properties": {
"firstName": {
"type": "string"
},
"lastName": {
"type": "string"
},
"age": {
"type": "number"
}
},
"required": ["firstName", "lastName"]
},
"addr": {
"id": "#addressDetails",
"type": "object",
"properties": {
"street": {
"type": "string"
},
"city": {
"type": "string"
}
},
"required": ["street", "city"]
},
"peraddr": {
"id": "#personWithAddress",
"allOf": [{
"$ref": "#/person"
}, {
"$ref": "#/addr"
}]
}
}
var model = JsonModel.create(data, 'root.json#personWithAddress', rootschema, function(){
...
})
i get an
Uncaught Error: URL fragments not allowed in create()
why not allowed?