Skip to content

Commit 2fa9dfc

Browse files
alan-agius4hansl
authored andcommitted
fix(@angular/cli): fix schema error Property targets is not allowed
Closes #12192
1 parent a7506d1 commit 2fa9dfc

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

packages/angular/cli/lib/config/schema.json

+28
Original file line numberDiff line numberDiff line change
@@ -327,12 +327,40 @@
327327
"additionalProperties": {
328328
"$ref": "#/definitions/project/definitions/target"
329329
}
330+
},
331+
"targets": {
332+
"type": "object",
333+
"additionalProperties": {
334+
"$ref": "#/definitions/project/definitions/target"
335+
}
330336
}
331337
},
332338
"required": [
333339
"root",
334340
"projectType"
335341
],
342+
"anyOf": [
343+
{
344+
"required": ["architect"],
345+
"not": {
346+
"required": ["targets"]
347+
}
348+
},
349+
{
350+
"required": ["targets"],
351+
"not": {
352+
"required": ["architect"]
353+
}
354+
},
355+
{
356+
"not": {
357+
"required": [
358+
"targets",
359+
"architect"
360+
]
361+
}
362+
}
363+
],
336364
"additionalProperties": false,
337365
"patternProperties": {
338366
"^[a-z]{1,3}-.*": {}

0 commit comments

Comments
 (0)