File tree Expand file tree Collapse file tree 5 files changed +347
-71
lines changed
samples/client/petstore/rust Expand file tree Collapse file tree 5 files changed +347
-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
+ pub basic_auth : Option < BasicAuth > ,
19
+ pub oauth_access_token : Option < String > ,
20
+ pub api_key : Option < ApiKey > ,
21
+ // TODO: take an oauth2 token source, similar to the go one
22
+ }
23
+
24
+ pub type BasicAuth = ( String , Option < String > ) ;
25
+
26
+ pub struct ApiKey {
27
+ pub prefix : Option < String > ,
28
+ pub key : String ,
17
29
}
18
30
19
31
impl < C : hyper:: client:: Connect > Configuration < C > {
@@ -22,6 +34,9 @@ impl<C: hyper::client::Connect> Configuration<C> {
22
34
base_path : "http://petstore.swagger.io/v2" . to_owned ( ) ,
23
35
user_agent : Some ( "Swagger-Codegen/1.0.0/rust" . to_owned ( ) ) ,
24
36
client : client,
37
+ basic_auth : None ,
38
+ oauth_access_token : None ,
39
+ api_key : None ,
25
40
}
26
41
}
27
42
}
You can’t perform that action at this time.
0 commit comments