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
132132
133133Name | Type | Description | Notes
134134------------- | ------------- | ------------- | -------------
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. |
136136
137137### Return type
138138
Original file line number Diff line number Diff line change 99 */
1010
1111use hyper;
12+ use std:: collections:: HashMap ;
1213
1314pub struct Configuration < C : hyper:: client:: Connect > {
1415 pub base_path : String ,
1516 pub user_agent : Option < String > ,
1617 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 ,
1730}
1831
1932impl < C : hyper:: client:: Connect > Configuration < C > {
@@ -22,6 +35,9 @@ impl<C: hyper::client::Connect> Configuration<C> {
2235 base_path : "http://petstore.swagger.io/v2" . to_owned ( ) ,
2336 user_agent : Some ( "Swagger-Codegen/1.0.0/rust" . to_owned ( ) ) ,
2437 client : client,
38+ basic_auth : None ,
39+ oauth_access_token : None ,
40+ api_key : None ,
2541 }
2642 }
2743}
You can’t perform that action at this time.
0 commit comments