angular / angular/angular-cli

Schema validation failed: Data path "" should NOT have additional properties

未關閉
#11,479 22 則留言 26 個 reaction 已指派 0 人 在 GitHub 檢視
area: @angular-devkit/core freq2: medium needs: investigation severity1: confusing type: bug/fix
主要語言
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

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。