@flock/wirespec 0.5.0 → 0.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -28,29 +28,38 @@
28
28
  var Default_getInstance = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.i1;
29
29
  var Unit_getInstance = kotlin_kotlin.$_$.i3;
30
30
  var ArrayList_init_$Create$ = kotlin_kotlin.$_$.g;
31
- var addAll = kotlin_kotlin.$_$.z3;
31
+ var plus = kotlin_kotlin.$_$.p5;
32
+ var ParameterLocation_QUERY_getInstance = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.t;
32
33
  var collectionSizeOrDefault = kotlin_kotlin.$_$.c4;
33
34
  var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.f;
34
- var Shape = kotlin_community_flock_wirespec_compiler_core.$_$.s;
35
- var Type = kotlin_community_flock_wirespec_compiler_core.$_$.t;
35
+ var ParameterLocation_HEADER_getInstance = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.s;
36
+ var ParameterLocation_BODY_getInstance = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.r;
36
37
  var emptyList = kotlin_kotlin.$_$.r4;
37
38
  var noWhenBranchMatchedException = kotlin_kotlin.$_$.ta;
39
+ var NotImplementedError = kotlin_kotlin.$_$.u9;
40
+ var SchemaObject = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.g;
38
41
  var ReferenceObject = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.d;
42
+ var Content = kotlin_community_flock_wirespec_compiler_core.$_$.g;
43
+ var Request = kotlin_community_flock_wirespec_compiler_core.$_$.i;
44
+ var addAll = kotlin_kotlin.$_$.z3;
45
+ var listOf = kotlin_kotlin.$_$.i5;
46
+ var emptyMap = kotlin_kotlin.$_$.s4;
47
+ var _StatusCode___get_value__impl__we50mu = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.b1;
48
+ var Response = kotlin_community_flock_wirespec_compiler_core.$_$.j;
49
+ var Endpoint = kotlin_community_flock_wirespec_compiler_core.$_$.m;
50
+ var Shape = kotlin_community_flock_wirespec_compiler_core.$_$.s;
51
+ var Type = kotlin_community_flock_wirespec_compiler_core.$_$.t;
39
52
  var ParameterObject = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.b;
40
53
  var Ref = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.e;
41
54
  var toString = kotlin_kotlin.$_$.y7;
42
55
  var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.e1;
43
56
  var to = kotlin_kotlin.$_$.xa;
44
- var SchemaObject = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.g;
45
- var NotImplementedError = kotlin_kotlin.$_$.u9;
46
57
  var BooleanObject = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.a;
47
58
  var ResponseObject = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.f;
48
59
  var Identifier = kotlin_community_flock_wirespec_compiler_core.$_$.o;
49
60
  var Custom = kotlin_community_flock_wirespec_compiler_core.$_$.p;
50
61
  var contains = kotlin_kotlin.$_$.d4;
51
62
  var Field = kotlin_community_flock_wirespec_compiler_core.$_$.r;
52
- var listOf = kotlin_kotlin.$_$.i5;
53
- var plus = kotlin_kotlin.$_$.p5;
54
63
  var getStringHashCode = kotlin_kotlin.$_$.x6;
55
64
  var hashCode = kotlin_kotlin.$_$.y6;
56
65
  var THROW_CCE = kotlin_kotlin.$_$.y9;
@@ -79,15 +88,6 @@
79
88
  var Path__hashCode_impl_go73kd = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.x;
80
89
  var StatusCode = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.h;
81
90
  var StatusCode__hashCode_impl_fevhvx = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.a1;
82
- var emptyMap = kotlin_kotlin.$_$.s4;
83
- var ParameterLocation_QUERY_getInstance = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.t;
84
- var ParameterLocation_HEADER_getInstance = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.s;
85
- var ParameterLocation_BODY_getInstance = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.r;
86
- var Content = kotlin_community_flock_wirespec_compiler_core.$_$.g;
87
- var Request = kotlin_community_flock_wirespec_compiler_core.$_$.i;
88
- var _StatusCode___get_value__impl__we50mu = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.b1;
89
- var Response = kotlin_community_flock_wirespec_compiler_core.$_$.j;
90
- var Endpoint = kotlin_community_flock_wirespec_compiler_core.$_$.m;
91
91
  var toMap = kotlin_kotlin.$_$.a6;
92
92
  var Default_getInstance_0 = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.j1;
93
93
  var ParameterLocation_QUERY_getInstance_0 = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.w;
@@ -158,7 +158,303 @@
158
158
  return Companion_instance;
159
159
  }
