angular / angular/angular-cli

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

Đang mở
#11,479 22 bình luận 26 reaction 0 người được giao Xem trên GitHub
area: @angular-devkit/core freq2: medium needs: investigation severity1: confusing type: bug/fix
Ngôn ngữ chính
TypeScript
Star
27k
Fork
11.8k
Merge trung bình
14 giờ 23 phút
Pull request đã merge (30 ngày)
162

Mô tả

### 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).
```

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu bằng cách truy vết quá trình xác thực schema trong `ng build` đối với các tùy chọn build trong `angular.json` được hiển thị trong bản tái hiện. Xác nhận vị trí tùy chọn không hợp lệ được báo cáo và cập nhật chẩn đoán để bao gồm đường dẫn tùy chọn liên quan, sau đó xác minh rằng đầu ra khớp với chức năng mong muốn.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
angular, typescript
Lĩnh vực
build-system, cli
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.