docs: update resource command output to reflect auto-wired module declaration - #721
Conversation
|
Thanks for your first PR! A maintainer will review it shortly. Make sure CI passes and take a look at our contributing guide if you haven't already. |
|
Please review |
ShiraiEd
left a comment
There was a problem hiding this comment.
Hello @GuTS805 , thanks for contributing!
So for this issue I just wanted to match the command output written in the docs with the actual output, that would be changing:
- from this snippet:
Next steps: 1. Add the module declaration to src/main.rs: mod users; mod entity; mod migrations; 2. Register the routes in your Router: use users::handlers::{list_users, get_user, create_user, update_user, delete_user}; let router = Router::new() .get("/users", list_users) .get("/users/:id", get_user) .post("/users", create_user) .put("/users/:id", update_user) .delete("/users/:id", delete_user); 3. Enable the database feature in Cargo.toml: rapina = { version = "...", features = ["postgres"] }
- to this one:
Adding resource: User ✓ Created src/users/ ✓ Created src/users/mod.rs ✓ Created src/users/handlers.rs ✓ Created src/users/dto.rs ✓ Created src/users/error.rs ✓ Updated src/entity.rs ✓ Created src/migrations/ ✓ Created src/migrations/m20260723_090145_create_users.rs ✓ Updated src/migrations/mod.rs ✓ Wired mod users; in src/main.rs Next steps: 1. Run cargo build to verify Resource Item created successfully! ```
I also commented something to add after de snippet
|
Updated the snippet. Please review it again. |
|
Hey @GuTS805, can I ask you something? What did you find that difficult in this task that made you use and even commit with claude? In my conception it is just a simple change in a markdown, the use of AI is totally unacessary, Also did you tested the changes locally with |
|
Honestly, it was just a small docs change. I only used Claude to double-check that I was following your suggested wording correctly and hadn't missed anything not because the change itself needed AI. I probably should've just asked you directly if I was unsure, and I'll do that next time. I also tested everything locally with zola build. It built cleanly with no errors, and I checked the generated HTML for the commands page to make sure the snippet and bullet formatting looked right. |
|
Ok, understood Can you just amend the commit and delete Claude as co-author then |
Match the exact CLI checklist output, mention .discover() as an alternative to manual router registration, and note mod entity/ mod migrations still need to be added manually.
f582c9e to
cf10d03
Compare
|
Done |
Summary
rapina add resourcenow wires themod <resource>;declaration intosrc/main.rsautomatically (idempotent on repeat runs), so the docs no longer instruct users to add it by hand.Cargo.toml.Edited: closes #698
Test plan
[Bug]: Rapina add resource docs doesn't match command output #698