Skip to content

Commit cdd247e

Browse files
brandonrobertsMikeRyanDev
authored andcommitted
fix(Schematics): Add smart default to blueprint schemas
1 parent 413efd4 commit cdd247e

File tree

6 files changed

+36
-12
lines changed

6 files changed

+36
-12
lines changed

modules/schematics/src/action/schema.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@
66
"properties": {
77
"name": {
88
"description": "The name of the action.",
9-
"type": "string"
9+
"type": "string",
10+
"$default": {
11+
"$source": "argv",
12+
"index": 0
13+
}
1014
},
1115
"path": {
1216
"type": "string",
@@ -31,5 +35,5 @@
3135
"aliases": ["g"]
3236
}
3337
},
34-
"required": ["name"]
38+
"required": []
3539
}

modules/schematics/src/effect/schema.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@
66
"properties": {
77
"name": {
88
"description": "The name of the effect.",
9-
"type": "string"
9+
"type": "string",
10+
"$default": {
11+
"$source": "argv",
12+
"index": 0
13+
}
1014
},
1115
"path": {
1216
"type": "string",
@@ -49,5 +53,5 @@
4953
"aliases": ["g"]
5054
}
5155
},
52-
"required": ["name"]
56+
"required": []
5357
}

modules/schematics/src/entity/schema.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@
66
"properties": {
77
"name": {
88
"description": "The name of the entity.",
9-
"type": "string"
9+
"type": "string",
10+
"$default": {
11+
"$source": "argv",
12+
"index": 0
13+
}
1014
},
1115
"path": {
1216
"type": "string",
@@ -42,5 +46,5 @@
4246
"aliases": ["g"]
4347
}
4448
},
45-
"required": ["name"]
49+
"required": []
4650
}

modules/schematics/src/feature/schema.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,11 @@
1212
},
1313
"name": {
1414
"description": "The name of the feature.",
15-
"type": "string"
15+
"type": "string",
16+
"$default": {
17+
"$source": "argv",
18+
"index": 0
19+
}
1620
},
1721
"flat": {
1822
"type": "boolean",
@@ -42,5 +46,5 @@
4246
"aliases": ["g"]
4347
}
4448
},
45-
"required": ["name"]
49+
"required": []
4650
}

modules/schematics/src/reducer/schema.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@
66
"properties": {
77
"name": {
88
"description": "The name of the reducer.",
9-
"type": "string"
9+
"type": "string",
10+
"$default": {
11+
"$source": "argv",
12+
"index": 0
13+
}
1014
},
1115
"path": {
1216
"type": "string",
@@ -46,5 +50,5 @@
4650
"aliases": ["g"]
4751
}
4852
},
49-
"required": ["name"]
53+
"required": []
5054
}

modules/schematics/src/store/schema.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@
66
"properties": {
77
"name": {
88
"description": "The name of the state.",
9-
"type": "string"
9+
"type": "string",
10+
"$default": {
11+
"$source": "argv",
12+
"index": 0
13+
}
1014
},
1115
"path": {
1216
"type": "string",
@@ -47,5 +51,5 @@
4751
"alias": "si"
4852
}
4953
},
50-
"required": ["name"]
54+
"required": []
5155
}

0 commit comments

Comments
 (0)