File tree Expand file tree Collapse file tree 5 files changed +389
-71
lines changed
samples/client/petstore/rust Expand file tree Collapse file tree 5 files changed +389
-71
lines changed Original file line number Diff line number Diff line change @@ -132,7 +132,7 @@ Get user by user name
132
132
133
133
Name | Type | Description | Notes
134
134
------------- | ------------- | ------------- | -------------
135
- ** username** | ** String** | The name that needs to be fetched. Use user1 for testing. |
135
+ ** username** | ** String** | The name that needs to be fetched. Use user1 for testing. |
136
136
137
137
### Return type
138
138
Original file line number Diff line number Diff line change 9
9
*/
10
10
11
11
use hyper;
12
+ use std:: collections:: HashMap ;
12
13
13
14
pub struct Configuration < C : hyper:: client:: Connect > {
14
15
pub base_path : String ,
15
16
pub user_agent : Option < String > ,
16
17
pub client : hyper:: client:: Client < C > ,
18
+
19
+ pub basic_auth : Option < BasicAuth > ,
20
+ pub oauth_access_token : Option < String > ,
21
+ pub api_key : Option < ApiKey > ,
22
+ // TODO: take an oauth2 token source, similar to the go one
23
+ }
24
+
25
+ pub type BasicAuth = ( String , Option < String > ) ;
26
+
27
+ pub struct ApiKey {
28
+ pub prefix : Option < String > ,
29
+ pub key : String ,
17
30
}
18
31
19
32
impl < C : hyper:: client:: Connect > Configuration < C > {
@@ -22,6 +35,9 @@ impl<C: hyper::client::Connect> Configuration<C> {
22
35
base_path : "http://petstore.swagger.io/v2" . to_owned ( ) ,
23
36
user_agent : Some ( "Swagger-Codegen/1.0.0/rust" . to_owned ( ) ) ,
24
37
client : client,
38
+ basic_auth : None ,
39
+ oauth_access_token : None ,
40
+ api_key : None ,
25
41
}
26
42
}
27
43
}
You can’t perform that action at this time.
0 commit comments