Is there an existing issue for this?
Current behavior
The CLI throws an error and stops execution: error: unknown option '--type'
Minimum reproduction code
N/A (CLI command issue)
Steps to reproduce
Run the following command:
nest g resource my-res --type rest --crud true
Expected behavior
The CLI should accept --type and --crud flags and generate the files silently, bypassing the interactive prompts.
Package version
PNPM Version: 10.13.1
NestJS version
11.1.10
Node.js version
v22.20.0
In which operating systems have you tested?
Other
I inspected node_modules/@nestjs/schematics/dist/lib/resource/schema.json and confirmed that both type and crud properties are explicitly defined in the schema definition.
It seems the CLI is not correctly dynamically mapping these schematic-specific options for the resource command, causing the strict argument parser to reject them before the schematic runs.