Skip to content

docs: clean up todo tutorial - #1846

Merged
dhmlau merged 1 commit into
masterfrom
todo
Oct 17, 2018
Merged

dhmlau merged 1 commit into
masterfrom
todo

Conversation

@dhmlau

@dhmlau dhmlau commented Oct 13, 2018 •

Copy link
Copy Markdown
Member

Description

There are a few areas in the todo tutorial that I've modified in this PR to keep it up-to-date:

  • Add model section: include the Entity/Model prompt, update the interactive output.
  • Add repository section: use lb4 repository instead
  • Add controller section: create REST controller instead of empty controller.
  • Putting it all together section: there is no longer extra steps to modify the Application class.

Fixes #1827

@b-admike b-admike left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome 💯. I've left some comments, but LGTM overall.

Comment thread docs/site/todo-tutorial-controller.md Outdated
redirect requests to this function when the path and verb match.
- `@requestBody()` associates the OpenAPI schema for a Todo with the body of the
request so that LoopBack can validate the format of an incoming request
(**Note**: As of this writing, schematic validation is not yet functional).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we remove the Note stating schematic validation isn't available yet since it is now?

### Putting it all together

We've got all of our artifacts now, and all that's left is to bind them to our
We've got all of our artifacts now, and they are all automatically bind to our

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick: bind -> bound

Comment thread docs/site/todo-tutorial-repository.md Outdated
list of available datasources.

```sh
| => lb4 repository

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick: can we clean this up a bit to match the format of the other CLI snippets?

@dhmlau dhmlau mentioned this pull request Oct 14, 2018
@@ -24,67 +24,29 @@ For more information about Repositories, see

### Create your repository

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should explain what a repository is and why it is required. LB3 users not familiar with this concept will be left wondering about the "added complexity".

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isn't it explained already here https://loopback.io/doc/en/lb4/Repositories.html ?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hacksparrow, there is a section above the Create your repository that explains what a repository is. What I've removed is the details that what the index.ts used for.

@dhmlau

dhmlau commented Oct 15, 2018

Copy link
Copy Markdown
Member Author

@slnode test please

Comment thread docs/site/todo-tutorial-repository.md Outdated
we'll need to build the [Controller](todo-tutorial-controller.md) to handle our
incoming requests.
The newly created `todo.repository.ts` class has the necessary connections that
are needed to perform CRUD operations for our to-do model. It leverages the

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to-do --> Todo?

@jannyHou jannyHou left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a nitpick, LGTM 👍

@dhmlau
dhmlau force-pushed the todo branch 2 times, most recently from 03ab6c1 to cc7c3c3 Compare October 17, 2018 19:05
@dhmlau
dhmlau merged commit c58b1b0 into master Oct 17, 2018
@dhmlau
dhmlau deleted the todo branch October 17, 2018 19:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants