Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for different JSON files #72

Open
anthmatic opened this issue Sep 15, 2020 · 1 comment
Open

Support for different JSON files #72

anthmatic opened this issue Sep 15, 2020 · 1 comment

Comments

@anthmatic
Copy link
Contributor

anthmatic commented Sep 15, 2020

We can use https://code.visualstudio.com/api/references/contribution-points#contributes.jsonValidation to help devs make sure their JSON files contain any needed properties / types.

Another reference for this issue: https://ajv.js.org/guide/managing-schemas.html#re-using-validation-functions

@erik4github
Copy link

Would love to have this for fields.json, esp. since the docs don't seem to cover every field. The example given here has "default" in the list of fields used in all fields, but it's not listed in the type below it.

I've been using a basic workaround by having a JSON schema file on my computer and referencing it in vscode settings like

    "json.schemas": [
        {
            "fileMatch": [
                "**/*.module/fields.json"
            ],
            "url": "./module-schema.json"
        }
    ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants