json-model icon indicating copy to clipboard operation
json-model copied to clipboard

Uncaught Error: URL fragments not allowed in create()

Open aleclofabbro opened this issue 11 years ago • 0 comments

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?

aleclofabbro avatar Oct 25 '14 22:10 aleclofabbro