123 |
- // This is a generated file. Please do not edit directly.
- var SAMPLES = this.SAMPLES || [];
- SAMPLES.push({"id":"extending-language-services-configure-json-defaults","js":"//---------------------------------------------------\n// Extending Language Services > Configure JSON defaults\n//---------------------------------------------------\n\n// Configures two JSON schemas, with references.\n\nmonaco.languages.json.jsonDefaults.setDiagnosticsOptions({\n\tschemas: [{\n uri: \"http://myserver/foo-schema.json\",\n schema: {\n type: \"object\",\n properties: {\n p1: {\n enum: [ \"v1\", \"v2\"]\n },\n p2: {\n $ref: \"http://myserver/bar-schema.json\"\n }\n }\n }\n },{\n uri: \"http://myserver/bar-schema.json\",\n schema: {\n type: \"object\",\n properties: {\n q1: {\n enum: [ \"x1\", \"x2\"]\n }\n }\n }\n }]\n});\n\n\nvar jsonCode = [\n\t'{',\n\t' \"$schema\": \"http://myserver/foo-schema.json\"',\n\t\"}\"\n].join('\\n');\n\nmonaco.editor.create(document.getElementById(\"container\"), {\n\tvalue: jsonCode,\n\tlanguage: \"json\"\n});","html":"<div id=\"container\" style=\"height:100%;\"></div>\n","css":""});
|