Skip to content

Commit

Permalink
Add caution on export rule (#273)
Browse files Browse the repository at this point in the history
* Add caution on export rule

Co-authored-by: Juha Kukkonen <juha7kukkonen@gmail.com>
  • Loading branch information
komi1230 and juhaku authored Sep 8, 2022
1 parent 344e2f5 commit b5c3327
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,9 @@ mod pet_api {
}
```

This attribute macro substantially will create another struct named with `__path_` prefix + handler function name.
So when you implement `some_handler` function in different file and want to export this, make sure `__path_some_handler` in the module can also be accessible from the root.

Tie the `Schema` and the endpoint above to the OpenApi schema with following `OpenApi` derive proc macro.

```rust
Expand Down

0 comments on commit b5c3327

Please sign in to comment.