hubspot-cms-vscode
hubspot-cms-vscode copied to clipboard
Support for different JSON files
trafficstars
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
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"
}
]