44 * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
55 *
66 * The version of the OpenAPI document: 1.0.0
7- *
7+ *
88 * Generated by: https://openapi-generator.tech
99 */
1010
@@ -35,21 +35,26 @@ impl<C: hyper::client::connect::Connect> UserApiClient<C>
3535}
3636
3737pub trait UserApi {
38- fn create_user ( & self , body : crate :: models:: User ) -> Pin < Box < dyn Future < Output = Result < ( ) , Error > > > > ;
39- fn create_users_with_array_input ( & self , body : Vec < crate :: models:: User > ) -> Pin < Box < dyn Future < Output = Result < ( ) , Error > > > > ;
40- fn create_users_with_list_input ( & self , body : Vec < crate :: models:: User > ) -> Pin < Box < dyn Future < Output = Result < ( ) , Error > > > > ;
38+ fn create_user ( & self , user : crate :: models:: User ) -> Pin < Box < dyn Future < Output = Result < ( ) , Error > > > > ;
39+ fn create_users_with_array_input ( & self , user : Vec < crate :: models:: User > ) -> Pin < Box < dyn Future < Output = Result < ( ) , Error > > > > ;
40+ fn create_users_with_list_input ( & self , user : Vec < crate :: models:: User > ) -> Pin < Box < dyn Future < Output = Result < ( ) , Error > > > > ;
4141 fn delete_user ( & self , username : & str ) -> Pin < Box < dyn Future < Output = Result < ( ) , Error > > > > ;
4242 fn get_user_by_name ( & self , username : & str ) -> Pin < Box < dyn Future < Output = Result < crate :: models:: User , Error > > > > ;
4343 fn login_user ( & self , username : & str , password : & str ) -> Pin < Box < dyn Future < Output = Result < String , Error > > > > ;
4444 fn logout_user ( & self , ) -> Pin < Box < dyn Future < Output = Result < ( ) , Error > > > > ;
45- fn update_user ( & self , username : & str , body : crate :: models:: User ) -> Pin < Box < dyn Future < Output = Result < ( ) , Error > > > > ;
45+ fn update_user ( & self , username : & str , user : crate :: models:: User ) -> Pin < Box < dyn Future < Output = Result < ( ) , Error > > > > ;
4646}
4747
4848impl < C : hyper:: client:: connect:: Connect > UserApi for UserApiClient < C >
4949 where C : Clone + std:: marker:: Send + Sync {
5050 #[ allow( unused_mut) ]
51- fn create_user ( & self , body : crate :: models:: User ) -> Pin < Box < dyn Future < Output = Result < ( ) , Error > > > > {
51+ fn create_user ( & self , user : crate :: models:: User ) -> Pin < Box < dyn Future < Output = Result < ( ) , Error > > > > {
5252 let mut req = __internal_request:: Request :: new ( hyper:: Method :: POST , "/user" . to_string ( ) )
53+ . with_auth ( __internal_request:: Auth :: ApiKey ( __internal_request:: ApiKey {
54+ in_header : true ,
55+ in_query : false ,
56+ param_name : "api_key" . to_owned ( ) ,
57+ } ) )
5358 ;
5459 req = req. with_body_param ( user) ;
5560 req = req. returns_nothing ( ) ;
@@ -58,8 +63,13 @@ impl<C: hyper::client::connect::Connect>UserApi for UserApiClient<C>
5863 }
5964
6065 #[ allow( unused_mut) ]
61- fn create_users_with_array_input ( & self , body : Vec < crate :: models:: User > ) -> Pin < Box < dyn Future < Output = Result < ( ) , Error > > > > {
66+ fn create_users_with_array_input ( & self , user : Vec < crate :: models:: User > ) -> Pin < Box < dyn Future < Output = Result < ( ) , Error > > > > {
6267 let mut req = __internal_request:: Request :: new ( hyper:: Method :: POST , "/user/createWithArray" . to_string ( ) )
68+ . with_auth ( __internal_request:: Auth :: ApiKey ( __internal_request:: ApiKey {
69+ in_header : true ,
70+ in_query : false ,
71+ param_name : "api_key" . to_owned ( ) ,
72+ } ) )
6373 ;
6474 req = req. with_body_param ( user) ;
6575 req = req. returns_nothing ( ) ;
@@ -68,8 +78,13 @@ impl<C: hyper::client::connect::Connect>UserApi for UserApiClient<C>
6878 }
6979
7080 #[ allow( unused_mut) ]
71- fn create_users_with_list_input ( & self , body : Vec < crate :: models:: User > ) -> Pin < Box < dyn Future < Output = Result < ( ) , Error > > > > {
81+ fn create_users_with_list_input ( & self , user : Vec < crate :: models:: User > ) -> Pin < Box < dyn Future < Output = Result < ( ) , Error > > > > {
7282 let mut req = __internal_request:: Request :: new ( hyper:: Method :: POST , "/user/createWithList" . to_string ( ) )
83+ . with_auth ( __internal_request:: Auth :: ApiKey ( __internal_request:: ApiKey {
84+ in_header : true ,
85+ in_query : false ,
86+ param_name : "api_key" . to_owned ( ) ,
87+ } ) )
7388 ;
7489 req = req. with_body_param ( user) ;
7590 req = req. returns_nothing ( ) ;
@@ -80,6 +95,11 @@ impl<C: hyper::client::connect::Connect>UserApi for UserApiClient<C>
8095 #[ allow( unused_mut) ]
8196 fn delete_user ( & self , username : & str ) -> Pin < Box < dyn Future < Output = Result < ( ) , Error > > > > {
8297 let mut req = __internal_request:: Request :: new ( hyper:: Method :: DELETE , "/user/{username}" . to_string ( ) )
98+ . with_auth ( __internal_request:: Auth :: ApiKey ( __internal_request:: ApiKey {
99+ in_header : true ,
100+ in_query : false ,
101+ param_name : "api_key" . to_owned ( ) ,
102+ } ) )
83103 ;
84104 req = req. with_path_param ( "username" . to_string ( ) , username. to_string ( ) ) ;
85105 req = req. returns_nothing ( ) ;
@@ -109,15 +129,25 @@ impl<C: hyper::client::connect::Connect>UserApi for UserApiClient<C>
109129 #[ allow( unused_mut) ]
110130 fn logout_user ( & self , ) -> Pin < Box < dyn Future < Output = Result < ( ) , Error > > > > {
111131 let mut req = __internal_request:: Request :: new ( hyper:: Method :: GET , "/user/logout" . to_string ( ) )
132+ . with_auth ( __internal_request:: Auth :: ApiKey ( __internal_request:: ApiKey {
133+ in_header : true ,
134+ in_query : false ,
135+ param_name : "api_key" . to_owned ( ) ,
136+ } ) )
112137 ;
113138 req = req. returns_nothing ( ) ;
114139
115140 req. execute ( self . configuration . borrow ( ) )
116141 }
117142
118143 #[ allow( unused_mut) ]
119- fn update_user ( & self , username : & str , body : crate :: models:: User ) -> Pin < Box < dyn Future < Output = Result < ( ) , Error > > > > {
144+ fn update_user ( & self , username : & str , user : crate :: models:: User ) -> Pin < Box < dyn Future < Output = Result < ( ) , Error > > > > {
120145 let mut req = __internal_request:: Request :: new ( hyper:: Method :: PUT , "/user/{username}" . to_string ( ) )
146+ . with_auth ( __internal_request:: Auth :: ApiKey ( __internal_request:: ApiKey {
147+ in_header : true ,
148+ in_query : false ,
149+ param_name : "api_key" . to_owned ( ) ,
150+ } ) )
121151 ;
122152 req = req. with_path_param ( "username" . to_string ( ) , username. to_string ( ) ) ;
123153 req = req. with_body_param ( user) ;
0 commit comments