Skip to content

Commit

Permalink
docs(lb4): scaffolding a REST Controller with CRUD
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Delisle committed Jan 15, 2018
1 parent 692bf6c commit 75e48e2
Showing 1 changed file with 23 additions and 3 deletions.
26 changes: 23 additions & 3 deletions pages/en/lb4/Controller-generator.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,28 @@ If provided, the tool will use that as the default when it prompts for the name.

The tool will prompt you for:

- Name of the controller. If the name had been supplied from the command line, the prompt is skipped and the controller is built with the name from the command-line argument.
- Name of the controller. If the name had been supplied from the command line,
the prompt is skipped and the controller is built with the name from the
command-line argument.
- Type of the controller. You can select from the following types:
* **Empty Controller** - An empty controller definition
* **Basic CRUD Controller** - A controller wired up to a model and repository
definition, with pre-defined CRUD methods.

#### REST Controller with CRUD Methods
If you select the REST Controller with CRUD Methods type, you will then be asked
to select:
- The model to use for the CRUD function definitions
- The repository for this model that provides datasource connectivity

{% include warning.html content=
"
If you do not have a model and repository to select, then you will
receive an error!
" lang=page.lang %}

### Output

The tool will create a new file as <code>/src/controllers/<i>controller-name</i>.controller.ts</code>. The file will contain an empty constructor and common package imports that can be uncommented.
The tool will create a new file as
<code>/src/controllers/<i>controller-name</i>.controller.ts</code>.
The file will contain an empty constructor and common package imports that can
be uncommented.

0 comments on commit 75e48e2

Please sign in to comment.