Skip to content

Commit

Permalink
docs(cli): use a custom repository base class
Browse files Browse the repository at this point in the history
fix #2149
  • Loading branch information
gczobel-f5 authored and bajtos committed Feb 4, 2019
1 parent 91a37dc commit a624b95
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion docs/site/Repository-generator.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ 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 +43,8 @@ file.
"name": "repositoryNameToBeGenerated",
"datasource": "validDataSourceName",
"model": "validDModelName",
"id": "anOptionalNameForID"
"id": "anOptionalNameForID",
"repositoryBaseClass": "validRepositoryBaseClass"
}
```

Expand Down Expand Up @@ -82,6 +86,10 @@ 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

0 comments on commit a624b95

Please sign in to comment.