atom-json-editor icon indicating copy to clipboard operation
atom-json-editor copied to clipboard

$refs in schema don't work

Open justinbowes opened this issue 8 years ago • 0 comments

thing.schema.json:

{
    "title": "thing schema",
    "type": "object",
    "properties": {
        "id": {
            "$ref": "id.schema.json"
        }
    },
    "additionalProperties": false
}

Editing a thing:

(path)/thing.schema.json is no valid JSON Must set ajax option to true to load external ref id.schema.json

Additionally, trying to load "mything.thing.json" initially caused the following error in the console:

Uncaught (in promise) ReferenceError: schemeName is not defined
    at file:///C:/Users/dafta/.atom/packages/atom-json-editor/lib/atom-json-editor.coffee:92:39
    at process._tickCallback (node.js:392:9)

I fixed the error in the following line to unmask the $ref problem.

---          atom.notifications.addError schemeName + ' is no valid JSON',
+++          atom.notifications.addError path + ' is no valid JSON',

justinbowes avatar Jun 03 '16 15:06 justinbowes