Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion docs/site/Repository-generator.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ src/datasources
model. If you supply this value, the CLI will not try to infer this value from
the selected model file.

`--repositoryBaseClass` : _(Optional)_ _(Default: DefaultCrudRepository)_ name
of the base class the repository will inherit. If no value was supplied,
**DefaultCrudRepository** will be used.

### Configuration file

This generator supports a config file with the following format, see the
Expand All @@ -40,7 +44,8 @@ file.
"name": "repositoryNameToBeGenerated",
"datasource": "validDataSourceName",
"model": "validDModelName",
"id": "anOptionalNameForID"
"id": "anOptionalNameForID",
"repositoryBaseClass": "validRepositoryBaseClass"
}
```

Expand Down Expand Up @@ -82,6 +87,14 @@ The tool will prompt you for:
**NOTE:** The tool will inspect each of the selected models and try to find
the name of the property serving as **ID** for the model.

- **Please select the repository base class.** _(repository)_ if the name of a
valid base class has been supplied from the command line, the prompt is
skipped, otherwise it will present you a list of repositories. The default
repository is infered from the datasource type.

Any repository in the `src/repository` folder with the file format
`*.repository.base.ts` will be added to the list too.

- **Please enter the name of the ID property for _modelName_.** _(id)_ If the
CLI cannot find the corresponding ID property name for the model, it will
prompt you to enter a name here. If you don't specify any name, it will use
Expand Down