使用'$id'代替'id'作为模式ID。
示例代码:
在angular.json中使用'$id'代替'id'作为模式ID。
错误代码:
{ "name": "test", "$schema": "http://json-schema.org/draft-07/schema#", "id": "test", "schematics": {} }
修复代码:
{ "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://test.com/schemas/test.json", "title": "Test Schema", "type": "object", "properties": { "name": { "type": "string" } }, "required": [ "name" ] }