Prompt issue by creating controller with specified config
Steps to reproduce
I specified an option ( controllerType ) to create controller not to prompt me the question but It still prompts me for controllerType.
I tried this option by passing config file and other way which is --controllerType REST way but same behaviour.
My config.json
{
"controllerType": "REST"
}
My controller creation CLI command:
lb4 controller test --config config.json
Current Behavior
Prompt me to choose a controller type:
? What kind of controller would you like to generate? (Use arrow keys)
❯ Empty Controller
REST Controller with CRUD functions
Expected Behavior
Not to prompt me about specified controller type.
Please see this comment for example. The controllerType should be REST Controller with CRUD functions.
@dhmlau, This config is working, thanks.
{
"name": "Widget",
"modelName": "Widget",
"controllerType": "REST Controller with CRUD functions",
"repositoryName": "WidgetRepository",
"idType": "string",
"httpPathName": "/widget"
}
Hello @canmustu
1- I have created config.json file at the root
2- I pasted the config you mentioned and made the proper changes to work with my model and repo.
3- I ran the following command : lb4 controller -c config.json
and it is not picking from the config file and still prompts me questions to answer
is there any missing step should be done in addition to the mentioned 3 steps above?
I'm also having an issue on Windows. Can't get this to work either with config file or using --controllerType option. I get prompted no matter what I do.