160
160
  function parseEndpoints($this) {
161
- return flatMapRequests($this.x1s_1, $this, OpenApiParser$parseEndpoints$lambda($this));
161
+ var tmp$ret$48;
162
+ // Inline function 'kotlin.collections.flatMap' call
163
+ var tmp1_flatMap = $this.x1s_1.m1a_1;
164
+ var tmp$ret$47;
165
+ // Inline function 'kotlin.collections.flatMapTo' call
166
+ var tmp0_flatMapTo = ArrayList_init_$Create$();
167
+ var tmp$ret$0;
168
+ // Inline function 'kotlin.collections.iterator' call
169
+ tmp$ret$0 = tmp1_flatMap.u().c();
170
+ var tmp0_iterator = tmp$ret$0;
171
+ while (tmp0_iterator.d()) {
172
+ var element = tmp0_iterator.e();
173
+ var tmp$ret$46;
174
+ // Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.parseEndpoints.<anonymous>' call
175
+ var tmp$ret$1;
176
+ // Inline function 'kotlin.collections.component1' call
177
+ tmp$ret$1 = element.v().x1a_1;
178
+ var path = tmp$ret$1;
179
+ var tmp$ret$2;
180
+ // Inline function 'kotlin.collections.component2' call
181
+ tmp$ret$2 = element.w();
182
+ var pathItem = tmp$ret$2;
183
+ var tmp$ret$45;
184
+ // Inline function 'kotlin.collections.flatMap' call
185
+ var tmp1_flatMap_0 = toOperationList(pathItem, $this);
186
+ var tmp$ret$44;
187
+ // Inline function 'kotlin.collections.flatMapTo' call
188
+ var tmp0_flatMapTo_0 = ArrayList_init_$Create$();
189
+ var tmp$ret$3;
190
+ // Inline function 'kotlin.collections.iterator' call
191
+ tmp$ret$3 = tmp1_flatMap_0.u().c();
192
+ var tmp0_iterator_0 = tmp$ret$3;
193
+ while (tmp0_iterator_0.d()) {
194
+ var element_0 = tmp0_iterator_0.e();
195
+ var tmp$ret$43;
196
+ // Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.parseEndpoints.<anonymous>.<anonymous>' call
197
+ var tmp$ret$4;
198
+ // Inline function 'kotlin.collections.component1' call
199
+ tmp$ret$4 = element_0.v();
200
+ var method = tmp$ret$4;
201
+ var tmp$ret$5;
202
+ // Inline function 'kotlin.collections.component2' call
203
+ tmp$ret$5 = element_0.w();
204
+ var operation = tmp$ret$5;
205
+ var parameters = plus(resolveParameters_0(pathItem, $this), resolveParameters(operation, $this));
206
+ var segments = toSegments(path, $this, parameters);
207
+ var name = toName(operation, $this, segments, method);
208
+ var tmp$ret$11;
209
+ // Inline function 'kotlin.collections.map' call
210
+ var tmp$ret$8;
211
+ // Inline function 'kotlin.collections.filter' call
212
+ var tmp$ret$7;
213
+ // Inline function 'kotlin.collections.filterTo' call
214
+ var tmp0_filterTo = ArrayList_init_$Create$();
215
+ var tmp0_iterator_1 = parameters.c();
216
+ while (tmp0_iterator_1.d()) {
217
+ var element_1 = tmp0_iterator_1.e();
218
+ var tmp$ret$6;
219
+ // Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.parseEndpoints.<anonymous>.<anonymous>.<anonymous>' call
220
+ tmp$ret$6 = element_1.h1c_1.equals(ParameterLocation_QUERY_getInstance());
221
+ if (tmp$ret$6) {
222
+ tmp0_filterTo.a(element_1);
223
+ }
224
+ }
225
+ tmp$ret$7 = tmp0_filterTo;
226
+ tmp$ret$8 = tmp$ret$7;
227
+ var tmp2_map = tmp$ret$8;
228
+ var tmp$ret$10;
229
+ // Inline function 'kotlin.collections.mapTo' call
230
+ var tmp1_mapTo = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp2_map, 10));
231
+ var tmp0_iterator_2 = tmp2_map.c();
232
+ while (tmp0_iterator_2.d()) {
233
+ var item = tmp0_iterator_2.e();
234
+ var tmp$ret$9;
235
+ // Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.parseEndpoints.<anonymous>.<anonymous>.<anonymous>' call
236
+ tmp$ret$9 = toField(item, $this);
237
+ tmp1_mapTo.a(tmp$ret$9);
238
+ }
239
+ tmp$ret$10 = tmp1_mapTo;
240
+ tmp$ret$11 = tmp$ret$10;
241
+ var query = tmp$ret$11;
242
+ var tmp$ret$17;
243
+ // Inline function 'kotlin.collections.map' call
244
+ var tmp$ret$14;
245
+ // Inline function 'kotlin.collections.filter' call
246
+ var tmp$ret$13;
247
+ // Inline function 'kotlin.collections.filterTo' call
248
+ var tmp3_filterTo = ArrayList_init_$Create$();
249
+ var tmp0_iterator_3 = parameters.c();
250
+ while (tmp0_iterator_3.d()) {
251
+ var element_2 = tmp0_iterator_3.e();
252
+ var tmp$ret$12;
253
+ // Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.parseEndpoints.<anonymous>.<anonymous>.<anonymous>' call
254
+ tmp$ret$12 = element_2.h1c_1.equals(ParameterLocation_HEADER_getInstance());
255
+ if (tmp$ret$12) {
256
+ tmp3_filterTo.a(element_2);
257
+ }
258
+ }
259
+ tmp$ret$13 = tmp3_filterTo;
260
+ tmp$ret$14 = tmp$ret$13;
261
+ var tmp5_map = tmp$ret$14;
262
+ var tmp$ret$16;
263
+ // Inline function 'kotlin.collections.mapTo' call
264
+ var tmp4_mapTo = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp5_map, 10));
265
+ var tmp0_iterator_4 = tmp5_map.c();
266
+ while (tmp0_iterator_4.d()) {
267
+ var item_0 = tmp0_iterator_4.e();
268
+ var tmp$ret$15;
269
+ // Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.parseEndpoints.<anonymous>.<anonymous>.<anonymous>' call
270
+ tmp$ret$15 = toField(item_0, $this);
271
+ tmp4_mapTo.a(tmp$ret$15);
272
+ }
273
+ tmp$ret$16 = tmp4_mapTo;
274
+ tmp$ret$17 = tmp$ret$16;
275
+ var headers = tmp$ret$17;
276
+ var tmp$ret$29;
277
+ // Inline function 'kotlin.collections.ifEmpty' call
278
+ var tmp$ret$27;
279
+ // Inline function 'kotlin.collections.flatMap' call
280
+ var tmp$ret$20;
281
+ // Inline function 'kotlin.collections.filter' call
282
+ var tmp$ret$19;
283
+ // Inline function 'kotlin.collections.filterTo' call
284
+ var tmp6_filterTo = ArrayList_init_$Create$();
285
+ var tmp0_iterator_5 = parameters.c();
286
+ while (tmp0_iterator_5.d()) {
287
+ var element_3 = tmp0_iterator_5.e();
288
+ var tmp$ret$18;
289
+ // Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.parseEndpoints.<anonymous>.<anonymous>.<anonymous>' call
290
+ tmp$ret$18 = element_3.h1c_1.equals(ParameterLocation_BODY_getInstance());
291
+ if (tmp$ret$18) {
292
+ tmp6_filterTo.a(element_3);
293
+ }
294
+ }
295
+ tmp$ret$19 = tmp6_filterTo;
296
+ tmp$ret$20 = tmp$ret$19;
297
+ var tmp8_flatMap = tmp$ret$20;
298
+ var tmp$ret$26;
299
+ // Inline function 'kotlin.collections.flatMapTo' call
300
+ var tmp7_flatMapTo = ArrayList_init_$Create$();
301
+ var tmp0_iterator_6 = tmp8_flatMap.c();
302
+ while (tmp0_iterator_6.d()) {
303
+ var element_4 = tmp0_iterator_6.e();
304
+ var tmp$ret$25;
305
+ // Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.parseEndpoints.<anonymous>.<anonymous>.<anonymous>' call
306
+ var tmp$ret$24;
307
+ // Inline function 'kotlin.collections.map' call
308
+ var tmp$ret$21;
309
+ // Inline function 'kotlin.collections.orEmpty' call
310
+ var tmp0_elvis_lhs = $this.x1s_1.k1a_1;
311
+ var tmp0_orEmpty = tmp0_elvis_lhs == null ? operation.v1b_1 : tmp0_elvis_lhs;
312
+ var tmp0_elvis_lhs_0 = tmp0_orEmpty;
313
+ tmp$ret$21 = tmp0_elvis_lhs_0 == null ? emptyList() : tmp0_elvis_lhs_0;
314
+ var tmp2_map_0 = tmp$ret$21;
315
+ var tmp$ret$23;
316
+ // Inline function 'kotlin.collections.mapTo' call
317
+ var tmp1_mapTo_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp2_map_0, 10));
318
+ var tmp0_iterator_7 = tmp2_map_0.c();
319
+ while (tmp0_iterator_7.d()) {
320
+ var item_1 = tmp0_iterator_7.e();
321
+ var tmp$ret$22;
322
+ // Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.parseEndpoints.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
323
+ var schema = element_4.k1c_1;
324
+ var tmp;
325
+ if (schema instanceof ReferenceObject) {
326
+ tmp = toReference(schema, $this);
327
+ } else {
328
+ if (schema instanceof SchemaObject) {
329
+ tmp = toReference_0(schema, $this, Common_getInstance().v1s([name, 'RequestBody']));
330
+ } else {
331
+ if (schema == null) {
332
+ throw new NotImplementedError();
333
+ } else {
334
+ noWhenBranchMatchedException();
335
+ }
336
+ }
337
+ }
338
+ var tmp_0 = tmp;
339
+ var tmp0_elvis_lhs_1 = element_4.j1c_1;
340
+ tmp$ret$22 = new Request(new Content(item_1, tmp_0, tmp0_elvis_lhs_1 == null ? false : tmp0_elvis_lhs_1));
341
+ tmp1_mapTo_0.a(tmp$ret$22);
342
+ }
343
+ tmp$ret$23 = tmp1_mapTo_0;
344
+ tmp$ret$24 = tmp$ret$23;
345
+ tmp$ret$25 = tmp$ret$24;
346
+ var list = tmp$ret$25;
347
+ addAll(tmp7_flatMapTo, list);
348
+ }
349
+ tmp$ret$26 = tmp7_flatMapTo;
350
+ tmp$ret$27 = tmp$ret$26;
351
+ var tmp9_ifEmpty = tmp$ret$27;
352
+ var tmp_1;
353
+ if (tmp9_ifEmpty.g()) {
354
+ var tmp$ret$28;
355
+ // Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.parseEndpoints.<anonymous>.<anonymous>.<anonymous>' call
356
+ tmp$ret$28 = listOf(new Request(null));
357
+ tmp_1 = tmp$ret$28;
358
+ } else {
359
+ tmp_1 = tmp9_ifEmpty;
360
+ }
361
+ tmp$ret$29 = tmp_1;
362
+ var requests = tmp$ret$29;
363
+ var tmp$ret$42;
364
+ // Inline function 'kotlin.collections.flatMap' call
365
+ var tmp$ret$30;
366
+ // Inline function 'kotlin.collections.orEmpty' call
367
+ var tmp10_orEmpty = operation.y1b_1;
368
+ var tmp0_elvis_lhs_2 = tmp10_orEmpty;
369
+ tmp$ret$30 = tmp0_elvis_lhs_2 == null ? emptyMap() : tmp0_elvis_lhs_2;
370
+ var tmp12_flatMap = tmp$ret$30;
371
+ var tmp$ret$41;
372
+ // Inline function 'kotlin.collections.flatMapTo' call
373
+ var tmp11_flatMapTo = ArrayList_init_$Create$();
374
+ var tmp$ret$31;
375
+ // Inline function 'kotlin.collections.iterator' call
376
+ tmp$ret$31 = tmp12_flatMap.u().c();
377
+ var tmp0_iterator_8 = tmp$ret$31;
378
+ while (tmp0_iterator_8.d()) {
379
+ var element_5 = tmp0_iterator_8.e();
380
+ var tmp$ret$40;
381
+ // Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.parseEndpoints.<anonymous>.<anonymous>.<anonymous>' call
382
+ var tmp$ret$32;
383
+ // Inline function 'kotlin.collections.component1' call
384
+ tmp$ret$32 = element_5.v().q1e_1;
385
+ var status = tmp$ret$32;
386
+ var tmp$ret$33;
387
+ // Inline function 'kotlin.collections.component2' call
388
+ tmp$ret$33 = element_5.w();
389
+ var res = tmp$ret$33;
390
+ var tmp$ret$39;
391
+ // Inline function 'kotlin.collections.map' call
392
+ var tmp$ret$34;
393
+ // Inline function 'kotlin.collections.orEmpty' call
394
+ var tmp0_elvis_lhs_3 = $this.x1s_1.l1a_1;
395
+ var tmp0_orEmpty_0 = tmp0_elvis_lhs_3 == null ? operation.w1b_1 : tmp0_elvis_lhs_3;
396
+ var tmp0_elvis_lhs_4 = tmp0_orEmpty_0;
397
+ tmp$ret$34 = tmp0_elvis_lhs_4 == null ? emptyList() : tmp0_elvis_lhs_4;
398
+ var tmp2_map_1 = tmp$ret$34;
399
+ var tmp$ret$38;
400
+ // Inline function 'kotlin.collections.mapTo' call
401
+ var tmp1_mapTo_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp2_map_1, 10));
402
+ var tmp0_iterator_9 = tmp2_map_1.c();
403
+ while (tmp0_iterator_9.d()) {
404
+ var item_2 = tmp0_iterator_9.e();
405
+ var tmp$ret$37;
406
+ // Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.parseEndpoints.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
407
+ var tmp_2 = _StatusCode___get_value__impl__we50mu(status);
408
+ var tmp0_safe_receiver = resolve_1(res, $this).u1e_1;
409
+ var tmp_3;
410
+ if (tmp0_safe_receiver == null) {
411
+ tmp_3 = null;
412
+ } else {
413
+ var tmp$ret$36;
414
+ // Inline function 'kotlin.let' call
415
+ // Inline function 'kotlin.contracts.contract' call
416
+ var tmp$ret$35;
417
+ // Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.parseEndpoints.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
418
+ var tmp0_subject = tmp0_safe_receiver;
419
+ var tmp_4;
420
+ if (tmp0_subject instanceof ReferenceObject) {
421
+ tmp_4 = toReference(tmp0_safe_receiver, $this);
422
+ } else {
423
+ if (tmp0_subject instanceof SchemaObject) {
424
+ tmp_4 = toReference_0(tmp0_safe_receiver, $this, Common_getInstance().v1s([name, _StatusCode___get_value__impl__we50mu(status), 'ResponseBody']));
425
+ } else {
426
+ noWhenBranchMatchedException();
427
+ }
428
+ }
429
+ tmp$ret$35 = new Content(item_2, tmp_4, false);
430
+ tmp$ret$36 = tmp$ret$35;
431
+ tmp_3 = tmp$ret$36;
432
+ }
433
+ tmp$ret$37 = new Response(tmp_2, tmp_3);
434
+ tmp1_mapTo_1.a(tmp$ret$37);
435
+ }
436
+ tmp$ret$38 = tmp1_mapTo_1;
437
+ tmp$ret$39 = tmp$ret$38;
438
+ tmp$ret$40 = tmp$ret$39;
439
+ var list_0 = tmp$ret$40;
440
+ addAll(tmp11_flatMapTo, list_0);
441
+ }
442
+ tmp$ret$41 = tmp11_flatMapTo;
443
+ tmp$ret$42 = tmp$ret$41;
444
+ var responses = tmp$ret$42;
445
+ tmp$ret$43 = listOf(new Endpoint(name, method, segments, query, headers, emptyList(), requests, responses));
446
+ var list_1 = tmp$ret$43;
447
+ addAll(tmp0_flatMapTo_0, list_1);
448
+ }
449
+ tmp$ret$44 = tmp0_flatMapTo_0;
450
+ tmp$ret$45 = tmp$ret$44;
451
+ tmp$ret$46 = tmp$ret$45;
452
+ var list_2 = tmp$ret$46;
453
+ addAll(tmp0_flatMapTo, list_2);
454
+ }
455
+ tmp$ret$47 = tmp0_flatMapTo;
456
+ tmp$ret$48 = tmp$ret$47;
457
+ return tmp$ret$48;
162
458
  }
163
459
  function parseRequestBody($this) {
164
460
  return flatMapRequests($this.x1s_1, $this, OpenApiParser$parseRequestBody$lambda($this));
@@ -223,7 +519,7 @@
223
519
  // Inline function 'kotlin.collections.map' call
224
520
  var tmp$ret$0;
225
521
  // Inline function 'kotlin.collections.orEmpty' call
226
- var tmp0_orEmpty = _this__u8e3s4.e1c_1;
522
+ var tmp0_orEmpty = _this__u8e3s4.x1b_1;
227
523
  var tmp0_elvis_lhs = tmp0_orEmpty;
228
524
  tmp$ret$0 = tmp0_elvis_lhs == null ? emptyList() : tmp0_elvis_lhs;
229
525
  var tmp2_map = tmp$ret$0;
@@ -258,7 +554,7 @@
258
554
  // Inline function 'kotlin.collections.map' call
259
555
  var tmp$ret$0;
260
556
  // Inline function 'kotlin.collections.orEmpty' call
261
- var tmp0_orEmpty = _this__u8e3s4.z1c_1;
557
+ var tmp0_orEmpty = _this__u8e3s4.m1b_1;
262
558
  var tmp0_elvis_lhs = tmp0_orEmpty;
263
559
  tmp$ret$0 = tmp0_elvis_lhs == null ? emptyList() : tmp0_elvis_lhs;
264
560
  var tmp2_map = tmp$ret$0;
@@ -595,59 +891,60 @@
595
891
  return true;
596
892
  };
