Skip to content

Commit 80c592c

Browse files
committed
[Rust] Regenerate petstore sample
1 parent dced4c2 commit 80c592c

File tree

5 files changed

+389
-71
lines changed

5 files changed

+389
-71
lines changed

samples/client/petstore/rust/docs/UserApi.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ Get user by user name
132132

133133
Name | 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

samples/client/petstore/rust/src/apis/configuration.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,24 @@
99
*/
1010

1111
use hyper;
12+
use std::collections::HashMap;
1213

1314
pub 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

1932
impl<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
}

0 commit comments

Comments
 (0)