Skip to content

Document how is the CLI generator discovering models and repositories in the project #1085

@bajtos

Description

@bajtos

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/boot does? Are we building the class names from file names? Are there any filters (e.g. does a repository class name have to include Repository suffix)? 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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions