ng generate does not accept schematic options of type "object" #22173
Labels
area: @angular/cli
area: @angular-devkit/schematics-cli
freq1: low
Only reported by a handful of users who observe it rarely
severity1: confusing
type: bug/fix
Milestone
🐞 Bug report
Command (mark with an
x
)Is this a regression?
NoDescription
Given a custom schematic called
my-test-schematic
with its schema defining anobject
type, as for example thelocalize
property below:Running such schematic with
ng generate
commandProduces the following error:
Running the schematic with
schematics
commandThe option is passed to the schematic:
I would expect
ng generate
to support schematic options of typeobject
, the same wayschematics
does. Here is where extraction happens forng generate
, and here forschematics
.🔬 Minimal Reproduction
I created a public repository here that allows to reproduce the issue. All the relevant information is in the readme file.
🔥 Exception or Error
When running the schematic with
ng generate
commandWhen running the schematic with
schematics
command, the option is properly passed to the schematic🌍 Your Environment
Anything else relevant?
No
The text was updated successfully, but these errors were encountered: