Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better developer experience in creating a model #2131

Closed
hacksparrow opened this issue Dec 7, 2018 · 2 comments
Closed

Better developer experience in creating a model #2131

hacksparrow opened this issue Dec 7, 2018 · 2 comments

Comments

@hacksparrow
Copy link
Contributor

Description / Steps to reproduce / Feature proposal

A developer migrating from LB3 will be confused why merely calling lb4 model does not end up creating the model and loading it in the app, like how it does in LB3.

Maybe we should optionally include the repository and controller creation steps?

Current Behavior

$ lb4 model
....

makes it look like everything went well, but the model is not shown in the API Explorer.

Expected Behavior

Guide the users, especially LB3 users, when they create a model for the first time.

$ lb4 model
...
> A LB4 model requires a corresponding repository, would you like to create now? (y/N)
> name of the repository:
...
> A controller must be created for the model, would you like to create now? (y/N)
> name of the controller: 
...

See Reporting Issues for more tips on writing good issues

@hacksparrow hacksparrow changed the title Better DX in creating a model Better developer experience in creating a model Dec 7, 2018
@raymondfeng
Copy link
Contributor

@hacksparrow We have discussed to add more composite commands to achieve what LB3 can do. In this case, we can possibly have something like:

Do you want to persist the model? (Y/n)
...
Do you want to create a controller from the repository to expose REST APIs? (Y/n)
...

The prompt can be possibly skipped with --repository <repositoryName> --controller <controllerName> options.

We might want to introduce lb4 resource as the composite command.

@raymondfeng
Copy link
Contributor

Duplicate of #2036

@raymondfeng raymondfeng marked this as a duplicate of #2036 Dec 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants