@@ -49,7 +49,8 @@ use openapi_v3::{Api, ApiNoContext, Client, ContextWrapperExt,
49
49
XmlOtherPostResponse ,
50
50
XmlOtherPutResponse ,
51
51
XmlPostResponse ,
52
- XmlPutResponse
52
+ XmlPutResponse ,
53
+ GetRepoInfoResponse
53
54
} ;
54
55
use clap:: { App , Arg } ;
55
56
@@ -86,6 +87,7 @@ fn main() {
86
87
"XmlOtherPut" ,
87
88
"XmlPost" ,
88
89
"XmlPut" ,
90
+ "GetRepoInfo" ,
89
91
] )
90
92
. required ( true )
91
93
. index ( 1 ) )
@@ -100,7 +102,7 @@ fn main() {
100
102
. arg ( Arg :: with_name ( "port" )
101
103
. long ( "port" )
102
104
. takes_value ( true )
103
- . default_value ( "80 " )
105
+ . default_value ( "8080 " )
104
106
. help ( "Port to contact" ) )
105
107
. get_matches ( ) ;
106
108
@@ -136,123 +138,129 @@ fn main() {
136
138
let result = rt. block_on ( client. callback_with_header_post (
137
139
"url_example" . to_string ( )
138
140
) ) ;
139
- info ! ( "{:?} (X-Span-ID: {:?})" , result, ( client. context( ) as & Has <XSpanIdString >) . get( ) . clone( ) ) ;
141
+ info ! ( "{:?} (X-Span-ID: {:?})" , result, ( client. context( ) as & dyn Has <XSpanIdString >) . get( ) . clone( ) ) ;
140
142
} ,
141
143
Some ( "ComplexQueryParamGet" ) => {
142
144
let result = rt. block_on ( client. complex_query_param_get (
143
145
Some ( & Vec :: new ( ) )
144
146
) ) ;
145
- info ! ( "{:?} (X-Span-ID: {:?})" , result, ( client. context( ) as & Has <XSpanIdString >) . get( ) . clone( ) ) ;
147
+ info ! ( "{:?} (X-Span-ID: {:?})" , result, ( client. context( ) as & dyn Has <XSpanIdString >) . get( ) . clone( ) ) ;
146
148
} ,
147
149
/* Disabled because there's no example.
148
150
Some("EnumInPathPathParamGet") => {
149
151
let result = rt.block_on(client.enum_in_path_path_param_get(
150
152
???
151
153
));
152
- info!("{:?} (X-Span-ID: {:?})", result, (client.context() as &Has<XSpanIdString>).get().clone());
154
+ info!("{:?} (X-Span-ID: {:?})", result, (client.context() as &dyn Has<XSpanIdString>).get().clone());
153
155
},
154
156
*/
155
157
Some ( "MandatoryRequestHeaderGet" ) => {
156
158
let result = rt. block_on ( client. mandatory_request_header_get (
157
159
"x_header_example" . to_string ( )
158
160
) ) ;
159
- info ! ( "{:?} (X-Span-ID: {:?})" , result, ( client. context( ) as & Has <XSpanIdString >) . get( ) . clone( ) ) ;
161
+ info ! ( "{:?} (X-Span-ID: {:?})" , result, ( client. context( ) as & dyn Has <XSpanIdString >) . get( ) . clone( ) ) ;
160
162
} ,
161
163
Some ( "MergePatchJsonGet" ) => {
162
164
let result = rt. block_on ( client. merge_patch_json_get (
163
165
) ) ;
164
- info ! ( "{:?} (X-Span-ID: {:?})" , result, ( client. context( ) as & Has <XSpanIdString >) . get( ) . clone( ) ) ;
166
+ info ! ( "{:?} (X-Span-ID: {:?})" , result, ( client. context( ) as & dyn Has <XSpanIdString >) . get( ) . clone( ) ) ;
165
167
} ,
166
168
Some ( "MultigetGet" ) => {
167
169
let result = rt. block_on ( client. multiget_get (
168
170
) ) ;
169
- info ! ( "{:?} (X-Span-ID: {:?})" , result, ( client. context( ) as & Has <XSpanIdString >) . get( ) . clone( ) ) ;
171
+ info ! ( "{:?} (X-Span-ID: {:?})" , result, ( client. context( ) as & dyn Has <XSpanIdString >) . get( ) . clone( ) ) ;
170
172
} ,
171
173
Some ( "MultipleAuthSchemeGet" ) => {
172
174
let result = rt. block_on ( client. multiple_auth_scheme_get (
173
175
) ) ;
174
- info ! ( "{:?} (X-Span-ID: {:?})" , result, ( client. context( ) as & Has <XSpanIdString >) . get( ) . clone( ) ) ;
176
+ info ! ( "{:?} (X-Span-ID: {:?})" , result, ( client. context( ) as & dyn Has <XSpanIdString >) . get( ) . clone( ) ) ;
175
177
} ,
176
178
Some ( "OverrideServerGet" ) => {
177
179
let result = rt. block_on ( client. override_server_get (
178
180
) ) ;
179
- info ! ( "{:?} (X-Span-ID: {:?})" , result, ( client. context( ) as & Has <XSpanIdString >) . get( ) . clone( ) ) ;
181
+ info ! ( "{:?} (X-Span-ID: {:?})" , result, ( client. context( ) as & dyn Has <XSpanIdString >) . get( ) . clone( ) ) ;
180
182
} ,
181
183
Some ( "ParamgetGet" ) => {
182
184
let result = rt. block_on ( client. paramget_get (
183
185
Some ( serde_json:: from_str :: < uuid:: Uuid > ( "38400000-8cf0-11bd-b23e-10b96e4ef00d" ) . expect ( "Failed to parse JSON example" ) ) ,
184
186
None ,
185
187
None
186
188
) ) ;
187
- info ! ( "{:?} (X-Span-ID: {:?})" , result, ( client. context( ) as & Has <XSpanIdString >) . get( ) . clone( ) ) ;
189
+ info ! ( "{:?} (X-Span-ID: {:?})" , result, ( client. context( ) as & dyn Has <XSpanIdString >) . get( ) . clone( ) ) ;
188
190
} ,
189
191
Some ( "ReadonlyAuthSchemeGet" ) => {
190
192
let result = rt. block_on ( client. readonly_auth_scheme_get (
191
193
) ) ;
192
- info ! ( "{:?} (X-Span-ID: {:?})" , result, ( client. context( ) as & Has <XSpanIdString >) . get( ) . clone( ) ) ;
194
+ info ! ( "{:?} (X-Span-ID: {:?})" , result, ( client. context( ) as & dyn Has <XSpanIdString >) . get( ) . clone( ) ) ;
193
195
} ,
194
196
Some ( "RegisterCallbackPost" ) => {
195
197
let result = rt. block_on ( client. register_callback_post (
196
198
"url_example" . to_string ( )
197
199
) ) ;
198
- info ! ( "{:?} (X-Span-ID: {:?})" , result, ( client. context( ) as & Has <XSpanIdString >) . get( ) . clone( ) ) ;
200
+ info ! ( "{:?} (X-Span-ID: {:?})" , result, ( client. context( ) as & dyn Has <XSpanIdString >) . get( ) . clone( ) ) ;
199
201
} ,
200
202
Some ( "RequiredOctetStreamPut" ) => {
201
203
let result = rt. block_on ( client. required_octet_stream_put (
202
204
swagger:: ByteArray ( Vec :: from ( "BYTE_ARRAY_DATA_HERE" ) )
203
205
) ) ;
204
- info ! ( "{:?} (X-Span-ID: {:?})" , result, ( client. context( ) as & Has <XSpanIdString >) . get( ) . clone( ) ) ;
206
+ info ! ( "{:?} (X-Span-ID: {:?})" , result, ( client. context( ) as & dyn Has <XSpanIdString >) . get( ) . clone( ) ) ;
205
207
} ,
206
208
Some ( "ResponsesWithHeadersGet" ) => {
207
209
let result = rt. block_on ( client. responses_with_headers_get (
208
210
) ) ;
209
- info ! ( "{:?} (X-Span-ID: {:?})" , result, ( client. context( ) as & Has <XSpanIdString >) . get( ) . clone( ) ) ;
211
+ info ! ( "{:?} (X-Span-ID: {:?})" , result, ( client. context( ) as & dyn Has <XSpanIdString >) . get( ) . clone( ) ) ;
210
212
} ,
211
213
Some ( "Rfc7807Get" ) => {
212
214
let result = rt. block_on ( client. rfc7807_get (
213
215
) ) ;
214
- info ! ( "{:?} (X-Span-ID: {:?})" , result, ( client. context( ) as & Has <XSpanIdString >) . get( ) . clone( ) ) ;
216
+ info ! ( "{:?} (X-Span-ID: {:?})" , result, ( client. context( ) as & dyn Has <XSpanIdString >) . get( ) . clone( ) ) ;
215
217
} ,
216
218
Some ( "UntypedPropertyGet" ) => {
217
219
let result = rt. block_on ( client. untyped_property_get (
218
220
None
219
221
) ) ;
220
- info ! ( "{:?} (X-Span-ID: {:?})" , result, ( client. context( ) as & Has <XSpanIdString >) . get( ) . clone( ) ) ;
222
+ info ! ( "{:?} (X-Span-ID: {:?})" , result, ( client. context( ) as & dyn Has <XSpanIdString >) . get( ) . clone( ) ) ;
221
223
} ,
222
224
Some ( "UuidGet" ) => {
223
225
let result = rt. block_on ( client. uuid_get (
224
226
) ) ;
225
- info ! ( "{:?} (X-Span-ID: {:?})" , result, ( client. context( ) as & Has <XSpanIdString >) . get( ) . clone( ) ) ;
227
+ info ! ( "{:?} (X-Span-ID: {:?})" , result, ( client. context( ) as & dyn Has <XSpanIdString >) . get( ) . clone( ) ) ;
226
228
} ,
227
229
Some ( "XmlExtraPost" ) => {
228
230
let result = rt. block_on ( client. xml_extra_post (
229
231
None
230
232
) ) ;
231
- info ! ( "{:?} (X-Span-ID: {:?})" , result, ( client. context( ) as & Has <XSpanIdString >) . get( ) . clone( ) ) ;
233
+ info ! ( "{:?} (X-Span-ID: {:?})" , result, ( client. context( ) as & dyn Has <XSpanIdString >) . get( ) . clone( ) ) ;
232
234
} ,
233
235
Some ( "XmlOtherPost" ) => {
234
236
let result = rt. block_on ( client. xml_other_post (
235
237
None
236
238
) ) ;
237
- info ! ( "{:?} (X-Span-ID: {:?})" , result, ( client. context( ) as & Has <XSpanIdString >) . get( ) . clone( ) ) ;
239
+ info ! ( "{:?} (X-Span-ID: {:?})" , result, ( client. context( ) as & dyn Has <XSpanIdString >) . get( ) . clone( ) ) ;
238
240
} ,
239
241
Some ( "XmlOtherPut" ) => {
240
242
let result = rt. block_on ( client. xml_other_put (
241
243
None
242
244
) ) ;
243
- info ! ( "{:?} (X-Span-ID: {:?})" , result, ( client. context( ) as & Has <XSpanIdString >) . get( ) . clone( ) ) ;
245
+ info ! ( "{:?} (X-Span-ID: {:?})" , result, ( client. context( ) as & dyn Has <XSpanIdString >) . get( ) . clone( ) ) ;
244
246
} ,
245
247
Some ( "XmlPost" ) => {
246
248
let result = rt. block_on ( client. xml_post (
247
249
None
248
250
) ) ;
249
- info ! ( "{:?} (X-Span-ID: {:?})" , result, ( client. context( ) as & Has <XSpanIdString >) . get( ) . clone( ) ) ;
251
+ info ! ( "{:?} (X-Span-ID: {:?})" , result, ( client. context( ) as & dyn Has <XSpanIdString >) . get( ) . clone( ) ) ;
250
252
} ,
251
253
Some ( "XmlPut" ) => {
252
254
let result = rt. block_on ( client. xml_put (
253
255
None
254
256
) ) ;
255
- info ! ( "{:?} (X-Span-ID: {:?})" , result, ( client. context( ) as & Has <XSpanIdString >) . get( ) . clone( ) ) ;
257
+ info ! ( "{:?} (X-Span-ID: {:?})" , result, ( client. context( ) as & dyn Has <XSpanIdString >) . get( ) . clone( ) ) ;
258
+ } ,
259
+ Some ( "GetRepoInfo" ) => {
260
+ let result = rt. block_on ( client. get_repo_info (
261
+ "repo_id_example" . to_string ( )
262
+ ) ) ;
263
+ info ! ( "{:?} (X-Span-ID: {:?})" , result, ( client. context( ) as & dyn Has <XSpanIdString >) . get( ) . clone( ) ) ;
256
264
} ,
257
265
_ => {
258
266
panic ! ( "Invalid operation provided" )
0 commit comments