For some reason angular.json (@angular/[email protected]
) schema is not loaded by WebStorm 2020.1.2. This makes customizing angular.json much harder. This was working in older WebStorm version.
I tried adding the angular.json schema manually, still no success there. Check the attached image bellow.
How to make angular.json schema work in WebStorm 2020.1.2?
To add an Angular JSON schema in IDEA/WebStorm 2020.2:
Go to: File | Settings | Languages & Frameworks | Schemas and DTDs | JSON Schema Mappings.
In the upper left corner, click on + to add a new schema.
Provide a schema name.
In Schema file or URL, set: https://raw.githubusercontent.com/angular/angular-cli/master/packages/angular/cli/lib/config/schema.json
.
In Schema version, set JSON Schema version 7.
On the right side of the Settings window, click on + to add all JSON files, which should be processed with this JSON schema:
Press Apply.
That's all! Now IDEA/WebStorm will process your JSONs with the Angular JSON schema including the code suggestions and schema validation:
It's also possible to assign a JSON schema via the bottom right corner, click on No JSON schema and select the schema name, you've provided in the step #3: