-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Description
See #727 (comment):
I just realised that our documentation added by loopbackio/loopback.io#583 is missing an important piece of information: how is the generator discovering models and repositories in the project? What conventions does it require to work correctly?
Acceptance criteria
- In REST Controller with CRUD Methods (source), add a new subsection describing how the CLI is discovering models and repositories. What files are scanned, how are model/repository names inferred. Are we parsing the typescript to find all exports, as
@loopback/bootdoes? Are we building the class names from file names? Are there any filters (e.g. does a repository class name have to includeRepositorysuffix)? Etc. - In CLI, after the user selects "REST Controller with CRUD Methods" type, but before prompting for model & repository, print a short message with a link to this new documentation. Alternatively, instead of printing this hint to all users, print it only when no models or no repositories were found. The goal is to provide a clear next step for users that run into the problem that (one of|none of) their (models|repositories) was discovered by our CLI.