Skip to content

Implicit JSON Schema Support #358

Closed
Closed

Description

@grant

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"
}

Activity

  1. NGTmeaty commented on Mar 27, 2019

    @NGTmeaty
    Contributor

    probably should fix this upstream?

  2. grant commented on Mar 27, 2019

    @grant
    Author

    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.

  3. grant commented on Mar 27, 2019

    @grant
    Author

    I've filed this issue for adding a way to access Preferences > Settings via the menu bar: #359

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementSome improvement that isn't a feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions