@@ -44,7 +44,19 @@ Similarly if there is a `format` field set to `uuid`:
44
44
45
45
``` diff
46
46
[dependencies]
47
- + uuid = { version = "0.8", features = ["serde", "v4"] }
47
+ + uuid = { version = "1.0.0", features = ["serde", "v4"] }
48
+ ```
49
+
50
+ The macro has some additional fancy options to control the generated code:
51
+
52
+ ``` rust
53
+ generate_api! (
54
+ spec = " path/to/openapi_document.json" , // The OpenAPI document
55
+ inner_type = my_client :: InnerType , // Client inner type available to pre and post hooks
56
+ pre_hook = closure :: or :: path :: to :: function , // Hook invoked before issuing the HTTP request
57
+ post_hook = closure :: or :: path :: to :: function , // Hook invoked prior to receiving the HTTP response
58
+ derives = [ schemars :: JsonSchema ], // Additional derive macros applied to generated types
59
+ );
48
60
```
49
61
50
62
Note that the macro will be re-evaluated when the OpenAPI json document
@@ -135,7 +147,7 @@ percent-encoding = "2.1"
135
147
reqwest = { version = " 0.11" , features = [" json" , " stream" ] }
136
148
serde = { version = " 1.0" , features = [" derive" ] }
137
149
serde_json = " 1.0"
138
- uuid = { version = " 0.8" , features = [" serde" , " v4" ] }
150
+ uuid = { version = " >= 0.8.0, <2.0.0 " , features = [" serde" , " v4" ] }
139
151
```
140
152
141
153
Note that there is a dependency on ` percent-encoding ` which macro- and
0 commit comments