597
893
  function toReference(_this__u8e3s4, $this) {
598
- var tmp0_elvis_lhs = resolveSchemaObject(_this__u8e3s4, $this);
894
+ var tmp$ret$1;
895
+ // Inline function 'kotlin.let' call
896
+ var tmp0_let = resolveSchemaObject(_this__u8e3s4, $this);
897
+ // Inline function 'kotlin.contracts.contract' call
898
+ var tmp$ret$0;
899
+ // Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.toReference.<anonymous>' call
900
+ var referencingObject = tmp0_let.i3();
901
+ var schema = tmp0_let.j3();
902
+ var additionalProperties = schema.m1e_1;
599
903
  var tmp;
600
- if (tmp0_elvis_lhs == null) {
601
- var tmp0_error = 'Cannot resolve ref: ' + new Ref(_this__u8e3s4.g1d_1);
602
- throw IllegalStateException_init_$Create$(toString(tmp0_error));
904
+ if (additionalProperties instanceof BooleanObject) {
905
+ throw new NotImplementedError('An operation is not implemented: additionalProperties = true not implemented');
603
906
  } else {
604
- tmp = tmp0_elvis_lhs;
605
- }
606
- var tmp1_container = tmp;
607
- var referencingObject = tmp1_container.i3();
608
- var schema = tmp1_container.j3();
609
- if (!(schema.m1e_1 == null)) {
610
- var additionalProperties = schema.m1e_1;
611
- var tmp_0;
612
- if (additionalProperties instanceof BooleanObject) {
613
- throw new NotImplementedError();
907
+ if (additionalProperties instanceof ReferenceObject) {
908
+ tmp = new Custom(Common_getInstance().v1s([getReference(additionalProperties, $this)]), false, true);
614
909
  } else {
615
- if (additionalProperties instanceof ReferenceObject) {
616
- tmp_0 = new Custom(Common_getInstance().v1s([getReference(additionalProperties, $this)]), false, true);
910
+ if (additionalProperties instanceof SchemaObject) {
911
+ tmp = new Custom(Common_getInstance().v1s([getReference(referencingObject, $this)]), false, true);
617
912
  } else {
618
- if (additionalProperties instanceof SchemaObject) {
619
- tmp_0 = new Custom(Common_getInstance().v1s([getReference(referencingObject, $this)]), false, true);
620
- } else {
621
- if (additionalProperties == null) {
622
- throw new NotImplementedError();
913
+ if (additionalProperties == null) {
914
+ var tmp0_subject = schema.i1e_1;
915
+ var tmp0 = tmp0_subject == null ? -1 : tmp0_subject.q4_1;
916
+ var tmp_0;
917
+ if (tmp0 === 4) {
918
+ var items = schema.j1e_1;
919
+ var tmp_1;
920
+ if (items instanceof ReferenceObject) {
921
+ tmp_1 = new Custom(Common_getInstance().v1s([getReference(items, $this)]), true);
922
+ } else {
923
+ if (items instanceof SchemaObject) {
924
+ tmp_1 = new Custom(Common_getInstance().v1s([getReference(referencingObject, $this), 'Array']), true);
925
+ } else {
926
+ if (items == null) {
927
+ var tmp0_error = 'items cannot be null when type is array: ' + new Ref(_this__u8e3s4.g1d_1);
928
+ throw IllegalStateException_init_$Create$(toString(tmp0_error));
929
+ } else {
930
+ noWhenBranchMatchedException();
931
+ }
932
+ }
933
+ }
934
+ tmp_0 = tmp_1;
623
935
  } else {
624
- noWhenBranchMatchedException();
936
+ tmp_0 = new Custom(Common_getInstance().v1s([getReference(referencingObject, $this)]), false);
625
937
  }
938
+ tmp = tmp_0;
939
+ } else {
940
+ noWhenBranchMatchedException();
626
941
  }
627
942
  }
628
943
  }
629
- return tmp_0;
630
944
  }
631
- var tmp2_subject = schema.i1e_1;
632
- var tmp0 = tmp2_subject == null ? -1 : tmp2_subject.q4_1;
633
- var tmp_1;
634
- if (tmp0 === 4) {
635
- var items = schema.j1e_1;
636
- var tmp_2;
637
- if (items instanceof ReferenceObject) {
638
- tmp_2 = new Custom(Common_getInstance().v1s([getReference(items, $this)]), true);
639
- } else {
640
- if (items instanceof SchemaObject) {
641
- tmp_2 = new Custom(Common_getInstance().v1s([getReference(referencingObject, $this), 'Array']), true);
642
- } else {
643
- throw new NotImplementedError();
644
- }
645
- }
646
- tmp_1 = tmp_2;
647
- } else {
648
- tmp_1 = new Custom(Common_getInstance().v1s([getReference(referencingObject, $this)]), false);
649
- }
650
- return tmp_1;
945
+ tmp$ret$0 = tmp;
946
+ tmp$ret$1 = tmp$ret$0;
947
+ return tmp$ret$1;
651
948
  }
652
949
  function toReference_0(_this__u8e3s4, $this, name) {
653
950
  var type = _this__u8e3s4.i1e_1;
@@ -703,7 +1000,7 @@
703
1000
  tmp = tmp_0;
704
1001
  break;
705
1002
  case 6:
706
- throw new NotImplementedError();
1003
+ throw new NotImplementedError('An operation is not implemented: Type file not implemented');
707
1004
  default:
708
1005
  noWhenBranchMatchedException();
709
1006
  break;
@@ -730,28 +1027,28 @@
730
1027
  var tmp;
731
1028
  switch (tmp0) {
732
1029
  case 0:
733
- tmp = _this__u8e3s4.q1c_1;
1030
+ tmp = _this__u8e3s4.d1b_1;
734
1031
  break;
735
1032
  case 1:
736
- tmp = _this__u8e3s4.s1c_1;
1033
+ tmp = _this__u8e3s4.f1b_1;
737
1034
  break;
738
1035
  case 2:
739
- tmp = _this__u8e3s4.r1c_1;
1036
+ tmp = _this__u8e3s4.e1b_1;
740
1037
  break;
741
1038
  case 3:
742
- tmp = _this__u8e3s4.t1c_1;
1039
+ tmp = _this__u8e3s4.g1b_1;
743
1040
  break;
744
1041
  case 4:
745
- tmp = _this__u8e3s4.u1c_1;
1042
+ tmp = _this__u8e3s4.h1b_1;
746
1043
  break;
747
1044
  case 5:
748
- tmp = _this__u8e3s4.v1c_1;
1045
+ tmp = _this__u8e3s4.i1b_1;
749
1046
  break;
750
1047
  case 6:
751
- tmp = _this__u8e3s4.w1c_1;
1048
+ tmp = _this__u8e3s4.j1b_1;
752
1049
  break;
753
1050
  case 7:
754
- tmp = _this__u8e3s4.x1c_1;
1051
+ tmp = _this__u8e3s4.k1b_1;
755
1052
  break;
756
1053
  default:
757
1054
  noWhenBranchMatchedException();
@@ -798,7 +1095,7 @@
798
1095
  // Inline function 'kotlin.contracts.contract' call
799
1096
  var tmp$ret$4;
800
1097
  // Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.toField.<anonymous>' call
801
- var type = tmp0_let.c1b_1;
1098
+ var type = tmp0_let.l1c_1;
802
1099
  var tmp0 = type == null ? -1 : type.q4_1;
803
1100
  var tmp;
804
1101
  switch (tmp0) {
@@ -818,7 +1115,7 @@
818
1115
  tmp = tmp$ret$1;
819
1116
  break;
820
1117
  case 4:
821
- var tmp0_safe_receiver = tmp0_let.d1b_1;
1118
+ var tmp0_safe_receiver = tmp0_let.m1c_1;
822
1119
  var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : resolve(tmp0_safe_receiver, $this);
823
1120
  var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.i1e_1;
824
1121
  var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : toPrimitive(tmp2_safe_receiver, $this);
@@ -862,8 +1159,8 @@
862
1159
  // Inline function 'kotlin.contracts.contract' call
863
1160
  var tmp$ret$6;
864
1161
  // Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.toField.<anonymous>' call
865
- var tmp_2 = new Identifier(_this__u8e3s4.x1a_1);
866
- var tmp0_elvis_lhs = _this__u8e3s4.a1b_1;
1162
+ var tmp_2 = new Identifier(_this__u8e3s4.g1c_1);
1163
+ var tmp0_elvis_lhs = _this__u8e3s4.j1c_1;
867
1164
  tmp$ret$6 = new Field(tmp_2, tmp1_let, !(tmp0_elvis_lhs == null ? false : tmp0_elvis_lhs));
868
1165
  tmp$ret$7 = tmp$ret$6;
869
1166
  return tmp$ret$7;
@@ -916,7 +1213,7 @@
916
1213
  var element = tmp0_iterator_0.e();
917
1214
  var tmp$ret$3;
918
1215
  // Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.toSegments.<anonymous>.<anonymous>' call
919
- tmp$ret$3 = element.x1a_1 === param;
1216
+ tmp$ret$3 = element.g1c_1 === param;
920
1217
  if (tmp$ret$3) {
921
1218
  tmp$ret$4 = element;
922
1219
  break $l$block;
@@ -935,7 +1232,7 @@
935
1232
  // Inline function 'kotlin.contracts.contract' call
936
1233
  var tmp$ret$6;
937
1234
  // Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.toSegments.<anonymous>.<anonymous>' call
938
- var tmp0_safe_receiver_0 = tmp0_safe_receiver.c1b_1;
1235
+ var tmp0_safe_receiver_0 = tmp0_safe_receiver.l1c_1;
939
1236
  tmp$ret$6 = tmp0_safe_receiver_0 == null ? null : toPrimitive(tmp0_safe_receiver_0, $this);
940
1237
  tmp$ret$7 = tmp$ret$6;
941
1238
  tmp_2 = tmp$ret$7;
@@ -975,7 +1272,7 @@
975
1272
  }
976
1273
  function toName(_this__u8e3s4, $this, segments, method) {
977
1274
  var tmp0_safe_receiver = _this__u8e3s4;
978
- var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.b1c_1;
1275
+ var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.u1b_1;
979
1276
  var tmp;
980
1277
  if (tmp1_safe_receiver == null) {
981
1278
  tmp = null;
@@ -1061,7 +1358,7 @@
1061
1358
  // Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.flatMapRequests.<anonymous>' call
1062
1359
  var tmp$ret$1;
1063
1360
  // Inline function 'kotlin.collections.component1' call
1064
- tmp$ret$1 = element.v().d1d_1;
1361
+ tmp$ret$1 = element.v().x1a_1;
1065
1362
  var path = tmp$ret$1;
1066
1363
  var tmp$ret$2;
1067
1364
  // Inline function 'kotlin.collections.component2' call
@@ -1093,9 +1390,10 @@
1093
1390
  // Inline function 'kotlin.collections.map' call
1094
1391
  var tmp$ret$6;
1095
1392
  // Inline function 'kotlin.collections.orEmpty' call
1096
- var tmp0_orEmpty = _this__u8e3s4.k1a_1;
1097
- var tmp0_elvis_lhs = tmp0_orEmpty;
1098
- tmp$ret$6 = tmp0_elvis_lhs == null ? emptyList() : tmp0_elvis_lhs;
1393
+ var tmp0_elvis_lhs = _this__u8e3s4.k1a_1;
1394
+ var tmp0_orEmpty = tmp0_elvis_lhs == null ? operation.v1b_1 : tmp0_elvis_lhs;
1395
+ var tmp0_elvis_lhs_0 = tmp0_orEmpty;
1396
+ tmp$ret$6 = tmp0_elvis_lhs_0 == null ? emptyList() : tmp0_elvis_lhs_0;
1099
1397
  var tmp2_map = tmp$ret$6;
1100
1398
  var tmp$ret$8;
1101
1399
  // Inline function 'kotlin.collections.mapTo' call
@@ -1202,7 +1500,7 @@
1202
1500
  // Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.flatMapResponses.<anonymous>' call
1203
1501
  var tmp$ret$1;
1204
1502
  // Inline function 'kotlin.collections.component1' call
1205
- tmp$ret$1 = element.v().d1d_1;
1503
+ tmp$ret$1 = element.v().x1a_1;
1206
1504
  var path = tmp$ret$1;
1207
1505
  var tmp$ret$2;
1208
1506
  // Inline function 'kotlin.collections.component2' call
@@ -1234,7 +1532,7 @@
1234
1532
  // Inline function 'kotlin.collections.flatMap' call
1235
1533
  var tmp$ret$6;
1236
1534
  // Inline function 'kotlin.collections.orEmpty' call
1237
- var tmp0_orEmpty = operation.f1c_1;
1535
+ var tmp0_orEmpty = operation.y1b_1;
1238
1536
  var tmp0_elvis_lhs = tmp0_orEmpty;
1239
1537
  tmp$ret$6 = tmp0_elvis_lhs == null ? emptyMap() : tmp0_elvis_lhs;
1240
1538
  var tmp2_flatMap = tmp$ret$6;
@@ -1261,9 +1559,10 @@
1261
1559
  // Inline function 'kotlin.collections.map' call
1262
1560
  var tmp$ret$10;
1263
1561
  // Inline function 'kotlin.collections.orEmpty' call
1264
- var tmp0_orEmpty_0 = _this__u8e3s4.l1a_1;
1265
- var tmp0_elvis_lhs_0 = tmp0_orEmpty_0;
1266
- tmp$ret$10 = tmp0_elvis_lhs_0 == null ? emptyList() : tmp0_elvis_lhs_0;
1562
+ var tmp0_elvis_lhs_0 = _this__u8e3s4.l1a_1;
1563
+ var tmp0_orEmpty_0 = tmp0_elvis_lhs_0 == null ? operation.w1b_1 : tmp0_elvis_lhs_0;
1564
+ var tmp0_elvis_lhs_1 = tmp0_orEmpty_0;
1565
+ tmp$ret$10 = tmp0_elvis_lhs_1 == null ? emptyList() : tmp0_elvis_lhs_1;
1267
1566
  var tmp2_map = tmp$ret$10;
1268
1567
  var tmp$ret$12;
1269
1568
  // Inline function 'kotlin.collections.mapTo' call
@@ -1313,252 +1612,9 @@
1313
1612
  tmp$ret$25 = tmp$ret$24;
1314
1613
  return tmp$ret$25;
1315
1614
  }
1316
- function OpenApiParser$parseEndpoints$lambda(this$0) {
1317
- return function (req) {
1318
- var parameters = plus(resolveParameters_0(req.c1t_1, this$0), resolveParameters(req.e1t_1, this$0));
1319
- var segments = toSegments(req.b1t_1, this$0, parameters);
1320
- var name = toName(req.e1t_1, this$0, segments, req.d1t_1);
1321
- var tmp$ret$5;
1322
- // Inline function 'kotlin.collections.map' call
1323
- var tmp$ret$2;
1324
- // Inline function 'kotlin.collections.filter' call
1325
- var tmp$ret$1;
1326
- // Inline function 'kotlin.collections.filterTo' call
1327
- var tmp0_filterTo = ArrayList_init_$Create$();
1328
- var tmp0_iterator = parameters.c();
1329
- while (tmp0_iterator.d()) {
1330
- var element = tmp0_iterator.e();
1331
- var tmp$ret$0;
1332
- // Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.parseEndpoints.<anonymous>.<anonymous>' call
1333
- tmp$ret$0 = element.y1a_1.equals(ParameterLocation_QUERY_getInstance());
1334
- if (tmp$ret$0) {
1335
- tmp0_filterTo.a(element);
1336
- }
1337
- }
1338
- tmp$ret$1 = tmp0_filterTo;
1339
- tmp$ret$2 = tmp$ret$1;
1340
- var tmp2_map = tmp$ret$2;
1341
- var tmp$ret$4;
1342
- // Inline function 'kotlin.collections.mapTo' call
1343
- var tmp1_mapTo = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp2_map, 10));
1344
- var tmp0_iterator_0 = tmp2_map.c();
1345
- while (tmp0_iterator_0.d()) {
1346
- var item = tmp0_iterator_0.e();
1347
- var tmp$ret$3;
1348
- // Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.parseEndpoints.<anonymous>.<anonymous>' call
1349
- tmp$ret$3 = toField(item, this$0);
1350
- tmp1_mapTo.a(tmp$ret$3);
1351
- }
1352
- tmp$ret$4 = tmp1_mapTo;
1353
- tmp$ret$5 = tmp$ret$4;
1354
- var query = tmp$ret$5;
1355
- var tmp$ret$11;
1356
- // Inline function 'kotlin.collections.map' call
1357
- var tmp$ret$8;
1358
- // Inline function 'kotlin.collections.filter' call
1359
- var tmp$ret$7;
1360
- // Inline function 'kotlin.collections.filterTo' call
1361
- var tmp3_filterTo = ArrayList_init_$Create$();
1362
- var tmp0_iterator_1 = parameters.c();
1363
- while (tmp0_iterator_1.d()) {
1364
- var element_0 = tmp0_iterator_1.e();
1365
- var tmp$ret$6;
1366
- // Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.parseEndpoints.<anonymous>.<anonymous>' call
1367
- tmp$ret$6 = element_0.y1a_1.equals(ParameterLocation_HEADER_getInstance());
1368
- if (tmp$ret$6) {
1369
- tmp3_filterTo.a(element_0);
1370
- }
1371
- }
1372
- tmp$ret$7 = tmp3_filterTo;
1373
- tmp$ret$8 = tmp$ret$7;
1374
- var tmp5_map = tmp$ret$8;
1375
- var tmp$ret$10;
1376
- // Inline function 'kotlin.collections.mapTo' call
1377
- var tmp4_mapTo = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp5_map, 10));
1378
- var tmp0_iterator_2 = tmp5_map.c();
1379
- while (tmp0_iterator_2.d()) {
1380
- var item_0 = tmp0_iterator_2.e();
1381
- var tmp$ret$9;
1382
- // Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.parseEndpoints.<anonymous>.<anonymous>' call
1383
- tmp$ret$9 = toField(item_0, this$0);
1384
- tmp4_mapTo.a(tmp$ret$9);
1385
- }
1386
- tmp$ret$10 = tmp4_mapTo;
1387
- tmp$ret$11 = tmp$ret$10;
1388
- var headers = tmp$ret$11;
1389
- var tmp$ret$23;
1390
- // Inline function 'kotlin.collections.ifEmpty' call
1391
- var tmp$ret$21;
1392
- // Inline function 'kotlin.collections.flatMap' call
1393
- var tmp$ret$14;
1394
- // Inline function 'kotlin.collections.filter' call
1395
- var tmp$ret$13;
1396
- // Inline function 'kotlin.collections.filterTo' call
1397
- var tmp6_filterTo = ArrayList_init_$Create$();
1398
- var tmp0_iterator_3 = parameters.c();
1399
- while (tmp0_iterator_3.d()) {
1400
- var element_1 = tmp0_iterator_3.e();
1401
- var tmp$ret$12;
1402
- // Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.parseEndpoints.<anonymous>.<anonymous>' call
1403
- tmp$ret$12 = element_1.y1a_1.equals(ParameterLocation_BODY_getInstance());
1404
- if (tmp$ret$12) {
1405
- tmp6_filterTo.a(element_1);
1406
- }
1407
- }
1408
- tmp$ret$13 = tmp6_filterTo;
1409
- tmp$ret$14 = tmp$ret$13;
1410
- var tmp8_flatMap = tmp$ret$14;
1411
- var tmp$ret$20;
1412
- // Inline function 'kotlin.collections.flatMapTo' call
1413
- var tmp7_flatMapTo = ArrayList_init_$Create$();
1414
- var tmp0_iterator_4 = tmp8_flatMap.c();
1415
- while (tmp0_iterator_4.d()) {
1416
- var element_2 = tmp0_iterator_4.e();
1417
- var tmp$ret$19;
1418
- // Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.parseEndpoints.<anonymous>.<anonymous>' call
1419
- var tmp$ret$18;
1420
- // Inline function 'kotlin.collections.map' call
1421
- var tmp$ret$15;
1422
- // Inline function 'kotlin.collections.orEmpty' call
1423
- var tmp0_orEmpty = this$0.x1s_1.k1a_1;
1424
- var tmp0_elvis_lhs = tmp0_orEmpty;
1425
- tmp$ret$15 = tmp0_elvis_lhs == null ? emptyList() : tmp0_elvis_lhs;
1426
- var tmp2_map_0 = tmp$ret$15;
1427
- var tmp$ret$17;
1428
- // Inline function 'kotlin.collections.mapTo' call
1429
- var tmp1_mapTo_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp2_map_0, 10));
1430
- var tmp0_iterator_5 = tmp2_map_0.c();
1431
- while (tmp0_iterator_5.d()) {
1432
- var item_1 = tmp0_iterator_5.e();
1433
- var tmp$ret$16;
1434
- // Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.parseEndpoints.<anonymous>.<anonymous>.<anonymous>' call
1435
- var schema = element_2.b1b_1;
1436
- var tmp;
1437
- if (schema instanceof ReferenceObject) {
1438
- tmp = toReference(schema, this$0);
1439
- } else {
1440
- if (schema instanceof SchemaObject) {
1441
- tmp = toReference_0(schema, this$0, Common_getInstance().v1s([name, 'RequestBody']));
1442
- } else {
1443
- if (schema == null) {
1444
- throw new NotImplementedError();
1445
- } else {
1446
- noWhenBranchMatchedException();
1447
- }
1448
- }
1449
- }
1450
- var tmp_0 = tmp;
1451
- var tmp0_elvis_lhs_0 = element_2.a1b_1;
1452
- tmp$ret$16 = new Request(new Content(item_1, tmp_0, tmp0_elvis_lhs_0 == null ? false : tmp0_elvis_lhs_0));
1453
- tmp1_mapTo_0.a(tmp$ret$16);
1454
- }
1455
- tmp$ret$17 = tmp1_mapTo_0;
1456
- tmp$ret$18 = tmp$ret$17;
1457
- tmp$ret$19 = tmp$ret$18;
1458
- var list = tmp$ret$19;
1459
- addAll(tmp7_flatMapTo, list);
1460
- }
1461
- tmp$ret$20 = tmp7_flatMapTo;
1462
- tmp$ret$21 = tmp$ret$20;
1463
- var tmp9_ifEmpty = tmp$ret$21;
1464
- var tmp_1;
1465
- if (tmp9_ifEmpty.g()) {
1466
- var tmp$ret$22;
1467
- // Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.parseEndpoints.<anonymous>.<anonymous>' call
1468
- tmp$ret$22 = listOf(new Request(null));
1469
- tmp_1 = tmp$ret$22;
1470
- } else {
1471
- tmp_1 = tmp9_ifEmpty;
1472
- }
1473
- tmp$ret$23 = tmp_1;
1474
- var requests = tmp$ret$23;
1475
- var tmp$ret$36;
1476
- // Inline function 'kotlin.collections.flatMap' call
1477
- var tmp$ret$24;
1478
- // Inline function 'kotlin.collections.orEmpty' call
1479
- var tmp10_orEmpty = req.e1t_1.f1c_1;
1480
- var tmp0_elvis_lhs_1 = tmp10_orEmpty;
1481
- tmp$ret$24 = tmp0_elvis_lhs_1 == null ? emptyMap() : tmp0_elvis_lhs_1;
1482
- var tmp12_flatMap = tmp$ret$24;
1483
- var tmp$ret$35;
1484
- // Inline function 'kotlin.collections.flatMapTo' call
1485
- var tmp11_flatMapTo = ArrayList_init_$Create$();
1486
- var tmp$ret$25;
1487
- // Inline function 'kotlin.collections.iterator' call
1488
- tmp$ret$25 = tmp12_flatMap.u().c();
1489
- var tmp0_iterator_6 = tmp$ret$25;
1490
- while (tmp0_iterator_6.d()) {
1491
- var element_3 = tmp0_iterator_6.e();
1492
- var tmp$ret$34;
1493
- // Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.parseEndpoints.<anonymous>.<anonymous>' call
1494
- var tmp$ret$26;
1495
- // Inline function 'kotlin.collections.component1' call
1496
- tmp$ret$26 = element_3.v().q1e_1;
1497
- var status = tmp$ret$26;
1498
- var tmp$ret$27;
1499
- // Inline function 'kotlin.collections.component2' call
1500
- tmp$ret$27 = element_3.w();
1501
- var res = tmp$ret$27;
1502
- var tmp$ret$33;
1503
- // Inline function 'kotlin.collections.map' call
1504
- var tmp$ret$28;
1505
- // Inline function 'kotlin.collections.orEmpty' call
1506
- var tmp0_orEmpty_0 = this$0.x1s_1.l1a_1;
1507
- var tmp0_elvis_lhs_2 = tmp0_orEmpty_0;
1508
- tmp$ret$28 = tmp0_elvis_lhs_2 == null ? emptyList() : tmp0_elvis_lhs_2;
1509
- var tmp2_map_1 = tmp$ret$28;
1510
- var tmp$ret$32;
1511
- // Inline function 'kotlin.collections.mapTo' call
1512
- var tmp1_mapTo_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp2_map_1, 10));
1513
- var tmp0_iterator_7 = tmp2_map_1.c();
1514
- while (tmp0_iterator_7.d()) {
1515
- var item_2 = tmp0_iterator_7.e();
1516
- var tmp$ret$31;
1517
- // Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.parseEndpoints.<anonymous>.<anonymous>.<anonymous>' call
1518
- var tmp_2 = _StatusCode___get_value__impl__we50mu(status);
1519
- var tmp0_safe_receiver = resolve_1(res, this$0).u1e_1;
1520
- var tmp_3;
1521
- if (tmp0_safe_receiver == null) {
1522
- tmp_3 = null;
1523
- } else {
1524
- var tmp$ret$30;
1525
- // Inline function 'kotlin.let' call
1526
- // Inline function 'kotlin.contracts.contract' call
1527
- var tmp$ret$29;
1528
- // Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.parseEndpoints.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
1529
- var tmp0_subject = tmp0_safe_receiver;
1530
- var tmp_4;
1531
- if (tmp0_subject instanceof ReferenceObject) {
1532
- tmp_4 = toReference(tmp0_safe_receiver, this$0);
1533
- } else {
1534
- if (tmp0_subject instanceof SchemaObject) {
1535
- tmp_4 = toReference_0(tmp0_safe_receiver, this$0, Common_getInstance().v1s([name, _StatusCode___get_value__impl__we50mu(status), 'ResponseBody']));
1536
- } else {
1537
- noWhenBranchMatchedException();
1538
- }
1539
- }
1540
- tmp$ret$29 = new Content(item_2, tmp_4, false);
1541
- tmp$ret$30 = tmp$ret$29;
1542
- tmp_3 = tmp$ret$30;
1543
- }
1544
- tmp$ret$31 = new Response(tmp_2, tmp_3);
1545
- tmp1_mapTo_1.a(tmp$ret$31);
1546
- }
1547
- tmp$ret$32 = tmp1_mapTo_1;
1548
- tmp$ret$33 = tmp$ret$32;
1549
- tmp$ret$34 = tmp$ret$33;
1550
- var list_0 = tmp$ret$34;
1551
- addAll(tmp11_flatMapTo, list_0);
1552
- }
1553
- tmp$ret$35 = tmp11_flatMapTo;
1554
- tmp$ret$36 = tmp$ret$35;
1555
- var responses = tmp$ret$36;
1556
- return listOf(new Endpoint(name, req.d1t_1, segments, query, headers, emptyList(), requests, responses));
1557
- };
1558
- }
1559
1615
  function OpenApiParser$parseRequestBody$lambda(this$0) {
1560
1616
  return function (req) {
1561
- var tmp0_safe_receiver = req.e1t_1.e1c_1;
1617
+ var tmp0_safe_receiver = req.e1t_1.x1b_1;
1562
1618
  var tmp;
1563
1619
  if (tmp0_safe_receiver == null) {
1564
1620
  tmp = null;
@@ -1595,7 +1651,7 @@
1595
1651
  var element = tmp0_iterator_0.e();
1596
1652
  var tmp$ret$3;
1597
1653
  // Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.parseRequestBody.<anonymous>.<anonymous>' call
1598
- tmp$ret$3 = element.y1a_1.equals(ParameterLocation_BODY_getInstance());
1654
+ tmp$ret$3 = element.h1c_1.equals(ParameterLocation_BODY_getInstance());
1599
1655
  if (tmp$ret$3) {
1600
1656
  tmp1_filterTo.a(element);
1601
1657
  }
@@ -1622,7 +1678,7 @@
1622
1678
  var parameters = plus(resolveParameters_0(req.c1t_1, this$0), resolveParameters(req.e1t_1, this$0));
1623
1679
  var segments = toSegments(req.b1t_1, this$0, parameters);
1624
1680
  var name = toName(req.e1t_1, this$0, segments, req.d1t_1);
1625
- var schema = element_0.b1b_1;
1681
+ var schema = element_0.k1c_1;
1626
1682
  var tmp_2;
1627
1683
  if (schema instanceof SchemaObject) {
1628
1684
  var tmp0_subject = schema.i1e_1;
@@ -2833,51 +2889,60 @@
2833
2889
  return true;
2834
2890
  };
2835
2891
  function toReference_1(_this__u8e3s4, $this) {
2836
- var tmp0_container = resolveSchemaObject_0(_this__u8e3s4, $this);
2837
- var referencingObject = tmp0_container.i3();
2838
- var schema = tmp0_container.j3();
2839
- if (!(schema.p1m_1 == null)) {
2840
- var additionalProperties = schema.p1m_1;
2841
- var tmp;
2842
- if (additionalProperties instanceof BooleanObject_0) {
2843
- throw new NotImplementedError();
2892
+ var tmp$ret$1;
2893
+ // Inline function 'kotlin.let' call
2894
+ var tmp0_let = resolveSchemaObject_0(_this__u8e3s4, $this);
2895
+ // Inline function 'kotlin.contracts.contract' call
2896
+ var tmp$ret$0;
2897
+ // Inline function 'community.flock.wirespec.openapi.v3.OpenApiParser.toReference.<anonymous>' call
2898
+ var referencingObject = tmp0_let.i3();
2899
+ var schema = tmp0_let.j3();
2900
+ var additionalProperties = schema.p1m_1;
2901
+ var tmp;
2902
+ if (additionalProperties instanceof BooleanObject_0) {
2903
+ throw new NotImplementedError();
2904
+ } else {
2905
+ if (additionalProperties instanceof ReferenceObject_0) {
2906
+ tmp = new Custom(Common_getInstance().v1s([getReference_0(additionalProperties, $this)]), false, true);
2844
2907
  } else {
2845
- if (additionalProperties instanceof ReferenceObject_0) {
2846
- tmp = new Custom(Common_getInstance().v1s([getReference_0(additionalProperties, $this)]), false, true);
2908
+ if (additionalProperties instanceof SchemaObject_0) {
2909
+ tmp = new Custom(Common_getInstance().v1s([getReference_0(referencingObject, $this)]), false, true);
2847
2910
  } else {
2848
- if (additionalProperties instanceof SchemaObject_0) {
2849
- tmp = new Custom(Common_getInstance().v1s([getReference_0(referencingObject, $this)]), false, true);
2850
- } else {
2851
- if (additionalProperties == null) {
2852
- throw new NotImplementedError();
2911
+ if (additionalProperties == null) {
2912
+ var tmp0_subject = schema.i1m_1;
2913
+ var tmp0 = tmp0_subject == null ? -1 : tmp0_subject.q4_1;
2914
+ var tmp_0;
2915
+ if (tmp0 === 4) {
2916
+ var items = schema.n1m_1;
2917
+ var tmp_1;
2918
+ if (items instanceof ReferenceObject_0) {
2919
+ tmp_1 = new Custom(Common_getInstance().v1s([getReference_0(items, $this)]), true);
2920
+ } else {
2921
+ if (items instanceof SchemaObject_0) {
2922
+ tmp_1 = new Custom(Common_getInstance().v1s([getReference_0(referencingObject, $this), 'array']), true);
2923
+ } else {
2924
+ if (items == null) {
2925
+ var tmp0_error = 'When schema is of type array items cannot be null for name: ' + new Ref_0(_this__u8e3s4.w1l_1);
2926
+ throw IllegalStateException_init_$Create$(toString(tmp0_error));
2927
+ } else {
2928
+ noWhenBranchMatchedException();
2929
+ }
2930
+ }
2931
+ }
2932
+ tmp_0 = tmp_1;
2853
2933
  } else {
2854
- noWhenBranchMatchedException();
2934
+ tmp_0 = new Custom(Common_getInstance().v1s([getReference_0(referencingObject, $this)]), false);
2855
2935
  }
2936
+ tmp = tmp_0;
2937
+ } else {
2938
+ noWhenBranchMatchedException();
2856
2939
  }
2857
2940
  }
2858
2941
  }
2859
- return tmp;
2860
2942
  }
2861
- var tmp1_subject = schema.i1m_1;
2862
- var tmp0 = tmp1_subject == null ? -1 : tmp1_subject.q4_1;
2863
- var tmp_0;
2864
- if (tmp0 === 4) {
2865
- var items = schema.n1m_1;
2866
- var tmp_1;
2867
- if (items instanceof ReferenceObject_0) {
2868
- tmp_1 = new Custom(Common_getInstance().v1s([getReference_0(items, $this)]), true);
2869
- } else {
2870
- if (items instanceof SchemaObject_0) {
2871
- tmp_1 = new Custom(Common_getInstance().v1s([getReference_0(referencingObject, $this), 'array']), true);
2872
- } else {
2873
- throw new NotImplementedError();
2874
- }
2875
- }
2876
- tmp_0 = tmp_1;
2877
- } else {
2878
- tmp_0 = new Custom(Common_getInstance().v1s([getReference_0(referencingObject, $this)]), false);
2879
- }
2880
- return tmp_0;
2943
+ tmp$ret$0 = tmp;
2944
+ tmp$ret$1 = tmp$ret$0;
2945
+ return tmp$ret$1;
2881
2946
  }
2882
2947
  function toReference_2(_this__u8e3s4, $this, name) {
2883
2948
  var t = _this__u8e3s4.i1m_1;