Skip to content

Commit afaebce

Browse files
author
Stephan Dilly
committed
some more info
1 parent 8e34738 commit afaebce

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

rest-api/readme.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
## rest-api
22
Welcome. `#[api]` allows you to create a rest-api by simply annotating a trait.
3+
Currently the rest calls are executed using the [request](https://crates.io/crates/reqwest) crate.
34
Don't expect much to work yet.
45

56
## goals
@@ -12,12 +13,19 @@ Support as many flavours and special cases out there in different Rest APIs with
1213
* Stability: Hand written API bindings are harder to maintain and easier to introduce bugs
1314
* Testability: It also simplifies writing your application in a test driven approach. Simply use `#[mock]`([see mock crate](https://github.com/carlosdp/mock_derive)) and run against a mocked API
1415

16+
## why not just swagger?
17+
18+
* good point, also a good choice, but then you have to involve yet another tool in your pipeline
19+
* rest-api allows you to stay in the rust eco-chamber
20+
* rest-api is more lightweight and faster to prototype
21+
1522
## todo
1623

1724
- [x] proof of concept
1825
- [x] support url parameters
19-
- [ ] string results
20-
- [ ] define base url in attribute
2126
- [ ] support query parameters
27+
- [ ] future support, or more backends in general
28+
- [ ] string results
2229
- [ ] support post using json
23-
- [ ] allow serializable types in api
30+
- [ ] allow serializable types in api
31+
- [ ] define base url in attribute

0 commit comments

Comments
 (0)