Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: adding -k to missing parts #840

Merged
merged 6 commits into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions docs-site/content/blog/axum-session.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ impl Hooks for App {
Now, you can create your controller that uses Axum session. Use the `cargo loco generate controller` command:

```sh
❯ cargo loco generate controller mysession -k api
❯ cargo loco generate controller mysession --api
Finished dev [unoptimized + debuginfo] target(s) in 0.36s
Running `target/debug/axum-session-cli generate controller mysession`
added: "src/controllers/mysession.rs"
Expand Down Expand Up @@ -166,7 +166,7 @@ impl Hooks for App {
Create the controller as before using `cargo loco generate controller`

```sh
❯ cargo loco generate controller mysession -k api
❯ cargo loco generate controller mysession --api
Finished dev [unoptimized + debuginfo] target(s) in 0.36s
Running `target/debug/axum-session-cli generate controller mysession`
added: "src/controllers/mysession.rs"
Expand Down
6 changes: 3 additions & 3 deletions docs-site/content/docs/getting-started/guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ The built in <code>_health</code> route will tell you that you have configured y
Let's add a quick _hello_ response to our service.

```sh
$ cargo loco generate controller guide -k api
$ cargo loco generate controller guide --api
added: "src/controllers/guide.rs"
injected: "src/controllers/mod.rs"
injected: "src/app.rs"
Expand Down Expand Up @@ -465,7 +465,7 @@ $ cargo playground
We're now ready to plug this into an `articles` controller. First, generate a new controller:

```sh
$ cargo loco generate controller articles -k api
$ cargo loco generate controller articles --api
added: "src/controllers/articles.rs"
injected: "src/controllers/mod.rs"
injected: "src/app.rs"
Expand Down Expand Up @@ -630,7 +630,7 @@ Let's add another model, this time: `Comment`. We want to create a relation - a
Instead of coding the model and controller by hand, we're going to create a **comment scaffold** which will generate a fully working CRUD API comments. We're also going to use the special `references` type:

```sh
$ cargo loco generate scaffold comment content:text article:references -k api
$ cargo loco generate scaffold comment content:text article:references --api
```

If you peek into the new migration, you'll discover a new database relation in the articles table:
Expand Down
4 changes: 2 additions & 2 deletions docs-site/content/docs/getting-started/tour/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ You can choose between generating an `api`, `html` or `htmx` scaffold using the
</div>

```sh
$ cargo loco generate scaffold post title:string content:text -k api
$ cargo loco generate scaffold post title:string content:text --api

:
:
Expand Down Expand Up @@ -168,7 +168,7 @@ For those counting -- the commands for creating a blog backend were:
1. `cargo install loco-cli`
2. `cargo install sea-orm-cli`
3. `loco new`
4. `cargo loco generate scaffold post title:string content:text -k api`
4. `cargo loco generate scaffold post title:string content:text --api`

Done! enjoy your ride with `loco` 🚂

Expand Down
2 changes: 1 addition & 1 deletion docs-site/content/docs/the-app/your-project.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ Options:
You can begin by generating a scaffold for the Post resource, which will represent a single blog posting. To accomplish this, open your terminal and enter the following command:
<!-- <snip id="scaffold-post-command" inject_from="yaml" template="sh"> -->
```sh
cargo loco generate scaffold posts name:string title:string content:text
cargo loco generate scaffold posts name:string title:string content:text --api
```
<!-- </snip> -->

Expand Down
2 changes: 1 addition & 1 deletion snipdoc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ snippets:
path: ./snipdoc.yml
scaffold-post-command:
content: cargo loco generate scaffold posts
name:string title:string content:text
name:string title:string content:text --api
path: ./snipdoc.yml
generate-task-help-command:
content: cd ./examples/demo && cargo loco generate task --help
Expand Down
Loading