Schema validation failed: Data path "" should NOT have additional properties
- 主要语言
- TypeScript
- 星标
- 27k
- 派生
- 11.8k
- 平均合并
- 14 小时 23 分钟
- 30 天内合并 PR
- 162
描述
### Bug Report or Feature Request (mark with an `x`)
```
- [x] bug report -> please search issues before submitting
- [ ] feature request
```
### Area
```
- [ ] devkit
- [x] schematics
```
### Versions
```
Angular CLI: 6.0.8
Node: 8.11.2
OS: win32 x64
Angular: 6.0.7
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.6.8
@angular-devkit/build-angular 0.6.8
@angular-devkit/build-optimizer 0.6.8
@angular-devkit/core 0.6.8
@angular-devkit/schematics 0.6.8
@angular/cli 6.0.8
@ngtools/webpack 6.0.8
@schematics/angular 0.6.8
@schematics/update 0.6.8
rxjs 6.2.1
typescript 2.7.2
webpack 4.8.3
```
### Repro steps
1. Add `projects/architect//options/invalid` options to `options` in `angular.json` eg
```
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"invalid": "value",
...
}
}
```
2. Run `ng build`
### Actual functionality
```
Schema validation failed with the following errors:
Data path "" should NOT have additional properties(invalid).
```
### Desired functionality
```
Schema validation failed with the following errors:
Data path "path/to/invalid/option" should NOT have additional properties(invalid).
```
贡献指南
调研方向
首先,针对复现中显示的 `angular.json` 构建选项,跟踪 `ng build` 期间的 schema 验证过程。确认无效选项是在何处报告的,并更新诊断信息,使其包含相关选项路径,然后验证输出是否符合所需功能。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- angular, typescript
- 领域
- build-system, cli
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100