Code-server: Implicit JSON Schema Support

Created on 27 Mar 2019  路  3Comments  路  Source: cdr/code-server

Expected

Editors like VS Code support JSON schemas out of the box.

This is done via http://schemastore.org/json/

I expect to not have to provide a $schema to get autocompletion. Just look up the filename.

Pull from the catalog:
API: http://schemastore.org/api/json/catalog.json
SRC: https://github.com/SchemaStore/schemastore/blob/master/src/api/json/catalog.json

(See VSC bug)

Actual

When you create a .json file (i.e. appsscript.json), you must explicity specify the schema

Screen Shot 2019-03-27 at 12 55 53

(Notice only one autocompletion result)

i.e.

{
  "$schema": "http://json.schemastore.org/appsscript"
}

Then you'll get autocompletion.

Screen Shot 2019-03-27 at 12 56 45

{
  "$schema": "http://json.schemastore.org/appsscript",
  "timeZone": "America/New_York",
  "dependencies": {
  },
  "exceptionLogging": "STACKDRIVER"
}
enhancement

Most helpful comment

This should be upstream. I wasn't easily able to find the Settings to solve this.

In VSCode, it's this:

Code > Preferences > Settings

But that will be a different issue.

All 3 comments

probably should fix this upstream?

This should be upstream. I wasn't easily able to find the Settings to solve this.

In VSCode, it's this:

Code > Preferences > Settings

But that will be a different issue.

I've filed this issue for adding a way to access Preferences > Settings via the menu bar: https://github.com/codercom/code-server/issues/359

Was this page helpful?
0 / 5 - 0 ratings

Related issues

justmao945 picture justmao945  路  3Comments

pchecinski picture pchecinski  路  3Comments

RealSlimMahdi picture RealSlimMahdi  路  3Comments

phoenixsfly picture phoenixsfly  路  3Comments

broady picture broady  路  3Comments