@flock/wirespec 0.9.19 → 0.9.21

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.
@@ -30,6 +30,8 @@
30
30
  var VOID = kotlin_kotlin.$_$.g;
31
31
  var joinToString = kotlin_kotlin.$_$.r6;
32
32
  var protoOf = kotlin_kotlin.$_$.qa;
33
+ var to = kotlin_kotlin.$_$.wf;
34
+ var toMap = kotlin_kotlin.$_$.k8;
33
35
  var objectMeta = kotlin_kotlin.$_$.pa;
34
36
  var setMetadataFor = kotlin_kotlin.$_$.ra;
35
37
  var collectionSizeOrDefault = kotlin_kotlin.$_$.h5;
@@ -47,7 +49,6 @@
47
49
  var LinkedHashMap_init_$Create$ = kotlin_kotlin.$_$.t;
48
50
  var _StatusCode___init__impl__t1yi9q = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.f2;
49
51
  var HeaderObject = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.b;
50
- var to = kotlin_kotlin.$_$.wf;
51
52
  var Unit = kotlin_community_flock_wirespec_compiler_core.$_$.u;
52
53
  var Type_ARRAY_getInstance = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.k1;
53
54
  var SchemaObject = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.l;
@@ -82,7 +83,6 @@
82
83
  var Method_HEAD_getInstance = kotlin_community_flock_wirespec_compiler_core.$_$.k1;
83
84
  var Path = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.h;
84
85
  var PathItemObject = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.g;
85
- var toMap = kotlin_kotlin.$_$.k8;
86
86
  var Refined = kotlin_community_flock_wirespec_compiler_core.$_$.y;
87
87
  var Type = kotlin_community_flock_wirespec_compiler_core.$_$.a1;
88
88
  var plus_0 = kotlin_kotlin.$_$.l7;
@@ -92,9 +92,6 @@
92
92
  var toString = kotlin_kotlin.$_$.va;
93
93
  var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.n1;
94
94
  var _Ref___init__impl__7qfl46 = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.d2;
95
- var classMeta = kotlin_kotlin.$_$.l9;
96
- var Json = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.l;
97
- var OpenAPI = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.d;
98
95
  var emptyList = kotlin_kotlin.$_$.z5;
99
96
  var NotImplementedError = kotlin_kotlin.$_$.te;
100
97
  var Content = kotlin_community_flock_wirespec_compiler_core.$_$.j;
@@ -104,13 +101,13 @@
104
101
  var Response = kotlin_community_flock_wirespec_compiler_core.$_$.m;
105
102
  var HashSet_init_$Create$ = kotlin_kotlin.$_$.r;
106
103
  var Companion_instance = kotlin_community_flock_wirespec_compiler_core.$_$.x1;
104
+ var THROW_CCE = kotlin_kotlin.$_$.ye;
105
+ var Map = kotlin_kotlin.$_$.u4;
106
+ var isInterface = kotlin_kotlin.$_$.ea;
107
107
  var Type_String_getInstance = kotlin_community_flock_wirespec_compiler_core.$_$.t1;
108
108
  var Type_Number_getInstance = kotlin_community_flock_wirespec_compiler_core.$_$.s1;
109
109
  var Type_Integer_getInstance = kotlin_community_flock_wirespec_compiler_core.$_$.r1;
110
110
  var Type_Boolean_getInstance = kotlin_community_flock_wirespec_compiler_core.$_$.q1;
111
- var THROW_CCE = kotlin_kotlin.$_$.ye;
112
- var Map = kotlin_kotlin.$_$.u4;
113
- var isInterface = kotlin_kotlin.$_$.ea;
114
111
  var Ref = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.j;
115
112
  var BooleanObject = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.a;
116
113
  var Shape = kotlin_community_flock_wirespec_compiler_core.$_$.z;
@@ -128,8 +125,13 @@
128
125
  var isBlank = kotlin_kotlin.$_$.lc;
129
126
  var Path__hashCode_impl_go73kd = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.b2;
130
127
  var getStringHashCode = kotlin_kotlin.$_$.t9;
128
+ var classMeta = kotlin_kotlin.$_$.l9;
131
129
  var StatusCode__hashCode_impl_fevhvx = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.g2;
132
130
  var hashCode = kotlin_kotlin.$_$.u9;
131
+ var Json = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.l;
132
+ var OpenAPI = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.d;
133
+ var listOf_0 = kotlin_kotlin.$_$.f7;
134
+ var UnsupportedOperationException_init_$Create$ = kotlin_kotlin.$_$.u1;
133
135
  var Definition = kotlin_community_flock_wirespec_compiler_core.$_$.i;
134
136
  var Union = kotlin_community_flock_wirespec_compiler_core.$_$.b1;
135
137
  var ComponentsObject = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.p;
@@ -151,8 +153,8 @@
151
153
  var HeaderObject_0 = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.q;
152
154
  var _Ref___init__impl__7qfl46_0 = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.n2;
153
155
  var ReferenceObject_0 = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.a1;
154
- var Type_OBJECT_getInstance_0 = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.y1;
155
156
  var Type_ARRAY_getInstance_0 = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.u1;
157
+ var Type_OBJECT_getInstance_0 = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.y1;
156
158
  var Type_INTEGER_getInstance_0 = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.w1;
157
159
  var Type_NUMBER_getInstance_0 = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.x1;
158
160
  var Type_BOOLEAN_getInstance_0 = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.v1;
@@ -161,7 +163,6 @@
161
163
  var MediaTypeObject = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.s;
162
164
  var InfoObject_0 = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.r;
163
165
  var OpenAPIObject = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.u;
164
- var OpenAPI_0 = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.v;
165
166
  var ParameterLocation_COOKIE_getInstance = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.q1;
166
167
  var _MediaType___get_value__impl__wy58mp = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.j2;
167
168
  var _StatusCode___get_value__impl__we50mu_0 = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.r2;
@@ -173,26 +174,25 @@
173
174
  var getOrNull = kotlin_kotlin.$_$.k6;
174
175
  var Path__hashCode_impl_go73kd_0 = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.l2;
175
176
  var StatusCode__hashCode_impl_fevhvx_0 = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.q2;
177
+ var OpenAPI_0 = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.v;
176
178
  //endregion
177
179
  //region block: pre-declaration
178
180
  setMetadataFor(Common, 'Common', objectMeta);
179
- setMetadataFor(OpenApiV2Emitter, 'OpenApiV2Emitter', classMeta, VOID, VOID, OpenApiV2Emitter);
180
- setMetadataFor(Companion, 'Companion', objectMeta);
181
+ setMetadataFor(OpenApiV2Emitter, 'OpenApiV2Emitter', objectMeta);
181
182
  setMetadataFor(FlattenRequest, 'FlattenRequest', classMeta);
182
183
  setMetadataFor(FlattenResponse, 'FlattenResponse', classMeta);
183
- setMetadataFor(OpenApiV2Parser, 'OpenApiV2Parser', classMeta);
184
- setMetadataFor(OpenApiV3Emitter, 'OpenApiV3Emitter', classMeta, VOID, VOID, OpenApiV3Emitter);
185
- setMetadataFor(Companion_0, 'Companion', objectMeta);
184
+ setMetadataFor(OpenApiV2Parser, 'OpenApiV2Parser', objectMeta);
185
+ setMetadataFor(OpenApiV3Emitter, 'OpenApiV3Emitter', objectMeta);
186
186
  setMetadataFor(FlattenRequest_0, 'FlattenRequest', classMeta);
187
187
  setMetadataFor(FlattenResponse_0, 'FlattenResponse', classMeta);
188
- setMetadataFor(OpenApiV3Parser, 'OpenApiV3Parser', classMeta);
188
+ setMetadataFor(OpenApiV3Parser, 'OpenApiV3Parser', objectMeta);
189
189
  //endregion
190
190
  function Common$className$lambda(it) {
191
191
  return Companion_getInstance().n21(it);
192
192
  }
193
193
  function Common() {
194
194
  }
195
- protoOf(Common).d2c = function (arg) {
195
+ protoOf(Common).e2c = function (arg) {
196
196
  // Inline function 'kotlin.collections.flatMap' call
197
197
  // Inline function 'kotlin.collections.flatMapTo' call
198
198
  var destination = ArrayList_init_$Create$();
@@ -208,6 +208,41 @@
208
208
  var tmp = destination;
209
209
  return joinToString(tmp, '', VOID, VOID, VOID, VOID, Common$className$lambda);
210
210
  };
211
+ protoOf(Common).f2c = function (_this__u8e3s4) {
212
+ // Inline function 'kotlin.collections.mapNotNull' call
213
+ // Inline function 'kotlin.collections.mapNotNullTo' call
214
+ var destination = ArrayList_init_$Create$();
215
+ // Inline function 'kotlin.collections.forEach' call
216
+ // Inline function 'kotlin.collections.iterator' call
217
+ var tmp0_iterator = _this__u8e3s4.n2().v();
218
+ while (tmp0_iterator.w()) {
219
+ var element = tmp0_iterator.y();
220
+ // Inline function 'kotlin.collections.mapNotNullTo.<anonymous>' call
221
+ // Inline function 'community.flock.wirespec.openapi.Common.filterNotNullValues.<anonymous>' call
222
+ // Inline function 'kotlin.collections.component1' call
223
+ var key = element.o2();
224
+ // Inline function 'kotlin.collections.component2' call
225
+ var value = element.p2();
226
+ var tmp;
227
+ if (value == null) {
228
+ tmp = null;
229
+ } else {
230
+ // Inline function 'kotlin.let' call
231
+ // Inline function 'kotlin.contracts.contract' call
232
+ // Inline function 'community.flock.wirespec.openapi.Common.filterNotNullValues.<anonymous>.<anonymous>' call
233
+ tmp = to(key, value);
234
+ }
235
+ var tmp0_safe_receiver = tmp;
236
+ if (tmp0_safe_receiver == null)
237
+ null;
238
+ else {
239
+ // Inline function 'kotlin.let' call
240
+ // Inline function 'kotlin.contracts.contract' call
241
+ destination.s(tmp0_safe_receiver);
242
+ }
243
+ }
244
+ return toMap(destination);
245
+ };
211
246
  var Common_instance;
212
247
  function Common_getInstance() {
213
248
  return Common_instance;
@@ -231,7 +266,7 @@
231
266
  while (tmp0_iterator_0.w()) {
232
267
  var item = tmp0_iterator_0.y();
233
268
  // Inline function 'community.flock.wirespec.openapi.v2.OpenApiV2Emitter.emit.<anonymous>' call
234
- var tmp$ret$3 = emit_0(item, $this);
269
+ var tmp$ret$3 = emit_0(item, OpenApiV2Emitter_instance);
235
270
  destination_0.s(tmp$ret$3);
236
271
  }
237
272
  return firstOrNull(destination_0);
@@ -325,7 +360,7 @@
325
360
  var item = tmp0_iterator_2.y();
326
361
  // Inline function 'community.flock.wirespec.openapi.v2.OpenApiV2Emitter.emit.<anonymous>' call
327
362
  var tmp0_in = ParameterLocation_BODY_getInstance();
328
- var tmp1_schema = $this.p27(item.l28_1);
363
+ var tmp1_schema = OpenApiV2Emitter_instance.p27(item.l28_1);
329
364
  var tmp2_required = !item.m28_1;
330
365
  var tmp$ret$16 = new ParameterObject('RequestBody', tmp0_in, VOID, tmp2_required, tmp1_schema);
331
366
  destination_2.s(tmp$ret$16);
@@ -339,7 +374,7 @@
339
374
  while (tmp0_iterator_3.w()) {
340
375
  var item_0 = tmp0_iterator_3.y();
341
376
  // Inline function 'community.flock.wirespec.openapi.v2.OpenApiV2Emitter.emit.<anonymous>' call
342
- var tmp$ret$19 = emitParameter(item_0, $this, ParameterLocation_QUERY_getInstance());
377
+ var tmp$ret$19 = emitParameter(item_0, OpenApiV2Emitter_instance, ParameterLocation_QUERY_getInstance());
343
378
  destination_3.s(tmp$ret$19);
344
379
  }
345
380
  var tmp_4 = plus(tmp_3, destination_3);
@@ -351,7 +386,7 @@
351
386
  while (tmp0_iterator_4.w()) {
352
387
  var item_1 = tmp0_iterator_4.y();
353
388
  // Inline function 'community.flock.wirespec.openapi.v2.OpenApiV2Emitter.emit.<anonymous>' call
354
- var tmp$ret$22 = emitParameter(item_1, $this, ParameterLocation_HEADER_getInstance());
389
+ var tmp$ret$22 = emitParameter(item_1, OpenApiV2Emitter_instance, ParameterLocation_HEADER_getInstance());
355
390
  destination_4.s(tmp$ret$22);
356
391
  }
357
392
  var tmp_5 = plus(tmp_4, destination_4);
@@ -377,7 +412,7 @@
377
412
  var element_3 = tmp0_iterator_6.y();
378
413
  // Inline function 'kotlin.collections.plusAssign' call
379
414
  // Inline function 'community.flock.wirespec.openapi.v2.OpenApiV2Emitter.emit.<anonymous>.<anonymous>' call
380
- var pair = to(element_3.m27_1.q27_1, new HeaderObject(VOID, element_3.n27_1.p2(), VOID, element_3.n27_1.g21() ? $this.p27(element_3.n27_1) : null));
415
+ var pair = to(element_3.m27_1.q27_1, new HeaderObject(VOID, element_3.n27_1.p2(), VOID, element_3.n27_1.g21() ? OpenApiV2Emitter_instance.p27(element_3.n27_1) : null));
381
416
  destination_6.l2(pair.vd_1, pair.wd_1);
382
417
  }
383
418
  var tmp0_safe_receiver_4 = element_2.j28_1;
@@ -408,10 +443,10 @@
408
443
  var tmp_11;
409
444
  switch (tmp1_safe_receiver.l28_1.g21()) {
410
445
  case false:
411
- tmp_11 = $this.p27(tmp1_safe_receiver.l28_1);
446
+ tmp_11 = OpenApiV2Emitter_instance.p27(tmp1_safe_receiver.l28_1);
412
447
  break;
413
448
  case true:
414
- tmp_11 = new SchemaObject(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, Type_ARRAY_getInstance(), $this.p27(tmp1_safe_receiver.l28_1));
449
+ tmp_11 = new SchemaObject(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, Type_ARRAY_getInstance(), OpenApiV2Emitter_instance.p27(tmp1_safe_receiver.l28_1));
415
450
  break;
416
451
  default:
417
452
  noWhenBranchMatchedException();
@@ -423,8 +458,7 @@
423
458
  var pair_0 = to(new StatusCode(tmp_6), new ResponseObject(tmp2_description, tmp4_schema, destination_6));
424
459
  destination_5.l2(pair_0.vd_1, pair_0.wd_1);
425
460
  }
426
- var operationObject = new OperationObject(VOID, VOID, VOID, VOID, _this__u8e3s4.o28_1.q27_1, tmp_0, tmp_2, tmp_5, destination_5);
427
- return operationObject;
461
+ return new OperationObject(VOID, VOID, VOID, VOID, _this__u8e3s4.o28_1.q27_1, tmp_0, tmp_2, tmp_5, destination_5);
428
462
  }
429
463
  function emitSegment(_this__u8e3s4, $this) {
430
464
  return '/' + joinToString(_this__u8e3s4, '/', VOID, VOID, VOID, VOID, OpenApiV2Emitter$emitSegment$lambda);
@@ -571,7 +605,7 @@
571
605
  var segments = item.o2();
572
606
  // Inline function 'kotlin.collections.component2' call
573
607
  var endpoints = item.p2();
574
- var tmp_3 = _Path___init__impl__6uf4pw(emitSegment(segments, this));
608
+ var tmp_3 = _Path___init__impl__6uf4pw(emitSegment(segments, OpenApiV2Emitter_instance));
575
609
  // Inline function 'kotlin.collections.map' call
576
610
  // Inline function 'kotlin.collections.filterIsInstance' call
577
611
  // Inline function 'kotlin.collections.filterIsInstanceTo' call
@@ -591,18 +625,18 @@
591
625
  // Inline function 'community.flock.wirespec.openapi.v2.OpenApiV2Emitter.emit.<anonymous>.<anonymous>' call
592
626
  var tmp0_in = ParameterLocation_PATH_getInstance();
593
627
  var tmp1_name = item_0.a28_1.q27_1;
594
- var tmp2_type = emitType_0(item_0.b28_1, this);
628
+ var tmp2_type = emitType_0(item_0.b28_1, OpenApiV2Emitter_instance);
595
629
  var tmp$ret$12 = new ParameterObject(tmp1_name, tmp0_in, VOID, VOID, VOID, tmp2_type);
596
630
  destination_3.s(tmp$ret$12);
597
631
  }
598
- var tmp1_get = emit(endpoints, this, Method_GET_getInstance());
599
- var tmp2_post = emit(endpoints, this, Method_POST_getInstance());
600
- var tmp3_put = emit(endpoints, this, Method_PUT_getInstance());
601
- var tmp4_delete = emit(endpoints, this, Method_DELETE_getInstance());
602
- var tmp5_patch = emit(endpoints, this, Method_PATCH_getInstance());
603
- var tmp6_options = emit(endpoints, this, Method_OPTIONS_getInstance());
604
- var tmp7_trace = emit(endpoints, this, Method_TRACE_getInstance());
605
- var tmp8_head = emit(endpoints, this, Method_HEAD_getInstance());
632
+ var tmp1_get = emit(endpoints, OpenApiV2Emitter_instance, Method_GET_getInstance());
633
+ var tmp2_post = emit(endpoints, OpenApiV2Emitter_instance, Method_POST_getInstance());
634
+ var tmp3_put = emit(endpoints, OpenApiV2Emitter_instance, Method_PUT_getInstance());
635
+ var tmp4_delete = emit(endpoints, OpenApiV2Emitter_instance, Method_DELETE_getInstance());
636
+ var tmp5_patch = emit(endpoints, OpenApiV2Emitter_instance, Method_PATCH_getInstance());
637
+ var tmp6_options = emit(endpoints, OpenApiV2Emitter_instance, Method_OPTIONS_getInstance());
638
+ var tmp7_trace = emit(endpoints, OpenApiV2Emitter_instance, Method_TRACE_getInstance());
639
+ var tmp8_head = emit(endpoints, OpenApiV2Emitter_instance, Method_HEAD_getInstance());
606
640
  var tmp$ret$15 = to(new Path(tmp_3), new PathItemObject(VOID, VOID, VOID, tmp1_get, tmp3_put, tmp2_post, tmp4_delete, tmp6_options, tmp8_head, tmp5_patch, tmp7_trace, VOID, destination_3));
607
641
  destination_1.s(tmp$ret$15);
608
642
  }
@@ -661,7 +695,7 @@
661
695
  var element_6 = tmp0_iterator_8.y();
662
696
  // Inline function 'kotlin.collections.plusAssign' call
663
697
  // Inline function 'community.flock.wirespec.openapi.v2.OpenApiV2Emitter.emit.<anonymous>.<anonymous>' call
664
- var pair_0 = this.d27(element_6);
698
+ var pair_0 = OpenApiV2Emitter_instance.d27(element_6);
665
699
  destination_8.l2(pair_0.vd_1, pair_0.wd_1);
666
700
  }
667
701
  // Inline function 'kotlin.takeIf' call
@@ -741,6 +775,7 @@
741
775
  return to(_this__u8e3s4.m27_1.q27_1, this.p27(_this__u8e3s4.n27_1));
742
776
  };
743
777
  protoOf(OpenApiV2Emitter).p27 = function (_this__u8e3s4) {
778
+ // Inline function 'kotlin.let' call
744
779
  var tmp;
745
780
  if (_this__u8e3s4 instanceof Custom) {
746
781
  tmp = new ReferenceObject(_Ref___init__impl__7qfl46('#/definitions/' + _this__u8e3s4.p2()));
@@ -761,43 +796,19 @@
761
796
  }
762
797
  }
763
798
  }
764
- var ref = tmp;
765
- var tmp_0;
766
- if (_this__u8e3s4.g21()) {
767
- tmp_0 = new SchemaObject(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, Type_ARRAY_getInstance(), ref);
768
- } else {
769
- tmp_0 = ref;
770
- }
771
- return tmp_0;
772
- };
773
- function OpenApiV2Parser$Companion$parse$lambda($ignoreUnknown) {
774
- return function ($this$Json) {
775
- $this$Json.f15_1 = true;
776
- $this$Json.c15_1 = $ignoreUnknown;
777
- return Unit_instance;
778
- };
779
- }
780
- function Companion() {
781
- }
782
- protoOf(Companion).e2c = function (json, ignoreUnknown) {
783
- // Inline function 'kotlin.let' call
784
799
  // Inline function 'kotlin.contracts.contract' call
785
- // Inline function 'community.flock.wirespec.openapi.v2.Companion.parse.<anonymous>' call
786
- var it = (new OpenAPI(Json(VOID, OpenApiV2Parser$Companion$parse$lambda(ignoreUnknown)))).r1e(json);
787
- return (new OpenApiV2Parser(it)).g2c();
788
- };
789
- protoOf(Companion).h2c = function (json, ignoreUnknown, $super) {
790
- ignoreUnknown = ignoreUnknown === VOID ? false : ignoreUnknown;
791
- return $super === VOID ? this.e2c(json, ignoreUnknown) : $super.e2c.call(this, json, ignoreUnknown);
800
+ // Inline function 'community.flock.wirespec.openapi.v2.OpenApiV2Emitter.emit.<anonymous>' call
801
+ var it = tmp;
802
+ return _this__u8e3s4.g21() ? new SchemaObject(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, Type_ARRAY_getInstance(), it) : it;
792
803
  };
793
- var Companion_instance_0;
794
- function Companion_getInstance_0() {
795
- return Companion_instance_0;
804
+ var OpenApiV2Emitter_instance;
805
+ function OpenApiV2Emitter_getInstance() {
806
+ return OpenApiV2Emitter_instance;
796
807
  }
797
- function parseEndpoints($this) {
808
+ function parseEndpoints(_this__u8e3s4, $this) {
798
809
  // Inline function 'kotlin.collections.flatMap' call
799
810
  // Inline function 'kotlin.collections.flatMapTo' call
800
- var this_0 = $this.f2c_1.c1f_1;
811
+ var this_0 = _this__u8e3s4.c1f_1;
801
812
  var destination = ArrayList_init_$Create$();
802
813
  // Inline function 'kotlin.collections.iterator' call
803
814
  var tmp0_iterator = this_0.n2().v();
@@ -810,7 +821,7 @@
810
821
  var pathItem = element.p2();
811
822
  // Inline function 'kotlin.collections.flatMap' call
812
823
  // Inline function 'kotlin.collections.flatMapTo' call
813
- var this_1 = toOperationList(pathItem, $this);
824
+ var this_1 = toOperationList(pathItem, OpenApiV2Parser_instance);
814
825
  var destination_0 = ArrayList_init_$Create$();
815
826
  // Inline function 'kotlin.collections.iterator' call
816
827
  var tmp0_iterator_0 = this_1.n2().v();
@@ -821,10 +832,10 @@
821
832
  var method = element_0.o2();
822
833
  // Inline function 'kotlin.collections.component2' call
823
834
  var operation = element_0.p2();
824
- var parameters = plus(resolveParameters_0(pathItem, $this), resolveParameters(operation, $this));
825
- var segments = toSegments(path, $this, parameters);
826
- var tmp0_elvis_lhs = toName(operation, $this);
827
- var name = tmp0_elvis_lhs == null ? toName_0(path, $this) + method.f9_1 : tmp0_elvis_lhs;
835
+ var parameters = plus(resolveParameters_0(_this__u8e3s4, OpenApiV2Parser_instance, pathItem), resolveParameters(_this__u8e3s4, OpenApiV2Parser_instance, operation));
836
+ var segments = toSegments(path, OpenApiV2Parser_instance, parameters);
837
+ var tmp0_elvis_lhs = toName(operation, OpenApiV2Parser_instance);
838
+ var name = tmp0_elvis_lhs == null ? toName_0(path, OpenApiV2Parser_instance) + method.f9_1 : tmp0_elvis_lhs;
828
839
  // Inline function 'kotlin.collections.map' call
829
840
  // Inline function 'kotlin.collections.filter' call
830
841
  // Inline function 'kotlin.collections.filterTo' call
@@ -843,7 +854,7 @@
843
854
  while (tmp0_iterator_2.w()) {
844
855
  var item = tmp0_iterator_2.y();
845
856
  // Inline function 'community.flock.wirespec.openapi.v2.OpenApiV2Parser.parseEndpoints.<anonymous>.<anonymous>.<anonymous>' call
846
- var tmp$ret$9 = toField_1(item, $this, name);
857
+ var tmp$ret$9 = toField_1(_this__u8e3s4, OpenApiV2Parser_instance, item, name);
847
858
  destination_2.s(tmp$ret$9);
848
859
  }
849
860
  var query = destination_2;
@@ -865,7 +876,7 @@
865
876
  while (tmp0_iterator_4.w()) {
866
877
  var item_0 = tmp0_iterator_4.y();
867
878
  // Inline function 'community.flock.wirespec.openapi.v2.OpenApiV2Parser.parseEndpoints.<anonymous>.<anonymous>.<anonymous>' call
868
- var tmp$ret$15 = toField_1(item_0, $this, name);
879
+ var tmp$ret$15 = toField_1(_this__u8e3s4, OpenApiV2Parser_instance, item_0, name);
869
880
  destination_4.s(tmp$ret$15);
870
881
  }
871
882
  var headers = destination_4;
@@ -891,7 +902,7 @@
891
902
  // Inline function 'kotlin.collections.map' call
892
903
  // Inline function 'kotlin.collections.ifEmpty' call
893
904
  // Inline function 'kotlin.collections.orEmpty' call
894
- var tmp0_elvis_lhs_0 = $this.f2c_1.a1f_1;
905
+ var tmp0_elvis_lhs_0 = _this__u8e3s4.a1f_1;
895
906
  var tmp = tmp0_elvis_lhs_0 == null ? emptyList() : tmp0_elvis_lhs_0;
896
907
  // Inline function 'kotlin.collections.orEmpty' call
897
908
  var tmp0_elvis_lhs_1 = operation.o1j_1;
@@ -914,10 +925,10 @@
914
925
  var schema = element_4.x1g_1;
915
926
  var tmp_1;
916
927
  if (schema instanceof ReferenceObject) {
917
- tmp_1 = toReference(schema, $this);
928
+ tmp_1 = toReference(_this__u8e3s4, OpenApiV2Parser_instance, schema);
918
929
  } else {
919
930
  if (schema instanceof SchemaObject) {
920
- tmp_1 = toReference_0(schema, $this, Common_instance.d2c([name, 'RequestBody']));
931
+ tmp_1 = toReference_0(_this__u8e3s4, OpenApiV2Parser_instance, schema, Common_instance.e2c([name, 'RequestBody']));
921
932
  } else {
922
933
  if (schema == null) {
923
934
  var reason = 'Not yet implemented';
@@ -958,7 +969,7 @@
958
969
  // Inline function 'kotlin.collections.mapValuesTo.<anonymous>' call
959
970
  var tmp_4 = element_5.o2().b1m_1;
960
971
  // Inline function 'community.flock.wirespec.openapi.v2.OpenApiV2Parser.parseEndpoints.<anonymous>.<anonymous>.<anonymous>' call
961
- var tmp$ret$35 = resolve_1(element_5.p2(), $this);
972
+ var tmp$ret$35 = resolve_1(_this__u8e3s4, OpenApiV2Parser_instance, element_5.p2());
962
973
  destination_8.l2(new StatusCode(tmp_4), tmp$ret$35);
963
974
  }
964
975
  // Inline function 'kotlin.collections.flatMapTo' call
@@ -975,7 +986,7 @@
975
986
  // Inline function 'kotlin.collections.map' call
976
987
  // Inline function 'kotlin.collections.ifEmpty' call
977
988
  // Inline function 'kotlin.collections.orEmpty' call
978
- var tmp0_elvis_lhs_4 = $this.f2c_1.b1f_1;
989
+ var tmp0_elvis_lhs_4 = _this__u8e3s4.b1f_1;
979
990
  var tmp_5 = tmp0_elvis_lhs_4 == null ? emptyList() : tmp0_elvis_lhs_4;
980
991
  // Inline function 'kotlin.collections.orEmpty' call
981
992
  var tmp0_elvis_lhs_5 = operation.p1j_1;
@@ -1014,7 +1025,7 @@
1014
1025
  var identifier = item_3.o2();
1015
1026
  // Inline function 'kotlin.collections.component2' call
1016
1027
  var header = item_3.p2();
1017
- var tmp$ret$49 = toField(resolve_2(header, $this), $this, identifier);
1028
+ var tmp$ret$49 = toField(_this__u8e3s4, OpenApiV2Parser_instance, resolve_2(header, OpenApiV2Parser_instance), identifier);
1018
1029
  destination_11.s(tmp$ret$49);
1019
1030
  }
1020
1031
  tmp_8 = destination_11;
@@ -1031,10 +1042,10 @@
1031
1042
  // Inline function 'community.flock.wirespec.openapi.v2.OpenApiV2Parser.parseEndpoints.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
1032
1043
  var tmp_11;
1033
1044
  if (tmp1_safe_receiver instanceof ReferenceObject) {
1034
- tmp_11 = toReference(tmp1_safe_receiver, $this);
1045
+ tmp_11 = toReference(_this__u8e3s4, OpenApiV2Parser_instance, tmp1_safe_receiver);
1035
1046
  } else {
1036
1047
  if (tmp1_safe_receiver instanceof SchemaObject) {
1037
- tmp_11 = toReference_0(tmp1_safe_receiver, $this, Common_instance.d2c([name, _StatusCode___get_value__impl__we50mu(status), item_2, 'ResponseBody']));
1048
+ tmp_11 = toReference_0(_this__u8e3s4, OpenApiV2Parser_instance, tmp1_safe_receiver, Common_instance.e2c([name, _StatusCode___get_value__impl__we50mu(status), item_2, 'ResponseBody']));
1038
1049
  } else {
1039
1050
  noWhenBranchMatchedException();
1040
1051
  }
@@ -1067,44 +1078,21 @@
1067
1078
  }
1068
1079
  return destination;
1069
1080
  }
1070
- function mapType(_this__u8e3s4, $this) {
1071
- // Inline function 'kotlin.text.lowercase' call
1072
- // Inline function 'kotlin.js.asDynamic' call
1073
- var tmp;
1074
- switch (_this__u8e3s4.toLowerCase()) {
1075
- case 'string':
1076
- tmp = Type_String_getInstance();
1077
- break;
1078
- case 'number':
1079
- tmp = Type_Number_getInstance();
1080
- break;
1081
- case 'integer':
1082
- tmp = Type_Integer_getInstance();
1083
- break;
1084
- case 'boolean':
1085
- tmp = Type_Boolean_getInstance();
1086
- break;
1087
- default:
1088
- var message = 'Cannot map type: ' + _this__u8e3s4;
1089
- throw IllegalStateException_init_$Create$(toString(message));
1090
- }
1091
- return tmp;
1092
- }
1093
- function parseParameters($this) {
1094
- return flatMapRequests($this.f2c_1, $this, OpenApiV2Parser$parseParameters$lambda($this));
1081
+ function parseParameters(_this__u8e3s4, $this) {
1082
+ return flatMapRequests(_this__u8e3s4, $this, OpenApiV2Parser$parseParameters$lambda(_this__u8e3s4));
1095
1083
  }
1096
- function parseRequestBody($this) {
1097
- return flatMapRequests($this.f2c_1, $this, OpenApiV2Parser$parseRequestBody$lambda($this));
1084
+ function parseRequestBody(_this__u8e3s4, $this) {
1085
+ return flatMapRequests(_this__u8e3s4, $this, OpenApiV2Parser$parseRequestBody$lambda(_this__u8e3s4));
1098
1086
  }
1099
- function parseResponseBody($this) {
1100
- return flatMapResponses($this.f2c_1, $this, OpenApiV2Parser$parseResponseBody$lambda($this));
1087
+ function parseResponseBody(_this__u8e3s4, $this) {
1088
+ return flatMapResponses(_this__u8e3s4, $this, OpenApiV2Parser$parseResponseBody$lambda(_this__u8e3s4));
1101
1089
  }
1102
- function parseDefinitions($this) {
1090
+ function parseDefinitions(_this__u8e3s4, $this) {
1103
1091
  // Inline function 'kotlin.collections.flatMap' call
1104
1092
  // Inline function 'kotlin.collections.filter' call
1105
1093
  // Inline function 'arrow.core.filterIsInstance' call
1106
1094
  // Inline function 'kotlin.collections.orEmpty' call
1107
- var tmp0_elvis_lhs = $this.f2c_1.d1f_1;
1095
+ var tmp0_elvis_lhs = _this__u8e3s4.d1f_1;
1108
1096
  // Inline function 'kotlin.collections.filterValues' call
1109
1097
  var this_0 = tmp0_elvis_lhs == null ? emptyMap() : tmp0_elvis_lhs;
1110
1098
  var result = LinkedHashMap_init_$Create$_0();
@@ -1137,15 +1125,38 @@
1137
1125
  while (tmp0_iterator_1.w()) {
1138
1126
  var element_0 = tmp0_iterator_1.y();
1139
1127
  // Inline function 'community.flock.wirespec.openapi.v2.OpenApiV2Parser.parseDefinitions.<anonymous>' call
1140
- var list = flatten(element_0.p2(), $this, Common_instance.d2c([element_0.o2()]));
1128
+ var list = flatten(_this__u8e3s4, OpenApiV2Parser_instance, element_0.p2(), Common_instance.e2c([element_0.o2()]));
1141
1129
  addAll(destination_0, list);
1142
1130
  }
1143
1131
  return destination_0;
1144
1132
  }
1145
- function resolveParameters(_this__u8e3s4, $this) {
1133
+ function mapType(_this__u8e3s4, $this) {
1134
+ // Inline function 'kotlin.text.lowercase' call
1135
+ // Inline function 'kotlin.js.asDynamic' call
1136
+ var tmp;
1137
+ switch (_this__u8e3s4.toLowerCase()) {
1138
+ case 'string':
1139
+ tmp = Type_String_getInstance();
1140
+ break;
1141
+ case 'number':
1142
+ tmp = Type_Number_getInstance();
1143
+ break;
1144
+ case 'integer':
1145
+ tmp = Type_Integer_getInstance();
1146
+ break;
1147
+ case 'boolean':
1148
+ tmp = Type_Boolean_getInstance();
1149
+ break;
1150
+ default:
1151
+ var message = 'Cannot map type: ' + _this__u8e3s4;
1152
+ throw IllegalStateException_init_$Create$(toString(message));
1153
+ }
1154
+ return tmp;
1155
+ }
1156
+ function resolveParameters(_this__u8e3s4, $this, operation) {
1146
1157
  // Inline function 'kotlin.collections.map' call
1147
1158
  // Inline function 'kotlin.collections.orEmpty' call
1148
- var tmp0_elvis_lhs = _this__u8e3s4.q1j_1;
1159
+ var tmp0_elvis_lhs = operation.q1j_1;
1149
1160
  var this_0 = tmp0_elvis_lhs == null ? emptyList() : tmp0_elvis_lhs;
1150
1161
  // Inline function 'kotlin.collections.mapTo' call
1151
1162
  var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
@@ -1158,7 +1169,7 @@
1158
1169
  tmp = item;
1159
1170
  } else {
1160
1171
  if (item instanceof ReferenceObject) {
1161
- tmp = resolveParameterObject(item, $this);
1172
+ tmp = resolveParameterObject(_this__u8e3s4, OpenApiV2Parser_instance, item);
1162
1173
  } else {
1163
1174
  noWhenBranchMatchedException();
1164
1175
  }
@@ -1168,10 +1179,10 @@
1168
1179
  }
1169
1180
  return destination;
1170
1181
  }
1171
- function resolveParameters_0(_this__u8e3s4, $this) {
1182
+ function resolveParameters_0(_this__u8e3s4, $this, itemObject) {
1172
1183
  // Inline function 'kotlin.collections.map' call
1173
1184
  // Inline function 'kotlin.collections.orEmpty' call
1174
- var tmp0_elvis_lhs = _this__u8e3s4.o1g_1;
1185
+ var tmp0_elvis_lhs = itemObject.o1g_1;
1175
1186
  var this_0 = tmp0_elvis_lhs == null ? emptyList() : tmp0_elvis_lhs;
1176
1187
  // Inline function 'kotlin.collections.mapTo' call
1177
1188
  var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
@@ -1184,7 +1195,7 @@
1184
1195
  tmp = item;
1185
1196
  } else {
1186
1197
  if (item instanceof ReferenceObject) {
1187
- tmp = resolveParameterObject(item, $this);
1198
+ tmp = resolveParameterObject(_this__u8e3s4, OpenApiV2Parser_instance, item);
1188
1199
  } else {
1189
1200
  noWhenBranchMatchedException();
1190
1201
  }
@@ -1194,64 +1205,79 @@
1194
1205
  }
1195
1206
  return destination;
1196
1207
  }
1197
- function resolveParameterObject(_this__u8e3s4, $this) {
1198
- var tmp0_safe_receiver = $this.f2c_1.e1f_1;
1199
- var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.u2(getReference(_this__u8e3s4, $this));
1208
+ function resolveParameterObject(_this__u8e3s4, $this, reference) {
1209
+ var tmp0_safe_receiver = _this__u8e3s4.e1f_1;
1210
+ var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.u2(getReference(reference, $this));
1200
1211
  var tmp;
1201
1212
  if (tmp1_elvis_lhs == null) {
1202
- var message = 'Cannot resolve ref: ' + new Ref(_this__u8e3s4.w1l_1);
1213
+ var message = 'Cannot resolve ref: ' + new Ref(reference.w1l_1);
1203
1214
  throw IllegalStateException_init_$Create$(toString(message));
1204
1215
  } else {
1205
1216
  tmp = tmp1_elvis_lhs;
1206
1217
  }
1207
1218
  return tmp;
1208
1219
  }
1209
- function resolveResponseObject(_this__u8e3s4, $this) {
1210
- var tmp0_safe_receiver = $this.f2c_1.f1f_1;
1211
- var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.u2(getReference(_this__u8e3s4, $this));
1220
+ function resolveResponseObject(_this__u8e3s4, $this, reference) {
1221
+ var tmp0_safe_receiver = _this__u8e3s4.f1f_1;
1222
+ var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.u2(getReference(reference, $this));
1212
1223
  var tmp;
1213
1224
  if (tmp1_elvis_lhs == null) {
1214
- var message = 'Cannot resolve ref: ' + new Ref(_this__u8e3s4.w1l_1);
1225
+ var message = 'Cannot resolve ref: ' + new Ref(reference.w1l_1);
1215
1226
  throw IllegalStateException_init_$Create$(toString(message));
1216
1227
  } else {
1217
1228
  tmp = tmp1_elvis_lhs;
1218
1229
  }
1219
1230
  return tmp;
1220
1231
  }
1221
- function resolveSchemaObject(_this__u8e3s4, $this) {
1222
- var tmp0_safe_receiver = $this.f2c_1.d1f_1;
1223
- var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.u2(getReference(_this__u8e3s4, $this));
1232
+ function resolveSchemaObject(_this__u8e3s4, $this, reference) {
1233
+ var tmp0_safe_receiver = _this__u8e3s4.d1f_1;
1234
+ var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.u2(getReference(reference, $this));
1224
1235
  var tmp;
1225
1236
  if (tmp1_elvis_lhs == null) {
1226
- var message = 'Cannot resolve ref: ' + new Ref(_this__u8e3s4.w1l_1);
1237
+ var message = 'Cannot resolve ref: ' + new Ref(reference.w1l_1);
1227
1238
  throw IllegalStateException_init_$Create$(toString(message));
1228
1239
  } else {
1229
1240
  tmp = tmp1_elvis_lhs;
1230
1241
  }
1231
1242
  return tmp;
1232
1243
  }
1233
- function resolve(_this__u8e3s4, $this) {
1234
- var tmp;
1235
- if (_this__u8e3s4 instanceof SchemaObject) {
1236
- tmp = _this__u8e3s4;
1237
- } else {
1238
- if (_this__u8e3s4 instanceof ReferenceObject) {
1239
- tmp = resolve(resolveSchemaObject(_this__u8e3s4, $this), $this);
1240
- } else {
1241
- noWhenBranchMatchedException();
1244
+ function resolve(_this__u8e3s4, $this, schemaOrReference) {
1245
+ var $this_0 = $this;
1246
+ var $this_1 = _this__u8e3s4;
1247
+ var schemaOrReference_0 = schemaOrReference;
1248
+ $l$1: do {
1249
+ $l$0: do {
1250
+ var tmp0_subject = schemaOrReference_0;
1251
+ var tmp;
1252
+ if (tmp0_subject instanceof SchemaObject) {
1253
+ tmp = schemaOrReference_0;
1254
+ } else {
1255
+ if (tmp0_subject instanceof ReferenceObject) {
1256
+ var tmp0 = $this_0;
1257
+ var tmp2 = resolveSchemaObject($this_1, $this_0, schemaOrReference_0);
1258
+ $this_0 = tmp0;
1259
+ $this_1 = $this_1;
1260
+ schemaOrReference_0 = tmp2;
1261
+ continue $l$0;
1262
+ } else {
1263
+ noWhenBranchMatchedException();
1264
+ }
1265
+ }
1266
+ return tmp;
1242
1267
  }
1268
+ while (false);
1243
1269
  }
1244
- return tmp;
1270
+ while (true);
1245
1271
  }
1246
- function resolve_0(_this__u8e3s4, $this) {
1272
+ function resolve_0(_this__u8e3s4, $this, schemaOrReferenceOrBoolean) {
1247
1273
  var tmp;
1248
- if (_this__u8e3s4 instanceof SchemaObject) {
1249
- tmp = _this__u8e3s4;
1274
+ if (schemaOrReferenceOrBoolean instanceof SchemaObject) {
1275
+ tmp = schemaOrReferenceOrBoolean;
1250
1276
  } else {
1251
- if (_this__u8e3s4 instanceof ReferenceObject) {
1252
- tmp = resolve(resolveSchemaObject(_this__u8e3s4, $this), $this);
1277
+ if (schemaOrReferenceOrBoolean instanceof ReferenceObject) {
1278
+ tmp = resolve(_this__u8e3s4, $this, resolveSchemaObject(_this__u8e3s4, $this, schemaOrReferenceOrBoolean));
1253
1279
  } else {
1254
- if (_this__u8e3s4 instanceof BooleanObject) {
1280
+ if (schemaOrReferenceOrBoolean instanceof BooleanObject) {
1255
1281
  var reason = 'Not yet implemented';
1256
1282
  throw new NotImplementedError('An operation is not implemented: ' + reason);
1257
1283
  } else {
@@ -1261,13 +1287,13 @@
1261
1287
  }
1262
1288
  return tmp;
1263
1289
  }
1264
- function resolve_1(_this__u8e3s4, $this) {
1290
+ function resolve_1(_this__u8e3s4, $this, responseOrReference) {
1265
1291
  var tmp;
1266
- if (_this__u8e3s4 instanceof ResponseObject) {
1267
- tmp = _this__u8e3s4;
1292
+ if (responseOrReference instanceof ResponseObject) {
1293
+ tmp = responseOrReference;
1268
1294
  } else {
1269
- if (_this__u8e3s4 instanceof ReferenceObject) {
1270
- tmp = resolveResponseObject(_this__u8e3s4, $this);
1295
+ if (responseOrReference instanceof ReferenceObject) {
1296
+ tmp = resolveResponseObject(_this__u8e3s4, $this, responseOrReference);
1271
1297
  } else {
1272
1298
  noWhenBranchMatchedException();
1273
1299
  }
@@ -1288,54 +1314,72 @@
1288
1314
  }
1289
1315
  return tmp;
1290
1316
  }
1291
- function resolve_3(_this__u8e3s4, $this) {
1317
+ function resolve_3(_this__u8e3s4, $this, parameterOrReference) {
1292
1318
  var tmp;
1293
- if (_this__u8e3s4 instanceof ParameterObject) {
1294
- tmp = _this__u8e3s4;
1319
+ if (parameterOrReference instanceof ParameterObject) {
1320
+ tmp = parameterOrReference;
1295
1321
  } else {
1296
- if (_this__u8e3s4 instanceof ReferenceObject) {
1297
- tmp = resolveParameterObject(_this__u8e3s4, $this);
1322
+ if (parameterOrReference instanceof ReferenceObject) {
1323
+ tmp = resolveParameterObject(_this__u8e3s4, $this, parameterOrReference);
1298
1324
  } else {
1299
1325
  noWhenBranchMatchedException();
1300
1326
  }
1301
1327
  }
1302
1328
  return tmp;
1303
1329
  }
1304
- function flatten(_this__u8e3s4, $this, name) {
1330
+ function flatten(_this__u8e3s4, $this, schemaObject, name) {
1305
1331
  var tmp;
1306
- if (!(_this__u8e3s4.r1l_1 == null)) {
1332
+ if (!(schemaObject.r1l_1 == null)) {
1307
1333
  var tmp_0;
1308
- if (_this__u8e3s4.r1l_1 instanceof BooleanObject) {
1334
+ if (schemaObject.r1l_1 instanceof BooleanObject) {
1309
1335
  tmp_0 = emptyList();
1310
1336
  } else {
1311
- var tmp1_safe_receiver = _this__u8e3s4.r1l_1;
1312
- var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : resolve_0(tmp1_safe_receiver, $this);
1337
+ var tmp1_safe_receiver = schemaObject.r1l_1;
1313
1338
  var tmp_1;
1314
- if (tmp2_safe_receiver == null) {
1339
+ if (tmp1_safe_receiver == null) {
1315
1340
  tmp_1 = null;
1341
+ } else {
1342
+ // Inline function 'kotlin.let' call
1343
+ // Inline function 'kotlin.contracts.contract' call
1344
+ // Inline function 'community.flock.wirespec.openapi.v2.OpenApiV2Parser.flatten.<anonymous>' call
1345
+ tmp_1 = resolve_0(_this__u8e3s4, OpenApiV2Parser_instance, tmp1_safe_receiver);
1346
+ }
1347
+ var tmp2_safe_receiver = tmp_1;
1348
+ var tmp_2;
1349
+ if (tmp2_safe_receiver == null) {
1350
+ tmp_2 = null;
1316
1351
  } else {
1317
1352
  // Inline function 'kotlin.takeIf' call
1318
1353
  // Inline function 'kotlin.contracts.contract' call
1319
- var tmp_2;
1354
+ var tmp_3;
1320
1355
  // Inline function 'community.flock.wirespec.openapi.v2.OpenApiV2Parser.flatten.<anonymous>' call
1321
1356
  if (!(tmp2_safe_receiver.q1l_1 == null)) {
1322
- tmp_2 = tmp2_safe_receiver;
1357
+ tmp_3 = tmp2_safe_receiver;
1323
1358
  } else {
1324
- tmp_2 = null;
1359
+ tmp_3 = null;
1325
1360
  }
1326
- tmp_1 = tmp_2;
1361
+ tmp_2 = tmp_3;
1362
+ }
1363
+ var tmp3_safe_receiver = tmp_2;
1364
+ var tmp_4;
1365
+ if (tmp3_safe_receiver == null) {
1366
+ tmp_4 = null;
1367
+ } else {
1368
+ // Inline function 'kotlin.let' call
1369
+ // Inline function 'kotlin.contracts.contract' call
1370
+ // Inline function 'community.flock.wirespec.openapi.v2.OpenApiV2Parser.flatten.<anonymous>' call
1371
+ tmp_4 = flatten(_this__u8e3s4, OpenApiV2Parser_instance, tmp3_safe_receiver, name);
1327
1372
  }
1328
- var tmp3_safe_receiver = tmp_1;
1329
- var tmp4_elvis_lhs = tmp3_safe_receiver == null ? null : flatten(tmp3_safe_receiver, $this, name);
1373
+ var tmp4_elvis_lhs = tmp_4;
1330
1374
  tmp_0 = tmp4_elvis_lhs == null ? emptyList() : tmp4_elvis_lhs;
1331
1375
  }
1332
1376
  tmp = tmp_0;
1333
- } else if (!(_this__u8e3s4.p1l_1 == null)) {
1334
- var tmp_3 = Companion_instance.w28(name);
1377
+ } else if (!(schemaObject.p1l_1 == null)) {
1378
+ var tmp_5 = Companion_instance.w28(name);
1335
1379
  // Inline function 'kotlin.collections.distinctBy' call
1336
1380
  // Inline function 'kotlin.collections.flatMap' call
1337
1381
  // Inline function 'kotlin.collections.orEmpty' call
1338
- var tmp0_elvis_lhs = _this__u8e3s4.p1l_1;
1382
+ var tmp0_elvis_lhs = schemaObject.p1l_1;
1339
1383
  // Inline function 'kotlin.collections.flatMapTo' call
1340
1384
  var this_0 = tmp0_elvis_lhs == null ? emptyList() : tmp0_elvis_lhs;
1341
1385
  var destination = ArrayList_init_$Create$();
@@ -1343,17 +1387,17 @@
1343
1387
  while (tmp0_iterator.w()) {
1344
1388
  var element = tmp0_iterator.y();
1345
1389
  // Inline function 'community.flock.wirespec.openapi.v2.OpenApiV2Parser.flatten.<anonymous>' call
1346
- var tmp_4;
1390
+ var tmp_6;
1347
1391
  if (element instanceof SchemaObject) {
1348
- tmp_4 = toField_0(element, $this, name);
1392
+ tmp_6 = toField_0(_this__u8e3s4, OpenApiV2Parser_instance, element, name);
1349
1393
  } else {
1350
1394
  if (element instanceof ReferenceObject) {
1351
- tmp_4 = toField_0(resolve(resolveSchemaObject(element, $this), $this), $this, getReference(element, $this));
1395
+ tmp_6 = toField_0(_this__u8e3s4, OpenApiV2Parser_instance, resolve(_this__u8e3s4, OpenApiV2Parser_instance, resolveSchemaObject(_this__u8e3s4, OpenApiV2Parser_instance, element)), getReference(element, OpenApiV2Parser_instance));
1352
1396
  } else {
1353
1397
  noWhenBranchMatchedException();
1354
1398
  }
1355
1399
  }
1356
- var list = tmp_4;
1400
+ var list = tmp_6;
1357
1401
  addAll(destination, list);
1358
1402
  }
1359
1403
  var set = HashSet_init_$Create$();
@@ -1367,18 +1411,18 @@
1367
1411
  list_0.s(e);
1368
1412
  }
1369
1413
  }
1370
- var tmp_5 = listOf(new Type(null, tmp_3, new Shape(list_0)));
1414
+ var tmp_7 = listOf(new Type(null, tmp_5, new Shape(list_0)));
1371
1415
  // Inline function 'kotlin.collections.flatMap' call
1372
1416
  // Inline function 'kotlin.collections.flatMapTo' call
1373
- var this_1 = ensureNotNull(_this__u8e3s4.p1l_1);
1417
+ var this_1 = ensureNotNull(schemaObject.p1l_1);
1374
1418
  var destination_0 = ArrayList_init_$Create$();
1375
1419
  var tmp0_iterator_1 = this_1.v();
1376
1420
  while (tmp0_iterator_1.w()) {
1377
1421
  var element_0 = tmp0_iterator_1.y();
1378
1422
  // Inline function 'community.flock.wirespec.openapi.v2.OpenApiV2Parser.flatten.<anonymous>' call
1379
- var tmp_6;
1423
+ var tmp_8;
1380
1424
  if (element_0 instanceof ReferenceObject) {
1381
- tmp_6 = emptyList();
1425
+ tmp_8 = emptyList();
1382
1426
  } else {
1383
1427
  if (element_0 instanceof SchemaObject) {
1384
1428
  // Inline function 'kotlin.collections.flatMap' call
@@ -1396,48 +1440,48 @@
1396
1440
  var key_0 = element_1.o2();
1397
1441
  // Inline function 'kotlin.collections.component2' call
1398
1442
  var value = element_1.p2();
1399
- var tmp_7;
1443
+ var tmp_9;
1400
1444
  if (value instanceof ReferenceObject) {
1401
- tmp_7 = emptyList();
1445
+ tmp_9 = emptyList();
1402
1446
  } else {
1403
1447
  if (value instanceof SchemaObject) {
1404
- tmp_7 = flatten(value, $this, Common_instance.d2c([name, key_0]));
1448
+ tmp_9 = flatten(_this__u8e3s4, OpenApiV2Parser_instance, value, Common_instance.e2c([name, key_0]));
1405
1449
  } else {
1406
1450
  noWhenBranchMatchedException();
1407
1451
  }
1408
1452
  }
1409
- var list_1 = tmp_7;
1453
+ var list_1 = tmp_9;
1410
1454
  addAll(destination_1, list_1);
1411
1455
  }
1412
- tmp_6 = destination_1;
1456
+ tmp_8 = destination_1;
1413
1457
  } else {
1414
1458
  noWhenBranchMatchedException();
1415
1459
  }
1416
1460
  }
1417
- var list_2 = tmp_6;
1461
+ var list_2 = tmp_8;
1418
1462
  addAll(destination_0, list_2);
1419
1463
  }
1420
- tmp = plus(tmp_5, destination_0);
1421
- } else if (!(_this__u8e3s4.m1l_1 == null)) {
1464
+ tmp = plus(tmp_7, destination_0);
1465
+ } else if (!(schemaObject.m1l_1 == null)) {
1422
1466
  // Inline function 'kotlin.let' call
1423
1467
  // Inline function 'kotlin.collections.map' call
1424
- var this_3 = ensureNotNull(_this__u8e3s4.m1l_1);
1468
+ var this_3 = ensureNotNull(schemaObject.m1l_1);
1425
1469
  // Inline function 'kotlin.collections.mapTo' call
1426
1470
  var destination_2 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_3, 10));
1427
1471
  var tmp0_iterator_3 = this_3.v();
1428
1472
  while (tmp0_iterator_3.w()) {
1429
1473
  var item = tmp0_iterator_3.y();
1430
1474
  // Inline function 'community.flock.wirespec.openapi.v2.OpenApiV2Parser.flatten.<anonymous>' call
1431
- var tmp$ret$18 = item.d16();
1432
- destination_2.s(tmp$ret$18);
1475
+ var tmp$ret$22 = item.d16();
1476
+ destination_2.s(tmp$ret$22);
1433
1477
  }
1434
1478
  // Inline function 'kotlin.contracts.contract' call
1435
1479
  // Inline function 'community.flock.wirespec.openapi.v2.OpenApiV2Parser.flatten.<anonymous>' call
1436
1480
  var it = toSet(destination_2);
1437
1481
  tmp = listOf(new Enum(null, Companion_instance.w28(name), it));
1438
1482
  } else {
1439
- var tmp5_subject = _this__u8e3s4.n1l_1;
1440
- var tmp_8;
1483
+ var tmp5_subject = schemaObject.n1l_1;
1484
+ var tmp_10;
1441
1485
  switch (tmp5_subject == null ? -1 : tmp5_subject.g9_1) {
1442
1486
  case -1:
1443
1487
  case 5:
@@ -1445,7 +1489,7 @@
1445
1489
 
1446
1490
  // Inline function 'kotlin.collections.orEmpty' call
1447
1491
 
1448
- var tmp0_elvis_lhs_1 = _this__u8e3s4.q1l_1;
1492
+ var tmp0_elvis_lhs_1 = schemaObject.q1l_1;
1449
1493
  // Inline function 'kotlin.collections.flatMapTo' call
1450
1494
 
1451
1495
  var this_4 = tmp0_elvis_lhs_1 == null ? emptyMap() : tmp0_elvis_lhs_1;
@@ -1460,47 +1504,47 @@
1460
1504
  var key_1 = element_2.o2();
1461
1505
  // Inline function 'kotlin.collections.component2' call
1462
1506
  var value_0 = element_2.p2();
1463
- var list_3 = flatten_0(value_0, $this, Common_instance.d2c([name, key_1]));
1507
+ var list_3 = flatten_0(_this__u8e3s4, OpenApiV2Parser_instance, value_0, Common_instance.e2c([name, key_1]));
1464
1508
  addAll(destination_3, list_3);
1465
1509
  }
1466
1510
 
1467
1511
  var fields = destination_3;
1468
- var schema = listOf(new Type(null, Companion_instance.w28(name), new Shape(toField_0(_this__u8e3s4, $this, name))));
1469
- tmp_8 = plus(schema, fields);
1512
+ var schema = listOf(new Type(null, Companion_instance.w28(name), new Shape(toField_0(_this__u8e3s4, $this, schemaObject, name))));
1513
+ tmp_10 = plus(schema, fields);
1470
1514
  break;
1471
1515
  case 4:
1472
- var it_0 = _this__u8e3s4.o1l_1;
1473
- var tmp_9;
1516
+ var it_0 = schemaObject.o1l_1;
1517
+ var tmp_11;
1474
1518
  if (it_0 instanceof ReferenceObject) {
1475
- tmp_9 = emptyList();
1519
+ tmp_11 = emptyList();
1476
1520
  } else {
1477
1521
  if (it_0 instanceof SchemaObject) {
1478
- tmp_9 = flatten(it_0, $this, Common_instance.d2c([name, 'Array']));
1522
+ tmp_11 = flatten(_this__u8e3s4, $this, it_0, Common_instance.e2c([name, 'Array']));
1479
1523
  } else {
1480
1524
  if (it_0 == null) {
1481
- tmp_9 = emptyList();
1525
+ tmp_11 = emptyList();
1482
1526
  } else {
1483
1527
  noWhenBranchMatchedException();
1484
1528
  }
1485
1529
  }
1486
1530
  }
1487
1531
 
1488
- tmp_8 = tmp_9;
1532
+ tmp_10 = tmp_11;
1489
1533
  break;
1490
1534
  default:
1491
- tmp_8 = emptyList();
1535
+ tmp_10 = emptyList();
1492
1536
  break;
1493
1537
  }
1494
- tmp = tmp_8;
1538
+ tmp = tmp_10;
1495
1539
  }
1496
1540
  return tmp;
1497
1541
  }
1498
- function flatten_0(_this__u8e3s4, $this, name) {
1542
+ function flatten_0(_this__u8e3s4, $this, schemaOrReference, name) {
1499
1543
  var tmp;
1500
- if (_this__u8e3s4 instanceof SchemaObject) {
1501
- tmp = flatten(_this__u8e3s4, $this, name);
1544
+ if (schemaOrReference instanceof SchemaObject) {
1545
+ tmp = flatten(_this__u8e3s4, $this, schemaOrReference, name);
1502
1546
  } else {
1503
- if (_this__u8e3s4 instanceof ReferenceObject) {
1547
+ if (schemaOrReference instanceof ReferenceObject) {
1504
1548
  tmp = emptyList();
1505
1549
  } else {
1506
1550
  noWhenBranchMatchedException();
@@ -1508,12 +1552,12 @@
1508
1552
  }
1509
1553
  return tmp;
1510
1554
  }
1511
- function toReference(_this__u8e3s4, $this) {
1555
+ function toReference(_this__u8e3s4, $this, reference) {
1512
1556
  // Inline function 'kotlin.let' call
1513
1557
  // Inline function 'kotlin.contracts.contract' call
1514
1558
  // Inline function 'community.flock.wirespec.openapi.v2.OpenApiV2Parser.toReference.<anonymous>' call
1515
- var refOrSchema = resolveSchemaObject(_this__u8e3s4, $this);
1516
- var schema = resolve(refOrSchema, $this);
1559
+ var refOrSchema = resolveSchemaObject(_this__u8e3s4, $this, reference);
1560
+ var schema = resolve(_this__u8e3s4, OpenApiV2Parser_instance, refOrSchema);
1517
1561
  var tmp;
1518
1562
  if (!(schema.r1l_1 == null)) {
1519
1563
  var additionalProperties = ensureNotNull(schema.r1l_1);
@@ -1522,10 +1566,10 @@
1522
1566
  tmp_0 = new Any(false, true);
1523
1567
  } else {
1524
1568
  if (additionalProperties instanceof ReferenceObject) {
1525
- tmp_0 = toMap_0(toReference(additionalProperties, $this));
1569
+ tmp_0 = toMap_0(toReference(_this__u8e3s4, OpenApiV2Parser_instance, additionalProperties));
1526
1570
  } else {
1527
1571
  if (additionalProperties instanceof SchemaObject) {
1528
- tmp_0 = toMap_0(toReference_0(additionalProperties, $this, getReference(_this__u8e3s4, $this)));
1572
+ tmp_0 = toMap_0(toReference_0(_this__u8e3s4, OpenApiV2Parser_instance, additionalProperties, getReference(reference, OpenApiV2Parser_instance)));
1529
1573
  } else {
1530
1574
  noWhenBranchMatchedException();
1531
1575
  }
@@ -1533,9 +1577,9 @@
1533
1577
  }
1534
1578
  tmp = tmp_0;
1535
1579
  } else if (!(schema.m1l_1 == null)) {
1536
- tmp = new Custom(Common_instance.d2c([getReference(_this__u8e3s4, $this)]), false, false);
1580
+ tmp = new Custom(Common_instance.e2c([getReference(reference, OpenApiV2Parser_instance)]), false, false);
1537
1581
  } else if (isPrimitive(schema.n1l_1)) {
1538
- tmp = new Primitive(toPrimitive(ensureNotNull(schema.n1l_1), $this), false, false);
1582
+ tmp = new Primitive(toPrimitive(ensureNotNull(schema.n1l_1), OpenApiV2Parser_instance), false, false);
1539
1583
  } else {
1540
1584
  var tmp0_subject = schema.n1l_1;
1541
1585
  var tmp_1;
@@ -1543,13 +1587,13 @@
1543
1587
  var items = schema.o1l_1;
1544
1588
  var tmp_2;
1545
1589
  if (items instanceof ReferenceObject) {
1546
- tmp_2 = new Custom(Common_instance.d2c([getReference(items, $this)]), true);
1590
+ tmp_2 = new Custom(Common_instance.e2c([getReference(items, OpenApiV2Parser_instance)]), true);
1547
1591
  } else {
1548
1592
  if (items instanceof SchemaObject) {
1549
- tmp_2 = toIterable(toReference_0(items, $this, Common_instance.d2c([getReference(_this__u8e3s4, $this), 'Array'])));
1593
+ tmp_2 = toIterable(toReference_0(_this__u8e3s4, OpenApiV2Parser_instance, items, Common_instance.e2c([getReference(reference, OpenApiV2Parser_instance), 'Array'])));
1550
1594
  } else {
1551
1595
  if (items == null) {
1552
- var message = 'items cannot be null when type is array: ' + new Ref(_this__u8e3s4.w1l_1);
1596
+ var message = 'items cannot be null when type is array: ' + new Ref(reference.w1l_1);
1553
1597
  throw IllegalStateException_init_$Create$(toString(message));
1554
1598
  } else {
1555
1599
  noWhenBranchMatchedException();
@@ -1560,10 +1604,10 @@
1560
1604
  } else {
1561
1605
  var tmp_3;
1562
1606
  if (refOrSchema instanceof SchemaObject) {
1563
- tmp_3 = new Custom(Common_instance.d2c([getReference(_this__u8e3s4, $this)]), false);
1607
+ tmp_3 = new Custom(Common_instance.e2c([getReference(reference, OpenApiV2Parser_instance)]), false);
1564
1608
  } else {
1565
1609
  if (refOrSchema instanceof ReferenceObject) {
1566
- tmp_3 = new Custom(Common_instance.d2c([getReference(refOrSchema, $this)]), false);
1610
+ tmp_3 = new Custom(Common_instance.e2c([getReference(refOrSchema, OpenApiV2Parser_instance)]), false);
1567
1611
  } else {
1568
1612
  noWhenBranchMatchedException();
1569
1613
  }
@@ -1574,16 +1618,16 @@
1574
1618
  }
1575
1619
  return tmp;
1576
1620
  }
1577
- function toReference_0(_this__u8e3s4, $this, name) {
1621
+ function toReference_0(_this__u8e3s4, $this, schema, name) {
1578
1622
  var tmp;
1579
- if (!(_this__u8e3s4.r1l_1 == null)) {
1580
- var additionalProperties = ensureNotNull(_this__u8e3s4.r1l_1);
1623
+ if (!(schema.r1l_1 == null)) {
1624
+ var additionalProperties = ensureNotNull(schema.r1l_1);
1581
1625
  var tmp_0;
1582
1626
  if (additionalProperties instanceof BooleanObject) {
1583
1627
  tmp_0 = new Any(false, true);
1584
1628
  } else {
1585
1629
  if (additionalProperties instanceof ReferenceObject) {
1586
- tmp_0 = toMap_0(toReference(additionalProperties, $this));
1630
+ tmp_0 = toMap_0(toReference(_this__u8e3s4, $this, additionalProperties));
1587
1631
  } else {
1588
1632
  if (additionalProperties instanceof SchemaObject) {
1589
1633
  // Inline function 'kotlin.takeIf' call
@@ -1600,10 +1644,10 @@
1600
1644
  if (tmp0_safe_receiver == null) {
1601
1645
  tmp_2 = null;
1602
1646
  } else {
1603
- // Inline function 'kotlin.run' call
1647
+ // Inline function 'kotlin.let' call
1604
1648
  // Inline function 'kotlin.contracts.contract' call
1605
1649
  // Inline function 'community.flock.wirespec.openapi.v2.OpenApiV2Parser.toReference.<anonymous>' call
1606
- tmp_2 = toMap_0(toReference_0(tmp0_safe_receiver, $this, name));
1650
+ tmp_2 = toMap_0(toReference_0(_this__u8e3s4, OpenApiV2Parser_instance, tmp0_safe_receiver, name));
1607
1651
  }
1608
1652
  var tmp1_elvis_lhs = tmp_2;
1609
1653
  tmp_0 = tmp1_elvis_lhs == null ? new Any(false, true) : tmp1_elvis_lhs;
@@ -1613,40 +1657,40 @@
1613
1657
  }
1614
1658
  }
1615
1659
  tmp = tmp_0;
1616
- } else if (!(_this__u8e3s4.m1l_1 == null)) {
1617
- tmp = new Custom(name, false, !(_this__u8e3s4.r1l_1 == null));
1660
+ } else if (!(schema.m1l_1 == null)) {
1661
+ tmp = new Custom(name, false, !(schema.r1l_1 == null));
1618
1662
  } else {
1619
- var type = _this__u8e3s4.n1l_1;
1663
+ var type = schema.n1l_1;
1620
1664
  var tmp_3;
1621
1665
  switch (type == null ? -1 : type.g9_1) {
1622
1666
  case 0:
1623
1667
  case 2:
1624
1668
  case 1:
1625
1669
  case 3:
1626
- tmp_3 = new Primitive(toPrimitive(type, $this), false, !(_this__u8e3s4.r1l_1 == null));
1670
+ tmp_3 = new Primitive(toPrimitive(type, $this), false, !(schema.r1l_1 == null));
1627
1671
  break;
1628
1672
  case -1:
1629
1673
  case 5:
1630
1674
  var tmp_4;
1631
- var tmp_5 = _this__u8e3s4.r1l_1;
1675
+ var tmp_5 = schema.r1l_1;
1632
1676
  if (tmp_5 instanceof BooleanObject) {
1633
- tmp_4 = new Any(false, !(_this__u8e3s4.r1l_1 == null));
1677
+ tmp_4 = new Any(false, !(schema.r1l_1 == null));
1634
1678
  } else {
1635
- tmp_4 = new Custom(name, false, !(_this__u8e3s4.r1l_1 == null));
1679
+ tmp_4 = new Custom(name, false, !(schema.r1l_1 == null));
1636
1680
  }
1637
1681
 
1638
1682
  tmp_3 = tmp_4;
1639
1683
  break;
1640
1684
  case 4:
1641
- var it = _this__u8e3s4.o1l_1;
1685
+ var items = schema.o1l_1;
1642
1686
  var tmp_6;
1643
- if (it instanceof ReferenceObject) {
1644
- tmp_6 = toIterable(toReference(it, $this));
1687
+ if (items instanceof ReferenceObject) {
1688
+ tmp_6 = toIterable(toReference(_this__u8e3s4, $this, items));
1645
1689
  } else {
1646
- if (it instanceof SchemaObject) {
1647
- tmp_6 = toIterable(toReference_0(it, $this, name));
1690
+ if (items instanceof SchemaObject) {
1691
+ tmp_6 = toIterable(toReference_0(_this__u8e3s4, $this, items, name));
1648
1692
  } else {
1649
- if (it == null) {
1693
+ if (items == null) {
1650
1694
  var message = 'When schema is of type array items cannot be null for name: ' + name;
1651
1695
  throw IllegalStateException_init_$Create$(toString(message));
1652
1696
  } else {
@@ -1669,6 +1713,7 @@
1669
1713
  return tmp;
1670
1714
  }
1671
1715
  function toOperationList(_this__u8e3s4, $this) {
1716
+ var tmp = Common_instance;
1672
1717
  // Inline function 'kotlin.collections.associateWith' call
1673
1718
  var this_0 = get_entries();
1674
1719
  var result = LinkedHashMap_init_$Create$(coerceAtLeast(mapCapacity(collectionSizeOrDefault(this_0, 10)), 16));
@@ -1677,40 +1722,40 @@
1677
1722
  while (tmp0_iterator.w()) {
1678
1723
  var element = tmp0_iterator.y();
1679
1724
  // Inline function 'community.flock.wirespec.openapi.v2.OpenApiV2Parser.toOperationList.<anonymous>' call
1680
- var tmp;
1725
+ var tmp_0;
1681
1726
  switch (element.g9_1) {
1682
1727
  case 0:
1683
- tmp = _this__u8e3s4.f1g_1;
1728
+ tmp_0 = _this__u8e3s4.f1g_1;
1684
1729
  break;
1685
1730
  case 1:
1686
- tmp = _this__u8e3s4.h1g_1;
1731
+ tmp_0 = _this__u8e3s4.h1g_1;
1687
1732
  break;
1688
1733
  case 2:
1689
- tmp = _this__u8e3s4.g1g_1;
1734
+ tmp_0 = _this__u8e3s4.g1g_1;
1690
1735
  break;
1691
1736
  case 3:
1692
- tmp = _this__u8e3s4.i1g_1;
1737
+ tmp_0 = _this__u8e3s4.i1g_1;
1693
1738
  break;
1694
1739
  case 4:
1695
- tmp = _this__u8e3s4.j1g_1;
1740
+ tmp_0 = _this__u8e3s4.j1g_1;
1696
1741
  break;
1697
1742
  case 5:
1698
- tmp = _this__u8e3s4.k1g_1;
1743
+ tmp_0 = _this__u8e3s4.k1g_1;
1699
1744
  break;
1700
1745
  case 6:
1701
- tmp = _this__u8e3s4.l1g_1;
1746
+ tmp_0 = _this__u8e3s4.l1g_1;
1702
1747
  break;
1703
1748
  case 7:
1704
- tmp = _this__u8e3s4.m1g_1;
1749
+ tmp_0 = _this__u8e3s4.m1g_1;
1705
1750
  break;
1706
1751
  default:
1707
1752
  noWhenBranchMatchedException();
1708
1753
  break;
1709
1754
  }
1710
- var tmp$ret$0 = tmp;
1755
+ var tmp$ret$0 = tmp_0;
1711
1756
  result.l2(element, tmp$ret$0);
1712
1757
  }
1713
- return filterNotNullValues(result);
1758
+ return tmp.f2c(result);
1714
1759
  }
1715
1760
  function getReference(_this__u8e3s4, $this) {
1716
1761
  return split(_Ref___get_value__impl__kxavfe(_this__u8e3s4.w1l_1), ['/']).g1(2);
@@ -1736,30 +1781,48 @@
1736
1781
  }
1737
1782
  return tmp;
1738
1783
  }
1739
- function toField(_this__u8e3s4, $this, identifier) {
1784
+ function toField(_this__u8e3s4, $this, header, identifier) {
1740
1785
  var tmp = Companion_instance.w28(identifier);
1741
1786
  var tmp_0;
1742
- if (_this__u8e3s4.p1m_1 === 'array') {
1743
- var tmp1_safe_receiver = _this__u8e3s4.r1m_1;
1744
- var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : resolve(tmp1_safe_receiver, $this);
1745
- var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : toReference_0(tmp2_safe_receiver, $this, identifier);
1787
+ if (header.p1m_1 === 'array') {
1788
+ var tmp1_safe_receiver = header.r1m_1;
1746
1789
  var tmp_1;
1790
+ if (tmp1_safe_receiver == null) {
1791
+ tmp_1 = null;
1792
+ } else {
1793
+ // Inline function 'kotlin.let' call
1794
+ // Inline function 'kotlin.contracts.contract' call
1795
+ // Inline function 'community.flock.wirespec.openapi.v2.OpenApiV2Parser.toField.<anonymous>' call
1796
+ tmp_1 = resolve(_this__u8e3s4, OpenApiV2Parser_instance, tmp1_safe_receiver);
1797
+ }
1798
+ var tmp2_safe_receiver = tmp_1;
1799
+ var tmp_2;
1800
+ if (tmp2_safe_receiver == null) {
1801
+ tmp_2 = null;
1802
+ } else {
1803
+ // Inline function 'kotlin.let' call
1804
+ // Inline function 'kotlin.contracts.contract' call
1805
+ // Inline function 'community.flock.wirespec.openapi.v2.OpenApiV2Parser.toField.<anonymous>' call
1806
+ tmp_2 = toReference_0(_this__u8e3s4, OpenApiV2Parser_instance, tmp2_safe_receiver, identifier);
1807
+ }
1808
+ var tmp3_elvis_lhs = tmp_2;
1809
+ var tmp_3;
1747
1810
  if (tmp3_elvis_lhs == null) {
1748
1811
  var message = 'Item cannot be null';
1749
1812
  throw IllegalStateException_init_$Create$(toString(message));
1750
1813
  } else {
1751
- tmp_1 = tmp3_elvis_lhs;
1814
+ tmp_3 = tmp3_elvis_lhs;
1752
1815
  }
1753
- tmp_0 = tmp_1;
1816
+ tmp_0 = tmp_3;
1754
1817
  } else {
1755
- tmp_0 = new Primitive(mapType(_this__u8e3s4.p1m_1, $this), false, false);
1818
+ tmp_0 = new Primitive(mapType(header.p1m_1, $this), false, false);
1756
1819
  }
1757
1820
  return new Field(tmp, tmp_0, true);
1758
1821
  }
1759
- function toField_0(_this__u8e3s4, $this, name) {
1822
+ function toField_0(_this__u8e3s4, $this, schema, name) {
1760
1823
  // Inline function 'kotlin.collections.map' call
1761
1824
  // Inline function 'kotlin.collections.orEmpty' call
1762
- var tmp0_elvis_lhs = _this__u8e3s4.q1l_1;
1825
+ var tmp0_elvis_lhs = schema.q1l_1;
1763
1826
  var this_0 = tmp0_elvis_lhs == null ? emptyMap() : tmp0_elvis_lhs;
1764
1827
  // Inline function 'kotlin.collections.mapTo' call
1765
1828
  var destination = ArrayList_init_$Create$_0(this_0.p());
@@ -1775,15 +1838,15 @@
1775
1838
  var tmp;
1776
1839
  if (value instanceof SchemaObject) {
1777
1840
  var tmp_0 = Companion_instance.w28(key);
1778
- var tmp_1 = !(value.m1l_1 == null) ? toReference_0(value, $this, Common_instance.d2c([name, key])) : equals(value.n1l_1, Type_ARRAY_getInstance()) ? toReference_0(value, $this, Common_instance.d2c([name, key, 'Array'])) : toReference_0(value, $this, Common_instance.d2c([name, key]));
1779
- var tmp1_safe_receiver = _this__u8e3s4.l1l_1;
1841
+ var tmp_1 = !(value.m1l_1 == null) ? toReference_0(_this__u8e3s4, OpenApiV2Parser_instance, value, Common_instance.e2c([name, key])) : equals(value.n1l_1, Type_ARRAY_getInstance()) ? toReference_0(_this__u8e3s4, OpenApiV2Parser_instance, value, Common_instance.e2c([name, key, 'Array'])) : toReference_0(_this__u8e3s4, OpenApiV2Parser_instance, value, Common_instance.e2c([name, key]));
1842
+ var tmp1_safe_receiver = schema.l1l_1;
1780
1843
  var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.r(key);
1781
1844
  tmp = new Field(tmp_0, tmp_1, !(tmp2_elvis_lhs == null ? false : tmp2_elvis_lhs));
1782
1845
  } else {
1783
1846
  if (value instanceof ReferenceObject) {
1784
1847
  var tmp_2 = Companion_instance.w28(key);
1785
- var tmp_3 = toReference(value, $this);
1786
- var tmp3_safe_receiver = _this__u8e3s4.l1l_1;
1848
+ var tmp_3 = toReference(_this__u8e3s4, OpenApiV2Parser_instance, value);
1849
+ var tmp3_safe_receiver = schema.l1l_1;
1787
1850
  var tmp4_elvis_lhs = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.r(key);
1788
1851
  tmp = new Field(tmp_2, tmp_3, !(tmp4_elvis_lhs == null ? false : tmp4_elvis_lhs));
1789
1852
  } else {
@@ -1795,15 +1858,15 @@
1795
1858
  }
1796
1859
  return destination;
1797
1860
  }
1798
- function toField_1(_this__u8e3s4, $this, name) {
1861
+ function toField_1(_this__u8e3s4, $this, parameter, name) {
1799
1862
  // Inline function 'kotlin.let' call
1800
1863
  // Inline function 'kotlin.let' call
1801
1864
  // Inline function 'kotlin.contracts.contract' call
1802
1865
  // Inline function 'community.flock.wirespec.openapi.v2.OpenApiV2Parser.toField.<anonymous>' call
1803
- var it = resolve_3(_this__u8e3s4, $this);
1866
+ var it = resolve_3(_this__u8e3s4, $this, parameter);
1804
1867
  var tmp;
1805
- if (!(_this__u8e3s4.o1h_1 == null)) {
1806
- tmp = new Custom(Common_instance.d2c([name, 'Parameter', it.t1g_1]), false);
1868
+ if (!(parameter.o1h_1 == null)) {
1869
+ tmp = new Custom(Common_instance.e2c([name, 'Parameter', it.t1g_1]), false);
1807
1870
  } else {
1808
1871
  var type = it.y1g_1;
1809
1872
  var tmp_0;
@@ -1818,34 +1881,44 @@
1818
1881
 
1819
1882
  // Inline function 'community.flock.wirespec.openapi.v2.OpenApiV2Parser.toField.<anonymous>.<anonymous>' call
1820
1883
 
1821
- var primitive = toPrimitive(type, $this);
1884
+ var primitive = toPrimitive(type, OpenApiV2Parser_instance);
1822
1885
  tmp_0 = new Primitive(primitive, false);
1823
1886
  break;
1824
1887
  case 4:
1825
1888
  var tmp0_safe_receiver = it.z1g_1;
1826
- var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : resolve(tmp0_safe_receiver, $this);
1827
- var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.n1l_1;
1828
- var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : toPrimitive(tmp2_safe_receiver, $this);
1829
1889
  var tmp_1;
1830
- if (tmp3_safe_receiver == null) {
1890
+ if (tmp0_safe_receiver == null) {
1831
1891
  tmp_1 = null;
1832
1892
  } else {
1833
1893
  // Inline function 'kotlin.let' call
1834
1894
  // Inline function 'kotlin.contracts.contract' call
1835
1895
  // Inline function 'community.flock.wirespec.openapi.v2.OpenApiV2Parser.toField.<anonymous>.<anonymous>' call
1836
- tmp_1 = new Primitive(tmp3_safe_receiver, true);
1896
+ tmp_1 = resolve(_this__u8e3s4, OpenApiV2Parser_instance, tmp0_safe_receiver);
1837
1897
  }
1838
1898
 
1839
- var tmp4_elvis_lhs = tmp_1;
1899
+ var tmp1_safe_receiver = tmp_1;
1900
+ var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.n1l_1;
1901
+ var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : toPrimitive(tmp2_safe_receiver, OpenApiV2Parser_instance);
1840
1902
  var tmp_2;
1903
+ if (tmp3_safe_receiver == null) {
1904
+ tmp_2 = null;
1905
+ } else {
1906
+ // Inline function 'kotlin.let' call
1907
+ // Inline function 'kotlin.contracts.contract' call
1908
+ // Inline function 'community.flock.wirespec.openapi.v2.OpenApiV2Parser.toField.<anonymous>.<anonymous>' call
1909
+ tmp_2 = new Primitive(tmp3_safe_receiver, true);
1910
+ }
1911
+
1912
+ var tmp4_elvis_lhs = tmp_2;
1913
+ var tmp_3;
1841
1914
  if (tmp4_elvis_lhs == null) {
1842
1915
  var reason = 'Not yet implemented';
1843
1916
  throw new NotImplementedError('An operation is not implemented: ' + reason);
1844
1917
  } else {
1845
- tmp_2 = tmp4_elvis_lhs;
1918
+ tmp_3 = tmp4_elvis_lhs;
1846
1919
  }
1847
1920
 
1848
- tmp_0 = tmp_2;
1921
+ tmp_0 = tmp_3;
1849
1922
  break;
1850
1923
  case 5:
1851
1924
  var reason_0 = 'Not yet implemented';
@@ -1865,9 +1938,9 @@
1865
1938
  // Inline function 'kotlin.contracts.contract' call
1866
1939
  // Inline function 'community.flock.wirespec.openapi.v2.OpenApiV2Parser.toField.<anonymous>' call
1867
1940
  var it_0 = tmp;
1868
- var tmp_3 = Companion_instance.w28(_this__u8e3s4.t1g_1);
1869
- var tmp0_elvis_lhs = _this__u8e3s4.w1g_1;
1870
- return new Field(tmp_3, it_0, !(tmp0_elvis_lhs == null ? false : tmp0_elvis_lhs));
1941
+ var tmp_4 = Companion_instance.w28(parameter.t1g_1);
1942
+ var tmp0_elvis_lhs = parameter.w1g_1;
1943
+ return new Field(tmp_4, it_0, !(tmp0_elvis_lhs == null ? false : tmp0_elvis_lhs));
1871
1944
  }
1872
1945
  function toSegments(_this__u8e3s4, $this, parameters) {
1873
1946
  // Inline function 'kotlin.collections.map' call
@@ -1922,7 +1995,7 @@
1922
1995
  // Inline function 'kotlin.contracts.contract' call
1923
1996
  // Inline function 'community.flock.wirespec.openapi.v2.OpenApiV2Parser.toSegments.<anonymous>.<anonymous>' call
1924
1997
  var tmp0_safe_receiver_0 = tmp0_safe_receiver.y1g_1;
1925
- tmp_2 = tmp0_safe_receiver_0 == null ? null : toPrimitive(tmp0_safe_receiver_0, $this);
1998
+ tmp_2 = tmp0_safe_receiver_0 == null ? null : toPrimitive(tmp0_safe_receiver_0, OpenApiV2Parser_instance);
1926
1999
  }
1927
2000
  var tmp1_safe_receiver = tmp_2;
1928
2001
  var tmp_3;
@@ -1963,7 +2036,7 @@
1963
2036
  // Inline function 'kotlin.let' call
1964
2037
  // Inline function 'kotlin.contracts.contract' call
1965
2038
  // Inline function 'community.flock.wirespec.openapi.v2.OpenApiV2Parser.toName.<anonymous>' call
1966
- tmp = Common_instance.d2c([tmp0_safe_receiver]);
2039
+ tmp = Common_instance.e2c([tmp0_safe_receiver]);
1967
2040
  }
1968
2041
  return tmp;
1969
2042
  }
@@ -1982,24 +2055,24 @@
1982
2055
  }
1983
2056
  }
1984
2057
  var tmp = destination;
1985
- return joinToString(tmp, '', VOID, VOID, VOID, VOID, OpenApiV2Parser$toName$lambda($this));
2058
+ return joinToString(tmp, '', VOID, VOID, VOID, VOID, OpenApiV2Parser$toName$lambda);
1986
2059
  }
1987
2060
  function FlattenRequest(path, pathItem, method, operation, type) {
1988
- this.i2c_1 = path;
1989
- this.j2c_1 = pathItem;
1990
- this.k2c_1 = method;
1991
- this.l2c_1 = operation;
1992
- this.m2c_1 = type;
2061
+ this.g2c_1 = path;
2062
+ this.h2c_1 = pathItem;
2063
+ this.i2c_1 = method;
2064
+ this.j2c_1 = operation;
2065
+ this.k2c_1 = type;
1993
2066
  }
1994
2067
  protoOf(FlattenRequest).toString = function () {
1995
- return 'FlattenRequest(path=' + new Path(this.i2c_1) + ', pathItem=' + this.j2c_1 + ', method=' + this.k2c_1 + ', operation=' + this.l2c_1 + ', type=' + this.m2c_1 + ')';
2068
+ return 'FlattenRequest(path=' + new Path(this.g2c_1) + ', pathItem=' + this.h2c_1 + ', method=' + this.i2c_1 + ', operation=' + this.j2c_1 + ', type=' + this.k2c_1 + ')';
1996
2069
  };
1997
2070
  protoOf(FlattenRequest).hashCode = function () {
1998
- var result = Path__hashCode_impl_go73kd(this.i2c_1);
2071
+ var result = Path__hashCode_impl_go73kd(this.g2c_1);
2072
+ result = imul(result, 31) + this.h2c_1.hashCode() | 0;
2073
+ result = imul(result, 31) + this.i2c_1.hashCode() | 0;
1999
2074
  result = imul(result, 31) + this.j2c_1.hashCode() | 0;
2000
- result = imul(result, 31) + this.k2c_1.hashCode() | 0;
2001
- result = imul(result, 31) + this.l2c_1.hashCode() | 0;
2002
- result = imul(result, 31) + getStringHashCode(this.m2c_1) | 0;
2075
+ result = imul(result, 31) + getStringHashCode(this.k2c_1) | 0;
2003
2076
  return result;
2004
2077
  };
2005
2078
  protoOf(FlattenRequest).equals = function (other) {
@@ -2008,15 +2081,15 @@
2008
2081
  if (!(other instanceof FlattenRequest))
2009
2082
  return false;
2010
2083
  var tmp0_other_with_cast = other instanceof FlattenRequest ? other : THROW_CCE();
2011
- if (!(this.i2c_1 === tmp0_other_with_cast.i2c_1))
2084
+ if (!(this.g2c_1 === tmp0_other_with_cast.g2c_1))
2012
2085
  return false;
2013
- if (!this.j2c_1.equals(tmp0_other_with_cast.j2c_1))
2086
+ if (!this.h2c_1.equals(tmp0_other_with_cast.h2c_1))
2014
2087
  return false;
2015
- if (!this.k2c_1.equals(tmp0_other_with_cast.k2c_1))
2088
+ if (!this.i2c_1.equals(tmp0_other_with_cast.i2c_1))
2016
2089
  return false;
2017
- if (!this.l2c_1.equals(tmp0_other_with_cast.l2c_1))
2090
+ if (!this.j2c_1.equals(tmp0_other_with_cast.j2c_1))
2018
2091
  return false;
2019
- if (!(this.m2c_1 === tmp0_other_with_cast.m2c_1))
2092
+ if (!(this.k2c_1 === tmp0_other_with_cast.k2c_1))
2020
2093
  return false;
2021
2094
  return true;
2022
2095
  };
@@ -2037,7 +2110,7 @@
2037
2110
  var pathItem = element.p2();
2038
2111
  // Inline function 'kotlin.collections.flatMap' call
2039
2112
  // Inline function 'kotlin.collections.flatMapTo' call
2040
- var this_1 = toOperationList(pathItem, $this);
2113
+ var this_1 = toOperationList(pathItem, OpenApiV2Parser_instance);
2041
2114
  var destination_0 = ArrayList_init_$Create$();
2042
2115
  // Inline function 'kotlin.collections.iterator' call
2043
2116
  var tmp0_iterator_0 = this_1.n2().v();
@@ -2049,7 +2122,7 @@
2049
2122
  // Inline function 'kotlin.collections.component2' call
2050
2123
  var operation = element_0.p2();
2051
2124
  // Inline function 'kotlin.collections.map' call
2052
- var tmp0_elvis_lhs = $this.f2c_1.a1f_1;
2125
+ var tmp0_elvis_lhs = _this__u8e3s4.a1f_1;
2053
2126
  var tmp1_elvis_lhs = tmp0_elvis_lhs == null ? operation.o1j_1 : tmp0_elvis_lhs;
2054
2127
  var this_2 = tmp1_elvis_lhs == null ? listOf('application/json') : tmp1_elvis_lhs;
2055
2128
  // Inline function 'kotlin.collections.mapTo' call
@@ -2072,32 +2145,31 @@
2072
2145
  var tmp0_iterator_2 = destination.v();
2073
2146
  while (tmp0_iterator_2.w()) {
2074
2147
  var element_1 = tmp0_iterator_2.y();
2075
- // Inline function 'community.flock.wirespec.openapi.v2.OpenApiV2Parser.flatMapRequests.<anonymous>' call
2076
2148
  var list_1 = f(element_1);
2077
2149
  addAll(destination_2, list_1);
2078
2150
  }
2079
2151
  return destination_2;
2080
2152
  }
2081
2153
  function FlattenResponse(path, pathItem, method, operation, statusCode, response, type) {
2082
- this.n2c_1 = path;
2083
- this.o2c_1 = pathItem;
2084
- this.p2c_1 = method;
2085
- this.q2c_1 = operation;
2086
- this.r2c_1 = statusCode;
2087
- this.s2c_1 = response;
2088
- this.t2c_1 = type;
2154
+ this.l2c_1 = path;
2155
+ this.m2c_1 = pathItem;
2156
+ this.n2c_1 = method;
2157
+ this.o2c_1 = operation;
2158
+ this.p2c_1 = statusCode;
2159
+ this.q2c_1 = response;
2160
+ this.r2c_1 = type;
2089
2161
  }
2090
2162
  protoOf(FlattenResponse).toString = function () {
2091
- return 'FlattenResponse(path=' + new Path(this.n2c_1) + ', pathItem=' + this.o2c_1 + ', method=' + this.p2c_1 + ', operation=' + this.q2c_1 + ', statusCode=' + new StatusCode(this.r2c_1) + ', response=' + this.s2c_1 + ', type=' + this.t2c_1 + ')';
2163
+ return 'FlattenResponse(path=' + new Path(this.l2c_1) + ', pathItem=' + this.m2c_1 + ', method=' + this.n2c_1 + ', operation=' + this.o2c_1 + ', statusCode=' + new StatusCode(this.p2c_1) + ', response=' + this.q2c_1 + ', type=' + this.r2c_1 + ')';
2092
2164
  };
2093
2165
  protoOf(FlattenResponse).hashCode = function () {
2094
- var result = Path__hashCode_impl_go73kd(this.n2c_1);
2166
+ var result = Path__hashCode_impl_go73kd(this.l2c_1);
2167
+ result = imul(result, 31) + this.m2c_1.hashCode() | 0;
2168
+ result = imul(result, 31) + this.n2c_1.hashCode() | 0;
2095
2169
  result = imul(result, 31) + this.o2c_1.hashCode() | 0;
2096
- result = imul(result, 31) + this.p2c_1.hashCode() | 0;
2097
- result = imul(result, 31) + this.q2c_1.hashCode() | 0;
2098
- result = imul(result, 31) + StatusCode__hashCode_impl_fevhvx(this.r2c_1) | 0;
2099
- result = imul(result, 31) + hashCode(this.s2c_1) | 0;
2100
- result = imul(result, 31) + getStringHashCode(this.t2c_1) | 0;
2170
+ result = imul(result, 31) + StatusCode__hashCode_impl_fevhvx(this.p2c_1) | 0;
2171
+ result = imul(result, 31) + hashCode(this.q2c_1) | 0;
2172
+ result = imul(result, 31) + getStringHashCode(this.r2c_1) | 0;
2101
2173
  return result;
2102
2174
  };
2103
2175
  protoOf(FlattenResponse).equals = function (other) {
@@ -2106,19 +2178,19 @@
2106
2178
  if (!(other instanceof FlattenResponse))
2107
2179
  return false;
2108
2180
  var tmp0_other_with_cast = other instanceof FlattenResponse ? other : THROW_CCE();
2109
- if (!(this.n2c_1 === tmp0_other_with_cast.n2c_1))
2181
+ if (!(this.l2c_1 === tmp0_other_with_cast.l2c_1))
2110
2182
  return false;
2111
- if (!this.o2c_1.equals(tmp0_other_with_cast.o2c_1))
2183
+ if (!this.m2c_1.equals(tmp0_other_with_cast.m2c_1))
2112
2184
  return false;
2113
- if (!this.p2c_1.equals(tmp0_other_with_cast.p2c_1))
2185
+ if (!this.n2c_1.equals(tmp0_other_with_cast.n2c_1))
2114
2186
  return false;
2115
- if (!this.q2c_1.equals(tmp0_other_with_cast.q2c_1))
2187
+ if (!this.o2c_1.equals(tmp0_other_with_cast.o2c_1))
2116
2188
  return false;
2117
- if (!(this.r2c_1 === tmp0_other_with_cast.r2c_1))
2189
+ if (!(this.p2c_1 === tmp0_other_with_cast.p2c_1))
2118
2190
  return false;
2119
- if (!equals(this.s2c_1, tmp0_other_with_cast.s2c_1))
2191
+ if (!equals(this.q2c_1, tmp0_other_with_cast.q2c_1))
2120
2192
  return false;
2121
- if (!(this.t2c_1 === tmp0_other_with_cast.t2c_1))
2193
+ if (!(this.r2c_1 === tmp0_other_with_cast.r2c_1))
2122
2194
  return false;
2123
2195
  return true;
2124
2196
  };
@@ -2139,7 +2211,7 @@
2139
2211
  var pathItem = element.p2();
2140
2212
  // Inline function 'kotlin.collections.flatMap' call
2141
2213
  // Inline function 'kotlin.collections.flatMapTo' call
2142
- var this_1 = toOperationList(pathItem, $this);
2214
+ var this_1 = toOperationList(pathItem, OpenApiV2Parser_instance);
2143
2215
  var destination_0 = ArrayList_init_$Create$();
2144
2216
  // Inline function 'kotlin.collections.iterator' call
2145
2217
  var tmp0_iterator_0 = this_1.n2().v();
@@ -2192,17 +2264,23 @@
2192
2264
  var tmp0_iterator_3 = destination.v();
2193
2265
  while (tmp0_iterator_3.w()) {
2194
2266
  var element_2 = tmp0_iterator_3.y();
2195
- // Inline function 'community.flock.wirespec.openapi.v2.OpenApiV2Parser.flatMapResponses.<anonymous>' call
2196
2267
  var list_2 = f(element_2);
2197
2268
  addAll(destination_3, list_2);
2198
2269
  }
2199
2270
  return destination_3;
2200
2271
  }
2201
- function OpenApiV2Parser$parseParameters$lambda(this$0) {
2202
- return function (req) {
2203
- var parameters = plus(resolveParameters_0(req.j2c_1, this$0), resolveParameters(req.l2c_1, this$0));
2204
- var tmp0_elvis_lhs = toName(req.l2c_1, this$0);
2205
- var name = tmp0_elvis_lhs == null ? toName_0(req.i2c_1, this$0) + req.k2c_1.f9_1 : tmp0_elvis_lhs;
2272
+ function OpenApiV2Parser$parse$lambda($ignoreUnknown) {
2273
+ return function ($this$Json) {
2274
+ $this$Json.f15_1 = true;
2275
+ $this$Json.c15_1 = $ignoreUnknown;
2276
+ return Unit_instance;
2277
+ };
2278
+ }
2279
+ function OpenApiV2Parser$parseParameters$lambda($this_parseParameters) {
2280
+ return function ($this$flatMapRequests) {
2281
+ var parameters = plus(resolveParameters_0($this_parseParameters, OpenApiV2Parser_instance, $this$flatMapRequests.h2c_1), resolveParameters($this_parseParameters, OpenApiV2Parser_instance, $this$flatMapRequests.j2c_1));
2282
+ var tmp0_elvis_lhs = toName($this$flatMapRequests.j2c_1, OpenApiV2Parser_instance);
2283
+ var name = tmp0_elvis_lhs == null ? toName_0($this$flatMapRequests.g2c_1, OpenApiV2Parser_instance) + $this$flatMapRequests.i2c_1.f9_1 : tmp0_elvis_lhs;
2206
2284
  // Inline function 'kotlin.collections.flatMap' call
2207
2285
  // Inline function 'kotlin.collections.filter' call
2208
2286
  // Inline function 'kotlin.collections.filterTo' call
@@ -2222,18 +2300,27 @@
2222
2300
  var element_0 = tmp0_iterator_0.y();
2223
2301
  // Inline function 'community.flock.wirespec.openapi.v2.OpenApiV2Parser.parseParameters.<anonymous>.<anonymous>' call
2224
2302
  var tmp0_safe_receiver = element_0.x1g_1;
2225
- var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : flatten_0(tmp0_safe_receiver, this$0, Common_instance.d2c([name, 'Parameter', element_0.t1g_1]));
2303
+ var tmp;
2304
+ if (tmp0_safe_receiver == null) {
2305
+ tmp = null;
2306
+ } else {
2307
+ // Inline function 'kotlin.let' call
2308
+ // Inline function 'kotlin.contracts.contract' call
2309
+ // Inline function 'community.flock.wirespec.openapi.v2.OpenApiV2Parser.parseParameters.<anonymous>.<anonymous>.<anonymous>' call
2310
+ tmp = flatten_0($this_parseParameters, OpenApiV2Parser_instance, tmp0_safe_receiver, Common_instance.e2c([name, 'Parameter', element_0.t1g_1]));
2311
+ }
2312
+ var tmp1_elvis_lhs = tmp;
2226
2313
  var list = tmp1_elvis_lhs == null ? emptyList() : tmp1_elvis_lhs;
2227
2314
  addAll(destination_0, list);
2228
2315
  }
2229
2316
  return destination_0;
2230
2317
  };
2231
2318
  }
2232
- function OpenApiV2Parser$parseRequestBody$lambda(this$0) {
2233
- return function (req) {
2234
- var parameters = plus(resolveParameters_0(req.j2c_1, this$0), resolveParameters(req.l2c_1, this$0));
2235
- var tmp0_elvis_lhs = toName(req.l2c_1, this$0);
2236
- var name = tmp0_elvis_lhs == null ? toName_0(req.i2c_1, this$0) + req.k2c_1.f9_1 : tmp0_elvis_lhs;
2319
+ function OpenApiV2Parser$parseRequestBody$lambda($this_parseRequestBody) {
2320
+ return function ($this$flatMapRequests) {
2321
+ var parameters = plus(resolveParameters_0($this_parseRequestBody, OpenApiV2Parser_instance, $this$flatMapRequests.h2c_1), resolveParameters($this_parseRequestBody, OpenApiV2Parser_instance, $this$flatMapRequests.j2c_1));
2322
+ var tmp0_elvis_lhs = toName($this$flatMapRequests.j2c_1, OpenApiV2Parser_instance);
2323
+ var name = tmp0_elvis_lhs == null ? toName_0($this$flatMapRequests.g2c_1, OpenApiV2Parser_instance) + $this$flatMapRequests.i2c_1.f9_1 : tmp0_elvis_lhs;
2237
2324
  // Inline function 'kotlin.collections.flatMap' call
2238
2325
  // Inline function 'kotlin.collections.flatMapTo' call
2239
2326
  var destination = ArrayList_init_$Create$();
@@ -2243,7 +2330,7 @@
2243
2330
  // Inline function 'community.flock.wirespec.openapi.v2.OpenApiV2Parser.parseRequestBody.<anonymous>.<anonymous>' call
2244
2331
  var tmp;
2245
2332
  if (!(element.o1h_1 == null)) {
2246
- var tmp_0 = Companion_instance.w28(Common_instance.d2c([name, 'Parameter', element.t1g_1]));
2333
+ var tmp_0 = Companion_instance.w28(Common_instance.e2c([name, 'Parameter', element.t1g_1]));
2247
2334
  // Inline function 'kotlin.collections.map' call
2248
2335
  var this_0 = ensureNotNull(element.o1h_1);
2249
2336
  // Inline function 'kotlin.collections.mapTo' call
@@ -2263,7 +2350,7 @@
2263
2350
  addAll(destination, list);
2264
2351
  }
2265
2352
  var enums = destination;
2266
- var tmp1_safe_receiver = req.l2c_1.q1j_1;
2353
+ var tmp1_safe_receiver = $this$flatMapRequests.j2c_1.q1j_1;
2267
2354
  var tmp_1;
2268
2355
  if (tmp1_safe_receiver == null) {
2269
2356
  tmp_1 = null;
@@ -2275,7 +2362,7 @@
2275
2362
  while (tmp0_iterator_1.w()) {
2276
2363
  var item_0 = tmp0_iterator_1.y();
2277
2364
  // Inline function 'community.flock.wirespec.openapi.v2.OpenApiV2Parser.parseRequestBody.<anonymous>.<anonymous>' call
2278
- var tmp$ret$6 = resolve_3(item_0, this$0);
2365
+ var tmp$ret$6 = resolve_3($this_parseRequestBody, OpenApiV2Parser_instance, item_0);
2279
2366
  destination_1.s(tmp$ret$6);
2280
2367
  }
2281
2368
  tmp_1 = destination_1;
@@ -2318,13 +2405,23 @@
2318
2405
  switch (tmp0_subject == null ? -1 : tmp0_subject.g9_1) {
2319
2406
  case -1:
2320
2407
  case 5:
2321
- tmp_5 = flatten(schema, this$0, Common_instance.d2c([name, 'RequestBody']));
2408
+ tmp_5 = flatten($this_parseRequestBody, OpenApiV2Parser_instance, schema, Common_instance.e2c([name, 'RequestBody']));
2322
2409
  break;
2323
2410
  case 4:
2324
2411
  // Inline function 'kotlin.collections.orEmpty' call
2325
2412
 
2326
2413
  var tmp1_safe_receiver_0 = schema.o1l_1;
2327
- var tmp0_elvis_lhs_0 = tmp1_safe_receiver_0 == null ? null : flatten_0(tmp1_safe_receiver_0, this$0, Common_instance.d2c([name, 'RequestBody']));
2414
+ var tmp_6;
2415
+ if (tmp1_safe_receiver_0 == null) {
2416
+ tmp_6 = null;
2417
+ } else {
2418
+ // Inline function 'kotlin.let' call
2419
+ // Inline function 'kotlin.contracts.contract' call
2420
+ // Inline function 'community.flock.wirespec.openapi.v2.OpenApiV2Parser.parseRequestBody.<anonymous>.<anonymous>.<anonymous>' call
2421
+ tmp_6 = flatten_0($this_parseRequestBody, OpenApiV2Parser_instance, tmp1_safe_receiver_0, Common_instance.e2c([name, 'RequestBody']));
2422
+ }
2423
+
2424
+ var tmp0_elvis_lhs_0 = tmp_6;
2328
2425
  tmp_5 = tmp0_elvis_lhs_0 == null ? emptyList() : tmp0_elvis_lhs_0;
2329
2426
  break;
2330
2427
  default:
@@ -2345,26 +2442,35 @@
2345
2442
  return plus(enums, types);
2346
2443
  };
2347
2444
  }
2348
- function OpenApiV2Parser$parseResponseBody$lambda(this$0) {
2349
- return function (res) {
2350
- var response = resolve_1(res.s2c_1, this$0);
2351
- var tmp0_elvis_lhs = toName(res.q2c_1, this$0);
2352
- var name = tmp0_elvis_lhs == null ? toName_0(res.n2c_1, this$0) + res.p2c_1.f9_1 : tmp0_elvis_lhs;
2353
- var schema = response.v1h_1;
2445
+ function OpenApiV2Parser$parseResponseBody$lambda($this_parseResponseBody) {
2446
+ return function ($this$flatMapResponses) {
2447
+ var schema = resolve_1($this_parseResponseBody, OpenApiV2Parser_instance, $this$flatMapResponses.q2c_1).v1h_1;
2448
+ var tmp0_elvis_lhs = toName($this$flatMapResponses.o2c_1, OpenApiV2Parser_instance);
2449
+ var name = tmp0_elvis_lhs == null ? toName_0($this$flatMapResponses.l2c_1, OpenApiV2Parser_instance) + $this$flatMapResponses.n2c_1.f9_1 : tmp0_elvis_lhs;
2354
2450
  var tmp;
2355
2451
  if (schema instanceof SchemaObject) {
2356
- var tmp1_subject = schema.n1l_1;
2452
+ var tmp2_subject = schema.n1l_1;
2357
2453
  var tmp_0;
2358
- switch (tmp1_subject == null ? -1 : tmp1_subject.g9_1) {
2454
+ switch (tmp2_subject == null ? -1 : tmp2_subject.g9_1) {
2359
2455
  case -1:
2360
2456
  case 5:
2361
- tmp_0 = flatten(schema, this$0, Common_instance.d2c([name, _StatusCode___get_value__impl__we50mu(res.r2c_1), res.t2c_1, 'ResponseBody']));
2457
+ tmp_0 = flatten($this_parseResponseBody, OpenApiV2Parser_instance, schema, Common_instance.e2c([name, _StatusCode___get_value__impl__we50mu($this$flatMapResponses.p2c_1), $this$flatMapResponses.r2c_1, 'ResponseBody']));
2362
2458
  break;
2363
2459
  case 4:
2364
2460
  // Inline function 'kotlin.collections.orEmpty' call
2365
2461
 
2366
- var tmp2_safe_receiver = schema.o1l_1;
2367
- var tmp0_elvis_lhs_0 = tmp2_safe_receiver == null ? null : flatten_0(tmp2_safe_receiver, this$0, Common_instance.d2c([name, _StatusCode___get_value__impl__we50mu(res.r2c_1), res.t2c_1, 'ResponseBody']));
2462
+ var tmp3_safe_receiver = schema.o1l_1;
2463
+ var tmp_1;
2464
+ if (tmp3_safe_receiver == null) {
2465
+ tmp_1 = null;
2466
+ } else {
2467
+ // Inline function 'kotlin.let' call
2468
+ // Inline function 'kotlin.contracts.contract' call
2469
+ // Inline function 'community.flock.wirespec.openapi.v2.OpenApiV2Parser.parseResponseBody.<anonymous>.<anonymous>' call
2470
+ tmp_1 = flatten_0($this_parseResponseBody, OpenApiV2Parser_instance, tmp3_safe_receiver, Common_instance.e2c([name, _StatusCode___get_value__impl__we50mu($this$flatMapResponses.p2c_1), $this$flatMapResponses.r2c_1, 'ResponseBody']));
2471
+ }
2472
+
2473
+ var tmp0_elvis_lhs_0 = tmp_1;
2368
2474
  tmp_0 = tmp0_elvis_lhs_0 == null ? emptyList() : tmp0_elvis_lhs_0;
2369
2475
  break;
2370
2476
  default:
@@ -2378,36 +2484,52 @@
2378
2484
  return tmp;
2379
2485
  };
2380
2486
  }
2381
- function OpenApiV2Parser$toName$lambda(this$0) {
2382
- return function (it) {
2383
- var tmp;
2384
- switch (isParam(it, this$0)) {
2385
- case true:
2386
- var tmp_0 = Common_instance;
2387
- // Inline function 'kotlin.text.substring' call
2487
+ function OpenApiV2Parser$toName$lambda(it) {
2488
+ var tmp;
2489
+ switch (isParam(it, OpenApiV2Parser_instance)) {
2490
+ case true:
2491
+ var tmp_0 = Common_instance;
2492
+ // Inline function 'kotlin.text.substring' call
2388
2493
 
2389
- var endIndex = it.length - 1 | 0;
2390
- // Inline function 'kotlin.js.asDynamic' call
2494
+ var endIndex = it.length - 1 | 0;
2495
+ // Inline function 'kotlin.js.asDynamic' call
2391
2496
 
2392
- var tmp$ret$1 = it.substring(1, endIndex);
2393
- tmp = tmp_0.d2c([tmp$ret$1]);
2394
- break;
2395
- case false:
2396
- tmp = Common_instance.d2c([it]);
2397
- break;
2398
- default:
2399
- noWhenBranchMatchedException();
2400
- break;
2401
- }
2402
- return tmp;
2403
- };
2497
+ var tmp$ret$1 = it.substring(1, endIndex);
2498
+ tmp = tmp_0.e2c([tmp$ret$1]);
2499
+ break;
2500
+ case false:
2501
+ tmp = Common_instance.e2c([it]);
2502
+ break;
2503
+ default:
2504
+ noWhenBranchMatchedException();
2505
+ break;
2506
+ }
2507
+ return tmp;
2404
2508
  }
2405
- function OpenApiV2Parser(openApi) {
2406
- this.f2c_1 = openApi;
2509
+ function OpenApiV2Parser() {
2407
2510
  }
2408
- protoOf(OpenApiV2Parser).g2c = function () {
2409
- return plus(plus(plus(plus(parseEndpoints(this), parseParameters(this)), parseRequestBody(this)), parseResponseBody(this)), parseDefinitions(this));
2511
+ protoOf(OpenApiV2Parser).s2c = function (json, ignoreUnknown) {
2512
+ return this.t2c((new OpenAPI(Json(VOID, OpenApiV2Parser$parse$lambda(ignoreUnknown)))).r1e(json));
2513
+ };
2514
+ protoOf(OpenApiV2Parser).u2c = function (json, ignoreUnknown, $super) {
2515
+ ignoreUnknown = ignoreUnknown === VOID ? false : ignoreUnknown;
2516
+ return $super === VOID ? this.s2c(json, ignoreUnknown) : $super.s2c.call(this, json, ignoreUnknown);
2517
+ };
2518
+ protoOf(OpenApiV2Parser).t2c = function (_this__u8e3s4) {
2519
+ // Inline function 'kotlin.collections.reduce' call
2520
+ var iterator = listOf_0([parseEndpoints(_this__u8e3s4, this), parseParameters(_this__u8e3s4, this), parseRequestBody(_this__u8e3s4, this), parseResponseBody(_this__u8e3s4, this), parseDefinitions(_this__u8e3s4, this)]).v();
2521
+ if (!iterator.w())
2522
+ throw UnsupportedOperationException_init_$Create$("Empty collection can't be reduced.");
2523
+ var accumulator = iterator.y();
2524
+ while (iterator.w()) {
2525
+ accumulator = plus(accumulator, iterator.y());
2526
+ }
2527
+ return accumulator;
2410
2528
  };
2529
+ var OpenApiV2Parser_instance;
2530
+ function OpenApiV2Parser_getInstance() {
2531
+ return OpenApiV2Parser_instance;
2532
+ }
2411
2533
  function toMap_0(_this__u8e3s4) {
2412
2534
  var tmp;
2413
2535
  if (_this__u8e3s4 instanceof Custom) {
@@ -2483,41 +2605,6 @@
2483
2605
  }
2484
2606
  return tmp;
2485
2607
  }
2486
- function filterNotNullValues(_this__u8e3s4) {
2487
- // Inline function 'kotlin.collections.mapNotNull' call
2488
- // Inline function 'kotlin.collections.mapNotNullTo' call
2489
- var destination = ArrayList_init_$Create$();
2490
- // Inline function 'kotlin.collections.forEach' call
2491
- // Inline function 'kotlin.collections.iterator' call
2492
- var tmp0_iterator = _this__u8e3s4.n2().v();
2493
- while (tmp0_iterator.w()) {
2494
- var element = tmp0_iterator.y();
2495
- // Inline function 'kotlin.collections.mapNotNullTo.<anonymous>' call
2496
- // Inline function 'community.flock.wirespec.openapi.v2.filterNotNullValues.<anonymous>' call
2497
- // Inline function 'kotlin.collections.component1' call
2498
- var key = element.o2();
2499
- // Inline function 'kotlin.collections.component2' call
2500
- var value = element.p2();
2501
- var tmp;
2502
- if (value == null) {
2503
- tmp = null;
2504
- } else {
2505
- // Inline function 'kotlin.let' call
2506
- // Inline function 'kotlin.contracts.contract' call
2507
- // Inline function 'community.flock.wirespec.openapi.v2.filterNotNullValues.<anonymous>.<anonymous>' call
2508
- tmp = to(key, value);
2509
- }
2510
- var tmp0_safe_receiver = tmp;
2511
- if (tmp0_safe_receiver == null)
2512
- null;
2513
- else {
2514
- // Inline function 'kotlin.let' call
2515
- // Inline function 'kotlin.contracts.contract' call
2516
- destination.s(tmp0_safe_receiver);
2517
- }
2518
- }
2519
- return toMap(destination);
2520
- }
2521
2608
  function emitComponents(_this__u8e3s4, $this) {
2522
2609
  // Inline function 'kotlin.let' call
2523
2610
  // Inline function 'kotlin.collections.associate' call
@@ -2553,16 +2640,16 @@
2553
2640
  var tmp = element_1.a22().q27_1;
2554
2641
  var tmp_0;
2555
2642
  if (element_1 instanceof Enum) {
2556
- tmp_0 = emit_3(element_1, $this);
2643
+ tmp_0 = emit_3(element_1, OpenApiV3Emitter_instance);
2557
2644
  } else {
2558
2645
  if (element_1 instanceof Refined) {
2559
- tmp_0 = emit_1(element_1, $this);
2646
+ tmp_0 = emit_1(element_1, OpenApiV3Emitter_instance);
2560
2647
  } else {
2561
2648
  if (element_1 instanceof Type) {
2562
- tmp_0 = emit_2(element_1, $this);
2649
+ tmp_0 = emit_2(element_1, OpenApiV3Emitter_instance);
2563
2650
  } else {
2564
2651
  if (element_1 instanceof Union) {
2565
- tmp_0 = emit_4(element_1, $this);
2652
+ tmp_0 = emit_4(element_1, OpenApiV3Emitter_instance);
2566
2653
  } else {
2567
2654
  if (element_1 instanceof Endpoint) {
2568
2655
  var message = 'Cannot emit endpoint';
@@ -2626,7 +2713,7 @@
2626
2713
  var path = item.o2();
2627
2714
  // Inline function 'kotlin.collections.component2' call
2628
2715
  var endpoints = item.p2();
2629
- var tmp_0 = _Path___init__impl__6uf4pw_0(emitSegment_0(path, $this));
2716
+ var tmp_0 = _Path___init__impl__6uf4pw_0(emitSegment_0(path, OpenApiV3Emitter_instance));
2630
2717
  // Inline function 'kotlin.collections.ifEmpty' call
2631
2718
  // Inline function 'kotlin.collections.map' call
2632
2719
  // Inline function 'kotlin.collections.filterIsInstance' call
@@ -2645,7 +2732,7 @@
2645
2732
  while (tmp0_iterator_3.w()) {
2646
2733
  var item_0 = tmp0_iterator_3.y();
2647
2734
  // Inline function 'community.flock.wirespec.openapi.v3.OpenApiV3Emitter.emitPaths.<anonymous>.<anonymous>' call
2648
- var tmp$ret$12 = emitParameter_1(item_0, $this);
2735
+ var tmp$ret$12 = emitParameter_1(item_0, OpenApiV3Emitter_instance);
2649
2736
  destination_3.s(tmp$ret$12);
2650
2737
  }
2651
2738
  var tmp_1;
@@ -2656,14 +2743,14 @@
2656
2743
  tmp_1 = destination_3;
2657
2744
  }
2658
2745
  var tmp0_parameters = tmp_1;
2659
- var tmp1_get = emit_5(endpoints, $this, Method_GET_getInstance());
2660
- var tmp2_post = emit_5(endpoints, $this, Method_POST_getInstance());
2661
- var tmp3_put = emit_5(endpoints, $this, Method_PUT_getInstance());
2662
- var tmp4_delete = emit_5(endpoints, $this, Method_DELETE_getInstance());
2663
- var tmp5_patch = emit_5(endpoints, $this, Method_PATCH_getInstance());
2664
- var tmp6_options = emit_5(endpoints, $this, Method_OPTIONS_getInstance());
2665
- var tmp7_trace = emit_5(endpoints, $this, Method_TRACE_getInstance());
2666
- var tmp8_head = emit_5(endpoints, $this, Method_HEAD_getInstance());
2746
+ var tmp1_get = emit_5(endpoints, OpenApiV3Emitter_instance, Method_GET_getInstance());
2747
+ var tmp2_post = emit_5(endpoints, OpenApiV3Emitter_instance, Method_POST_getInstance());
2748
+ var tmp3_put = emit_5(endpoints, OpenApiV3Emitter_instance, Method_PUT_getInstance());
2749
+ var tmp4_delete = emit_5(endpoints, OpenApiV3Emitter_instance, Method_DELETE_getInstance());
2750
+ var tmp5_patch = emit_5(endpoints, OpenApiV3Emitter_instance, Method_PATCH_getInstance());
2751
+ var tmp6_options = emit_5(endpoints, OpenApiV3Emitter_instance, Method_OPTIONS_getInstance());
2752
+ var tmp7_trace = emit_5(endpoints, OpenApiV3Emitter_instance, Method_TRACE_getInstance());
2753
+ var tmp8_head = emit_5(endpoints, OpenApiV3Emitter_instance, Method_HEAD_getInstance());
2667
2754
  var tmp$ret$17 = to(new Path_0(tmp_0), new PathItemObject_0(VOID, VOID, VOID, tmp1_get, tmp3_put, tmp2_post, tmp4_delete, tmp6_options, tmp8_head, tmp5_patch, tmp7_trace, VOID, tmp0_parameters));
2668
2755
  destination_1.s(tmp$ret$17);
2669
2756
  }
@@ -2683,7 +2770,7 @@
2683
2770
  var element = tmp0_iterator.y();
2684
2771
  // Inline function 'kotlin.collections.plusAssign' call
2685
2772
  // Inline function 'community.flock.wirespec.openapi.v3.OpenApiV3Emitter.emit.<anonymous>' call
2686
- var pair = emitSchema(element, $this);
2773
+ var pair = emitSchema(element, OpenApiV3Emitter_instance);
2687
2774
  destination.l2(pair.vd_1, pair.wd_1);
2688
2775
  }
2689
2776
  var tmp = destination;
@@ -2747,7 +2834,7 @@
2747
2834
  while (tmp0_iterator.w()) {
2748
2835
  var item = tmp0_iterator.y();
2749
2836
  // Inline function 'community.flock.wirespec.openapi.v3.OpenApiV3Emitter.emit.<anonymous>' call
2750
- var tmp$ret$0 = emitSchema_0(item, $this);
2837
+ var tmp$ret$0 = emitSchema_0(item, OpenApiV3Emitter_instance);
2751
2838
  destination.s(tmp$ret$0);
2752
2839
  }
2753
2840
  return new SchemaObject_0(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp, VOID, destination);
@@ -2771,7 +2858,7 @@
2771
2858
  while (tmp0_iterator_0.w()) {
2772
2859
  var item = tmp0_iterator_0.y();
2773
2860
  // Inline function 'community.flock.wirespec.openapi.v3.OpenApiV3Emitter.emit.<anonymous>' call
2774
- var tmp$ret$3 = emit_6(item, $this);
2861
+ var tmp$ret$3 = emit_6(item, OpenApiV3Emitter_instance);
2775
2862
  destination_0.s(tmp$ret$3);
2776
2863
  }
2777
2864
  return firstOrNull(destination_0);
@@ -2795,7 +2882,7 @@
2795
2882
  while (tmp0_iterator_0.w()) {
2796
2883
  var item = tmp0_iterator_0.y();
2797
2884
  // Inline function 'community.flock.wirespec.openapi.v3.OpenApiV3Emitter.emit.<anonymous>' call
2798
- var tmp$ret$2 = emitParameter_1(item, $this);
2885
+ var tmp$ret$2 = emitParameter_1(item, OpenApiV3Emitter_instance);
2799
2886
  destination_0.s(tmp$ret$2);
2800
2887
  }
2801
2888
  var tmp = destination_0;
@@ -2807,7 +2894,7 @@
2807
2894
  while (tmp0_iterator_1.w()) {
2808
2895
  var item_0 = tmp0_iterator_1.y();
2809
2896
  // Inline function 'community.flock.wirespec.openapi.v3.OpenApiV3Emitter.emit.<anonymous>' call
2810
- var tmp$ret$5 = emitParameter_0(item_0, $this, ParameterLocation_QUERY_getInstance_0());
2897
+ var tmp$ret$5 = emitParameter_0(item_0, OpenApiV3Emitter_instance, ParameterLocation_QUERY_getInstance_0());
2811
2898
  destination_1.s(tmp$ret$5);
2812
2899
  }
2813
2900
  var tmp_0 = plus(tmp, destination_1);
@@ -2819,7 +2906,7 @@
2819
2906
  while (tmp0_iterator_2.w()) {
2820
2907
  var item_1 = tmp0_iterator_2.y();
2821
2908
  // Inline function 'community.flock.wirespec.openapi.v3.OpenApiV3Emitter.emit.<anonymous>' call
2822
- var tmp$ret$8 = emitParameter_0(item_1, $this, ParameterLocation_HEADER_getInstance_0());
2909
+ var tmp$ret$8 = emitParameter_0(item_1, OpenApiV3Emitter_instance, ParameterLocation_HEADER_getInstance_0());
2823
2910
  destination_2.s(tmp$ret$8);
2824
2911
  }
2825
2912
  var tmp_1 = plus(tmp_0, destination_2);
@@ -2835,7 +2922,7 @@
2835
2922
  // Inline function 'kotlin.collections.mapNotNullTo.<anonymous>' call
2836
2923
  // Inline function 'community.flock.wirespec.openapi.v3.OpenApiV3Emitter.emit.<anonymous>' call
2837
2924
  var tmp0_safe_receiver = element_0.g28_1;
2838
- var tmp0_safe_receiver_0 = tmp0_safe_receiver == null ? null : emit_7(tmp0_safe_receiver, $this);
2925
+ var tmp0_safe_receiver_0 = tmp0_safe_receiver == null ? null : emit_7(tmp0_safe_receiver, OpenApiV3Emitter_instance);
2839
2926
  if (tmp0_safe_receiver_0 == null)
2840
2927
  null;
2841
2928
  else {
@@ -2936,7 +3023,7 @@
2936
3023
  var element_4 = tmp0_iterator_8.y();
2937
3024
  // Inline function 'kotlin.collections.plusAssign' call
2938
3025
  // Inline function 'community.flock.wirespec.openapi.v3.OpenApiV3Emitter.emit.<anonymous>.<anonymous>' call
2939
- var pair = emitHeader(element_4, $this);
3026
+ var pair = emitHeader(element_4, OpenApiV3Emitter_instance);
2940
3027
  destination_7.l2(pair.vd_1, pair.wd_1);
2941
3028
  }
2942
3029
  var tmp1_description = '' + _this__u8e3s4.o28_1 + ' ' + statusCode + ' response';
@@ -2968,7 +3055,7 @@
2968
3055
  var element_6 = tmp0_iterator_10.y();
2969
3056
  // Inline function 'kotlin.collections.plusAssign' call
2970
3057
  // Inline function 'community.flock.wirespec.openapi.v3.OpenApiV3Emitter.emit.<anonymous>.<anonymous>' call
2971
- var pair_0 = emit_7(element_6, $this);
3058
+ var pair_0 = emit_7(element_6, OpenApiV3Emitter_instance);
2972
3059
  destination_9.l2(pair_0.vd_1, pair_0.wd_1);
2973
3060
  }
2974
3061
  var tmp_8;
@@ -3028,6 +3115,7 @@
3028
3115
  return tmp;
3029
3116
  }
3030
3117
  function emitSchema_0(_this__u8e3s4, $this) {
3118
+ // Inline function 'kotlin.let' call
3031
3119
  var tmp;
3032
3120
  if (_this__u8e3s4 instanceof Custom) {
3033
3121
  tmp = new ReferenceObject_0(_Ref___init__impl__7qfl46_0('#/components/schemas/' + _this__u8e3s4.p2()));
@@ -3048,14 +3136,10 @@
3048
3136
  }
3049
3137
  }
3050
3138
  }
3051
- var ref = tmp;
3052
- if (_this__u8e3s4.y28()) {
3053
- return new SchemaObject_0(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, Type_OBJECT_getInstance_0(), VOID, VOID, VOID, VOID, VOID, VOID, ref);
3054
- }
3055
- if (_this__u8e3s4.g21()) {
3056
- return new SchemaObject_0(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, Type_ARRAY_getInstance_0(), VOID, VOID, VOID, VOID, ref);
3057
- }
3058
- return ref;
3139
+ // Inline function 'kotlin.contracts.contract' call
3140
+ // Inline function 'community.flock.wirespec.openapi.v3.OpenApiV3Emitter.emitSchema.<anonymous>' call
3141
+ var it = tmp;
3142
+ return _this__u8e3s4.y28() ? new SchemaObject_0(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, Type_OBJECT_getInstance_0(), VOID, VOID, VOID, VOID, VOID, VOID, it) : _this__u8e3s4.g21() ? new SchemaObject_0(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, Type_ARRAY_getInstance_0(), VOID, VOID, VOID, VOID, it) : it;
3059
3143
  }
3060
3144
  function emitType_1(_this__u8e3s4, $this) {
3061
3145
  var tmp;
@@ -3096,47 +3180,24 @@
3096
3180
  }
3097
3181
  function OpenApiV3Emitter() {
3098
3182
  }
3099
- protoOf(OpenApiV3Emitter).u2c = function (ast, options) {
3100
- var tmp1_elvis_lhs = options == null ? null : options.v2c_1;
3183
+ protoOf(OpenApiV3Emitter).v2c = function (ast, options) {
3184
+ var tmp1_elvis_lhs = options == null ? null : options.w2c_1;
3101
3185
  var tmp = tmp1_elvis_lhs == null ? 'Wirespec' : tmp1_elvis_lhs;
3102
- var tmp3_elvis_lhs = options == null ? null : options.w2c_1;
3186
+ var tmp3_elvis_lhs = options == null ? null : options.x2c_1;
3103
3187
  return new OpenAPIObject('3.0.0', new InfoObject_0(tmp, VOID, VOID, VOID, VOID, tmp3_elvis_lhs == null ? '0.0.0' : tmp3_elvis_lhs), VOID, emitPaths(ast, this), emitComponents(ast, this));
3104
3188
  };
3105
- protoOf(OpenApiV3Emitter).x2c = function (ast, options, $super) {
3189
+ protoOf(OpenApiV3Emitter).y2c = function (ast, options, $super) {
3106
3190
  options = options === VOID ? null : options;
3107
- return $super === VOID ? this.u2c(ast, options) : $super.u2c.call(this, ast, options);
3108
- };
3109
- function OpenApiV3Parser$Companion$parse$lambda($strict) {
3110
- return function ($this$Json) {
3111
- $this$Json.f15_1 = true;
3112
- $this$Json.c15_1 = $strict;
3113
- return Unit_instance;
3114
- };
3115
- }
3116
- function Companion_0() {
3117
- }
3118
- protoOf(Companion_0).e2c = function (json, strict) {
3119
- // Inline function 'kotlin.let' call
3120
- // Inline function 'kotlin.contracts.contract' call
3121
- // Inline function 'community.flock.wirespec.openapi.v3.Companion.parse.<anonymous>' call
3122
- var it = (new OpenAPI_0(Json(VOID, OpenApiV3Parser$Companion$parse$lambda(strict)))).r1e(json);
3123
- return parse(new OpenApiV3Parser(it));
3124
- };
3125
- protoOf(Companion_0).y2c = function (json, strict, $super) {
3126
- strict = strict === VOID ? false : strict;
3127
- return $super === VOID ? this.e2c(json, strict) : $super.e2c.call(this, json, strict);
3191
+ return $super === VOID ? this.v2c(ast, options) : $super.v2c.call(this, ast, options);
3128
3192
  };
3129
- var Companion_instance_1;
3130
- function Companion_getInstance_1() {
3131
- return Companion_instance_1;
3193
+ var OpenApiV3Emitter_instance;
3194
+ function OpenApiV3Emitter_getInstance() {
3195
+ return OpenApiV3Emitter_instance;
3132
3196
  }
3133
- function parse($this) {
3134
- return plus(plus(plus(plus(parseEndpoint($this), parseParameters_0($this)), parseRequestBody_0($this)), parseResponseBody_0($this)), parseComponents($this));
3135
- }
3136
- function parseEndpoint($this) {
3197
+ function parseEndpoint(_this__u8e3s4, $this) {
3137
3198
  // Inline function 'kotlin.collections.flatMap' call
3138
3199
  // Inline function 'kotlin.collections.flatMapTo' call
3139
- var this_0 = $this.z2c_1.y1o_1;
3200
+ var this_0 = _this__u8e3s4.y1o_1;
3140
3201
  var destination = ArrayList_init_$Create$();
3141
3202
  // Inline function 'kotlin.collections.iterator' call
3142
3203
  var tmp0_iterator = this_0.n2().v();
@@ -3148,7 +3209,7 @@
3148
3209
  // Inline function 'kotlin.collections.component2' call
3149
3210
  var path = element.p2();
3150
3211
  // Inline function 'kotlin.collections.map' call
3151
- var this_1 = toOperationList_0(path, $this);
3212
+ var this_1 = toOperationList_0(path, OpenApiV3Parser_instance);
3152
3213
  // Inline function 'kotlin.collections.mapTo' call
3153
3214
  var destination_0 = ArrayList_init_$Create$_0(this_1.p());
3154
3215
  // Inline function 'kotlin.collections.iterator' call
@@ -3160,10 +3221,10 @@
3160
3221
  var method = item.o2();
3161
3222
  // Inline function 'kotlin.collections.component2' call
3162
3223
  var operation = item.p2();
3163
- var parameters = plus(resolveParameters_2(path, $this), resolveParameters_1(operation, $this));
3164
- var segments = toSegments_0(key, $this, parameters);
3165
- var tmp0_elvis_lhs = toName_1(operation, $this);
3166
- var name = tmp0_elvis_lhs == null ? toName_2(key, $this) + method.f9_1 : tmp0_elvis_lhs;
3224
+ var parameters = plus(resolveParameters_2(_this__u8e3s4, OpenApiV3Parser_instance, path), resolveParameters_1(_this__u8e3s4, OpenApiV3Parser_instance, operation));
3225
+ var segments = toSegments_0(_this__u8e3s4, OpenApiV3Parser_instance, key, parameters);
3226
+ var tmp0_elvis_lhs = toName_1(operation, OpenApiV3Parser_instance);
3227
+ var name = tmp0_elvis_lhs == null ? toName_2(key, OpenApiV3Parser_instance) + method.f9_1 : tmp0_elvis_lhs;
3167
3228
  // Inline function 'kotlin.collections.map' call
3168
3229
  // Inline function 'kotlin.collections.filter' call
3169
3230
  // Inline function 'kotlin.collections.filterTo' call
@@ -3182,7 +3243,7 @@
3182
3243
  while (tmp0_iterator_2.w()) {
3183
3244
  var item_0 = tmp0_iterator_2.y();
3184
3245
  // Inline function 'community.flock.wirespec.openapi.v3.OpenApiV3Parser.parseEndpoint.<anonymous>.<anonymous>.<anonymous>' call
3185
- var tmp$ret$9 = toField_3(item_0, $this, Common_instance.d2c([name, 'Parameter', item_0.f1u_1]));
3246
+ var tmp$ret$9 = toField_3(_this__u8e3s4, OpenApiV3Parser_instance, item_0, Common_instance.e2c([name, 'Parameter', item_0.f1u_1]));
3186
3247
  destination_2.s(tmp$ret$9);
3187
3248
  }
3188
3249
  var query = destination_2;
@@ -3204,7 +3265,7 @@
3204
3265
  while (tmp0_iterator_4.w()) {
3205
3266
  var item_1 = tmp0_iterator_4.y();
3206
3267
  // Inline function 'community.flock.wirespec.openapi.v3.OpenApiV3Parser.parseEndpoint.<anonymous>.<anonymous>.<anonymous>' call
3207
- var tmp$ret$15 = toField_3(item_1, $this, Common_instance.d2c([name, 'Parameter', item_1.f1u_1]));
3268
+ var tmp$ret$15 = toField_3(_this__u8e3s4, OpenApiV3Parser_instance, item_1, Common_instance.e2c([name, 'Parameter', item_1.f1u_1]));
3208
3269
  destination_4.s(tmp$ret$15);
3209
3270
  }
3210
3271
  var headers = destination_4;
@@ -3226,23 +3287,32 @@
3226
3287
  while (tmp0_iterator_6.w()) {
3227
3288
  var item_2 = tmp0_iterator_6.y();
3228
3289
  // Inline function 'community.flock.wirespec.openapi.v3.OpenApiV3Parser.parseEndpoint.<anonymous>.<anonymous>.<anonymous>' call
3229
- var tmp$ret$21 = toField_3(item_2, $this, Common_instance.d2c([name, 'Parameter', item_2.f1u_1]));
3290
+ var tmp$ret$21 = toField_3(_this__u8e3s4, OpenApiV3Parser_instance, item_2, Common_instance.e2c([name, 'Parameter', item_2.f1u_1]));
3230
3291
  destination_6.s(tmp$ret$21);
3231
3292
  }
3232
3293
  var cookies = destination_6;
3233
3294
  var tmp1_safe_receiver = operation.i1s_1;
3234
- var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : resolve_7(tmp1_safe_receiver, $this);
3235
3295
  var tmp;
3236
- if (tmp2_safe_receiver == null) {
3296
+ if (tmp1_safe_receiver == null) {
3237
3297
  tmp = null;
3298
+ } else {
3299
+ // Inline function 'kotlin.let' call
3300
+ // Inline function 'kotlin.contracts.contract' call
3301
+ // Inline function 'community.flock.wirespec.openapi.v3.OpenApiV3Parser.parseEndpoint.<anonymous>.<anonymous>.<anonymous>' call
3302
+ tmp = resolve_7(_this__u8e3s4, OpenApiV3Parser_instance, tmp1_safe_receiver);
3303
+ }
3304
+ var tmp2_safe_receiver = tmp;
3305
+ var tmp_0;
3306
+ if (tmp2_safe_receiver == null) {
3307
+ tmp_0 = null;
3238
3308
  } else {
3239
3309
  // Inline function 'kotlin.let' call
3240
3310
  // Inline function 'kotlin.contracts.contract' call
3241
3311
  // Inline function 'community.flock.wirespec.openapi.v3.OpenApiV3Parser.parseEndpoint.<anonymous>.<anonymous>.<anonymous>' call
3242
3312
  var tmp0_safe_receiver = tmp2_safe_receiver.p1w_1;
3243
- var tmp_0;
3313
+ var tmp_1;
3244
3314
  if (tmp0_safe_receiver == null) {
3245
- tmp_0 = null;
3315
+ tmp_1 = null;
3246
3316
  } else {
3247
3317
  // Inline function 'kotlin.collections.map' call
3248
3318
  // Inline function 'kotlin.collections.mapTo' call
@@ -3256,14 +3326,14 @@
3256
3326
  var mediaType = item_3.o2().e1y_1;
3257
3327
  // Inline function 'kotlin.collections.component2' call
3258
3328
  var mediaObject = item_3.p2();
3259
- var tmp_1 = _MediaType___get_value__impl__wy58mp(mediaType);
3329
+ var tmp_2 = _MediaType___get_value__impl__wy58mp(mediaType);
3260
3330
  var schema = mediaObject.i1y_1;
3261
- var tmp_2;
3331
+ var tmp_3;
3262
3332
  if (schema instanceof ReferenceObject_0) {
3263
- tmp_2 = toReference_1(schema, $this);
3333
+ tmp_3 = toReference_1(_this__u8e3s4, OpenApiV3Parser_instance, schema);
3264
3334
  } else {
3265
3335
  if (schema instanceof SchemaObject_0) {
3266
- tmp_2 = toReference_2(schema, $this, Common_instance.d2c([name, 'RequestBody']));
3336
+ tmp_3 = toReference_2(_this__u8e3s4, OpenApiV3Parser_instance, schema, Common_instance.e2c([name, 'RequestBody']));
3267
3337
  } else {
3268
3338
  if (schema == null) {
3269
3339
  var reason = 'Not yet implemented';
@@ -3273,16 +3343,16 @@
3273
3343
  }
3274
3344
  }
3275
3345
  }
3276
- var tmp_3 = tmp_2;
3346
+ var tmp_4 = tmp_3;
3277
3347
  var tmp0_elvis_lhs_0 = tmp2_safe_receiver.q1w_1;
3278
- var tmp$ret$27 = new Request(new Content(tmp_1, tmp_3, !(tmp0_elvis_lhs_0 == null ? false : tmp0_elvis_lhs_0)));
3279
- destination_7.s(tmp$ret$27);
3348
+ var tmp$ret$29 = new Request(new Content(tmp_2, tmp_4, !(tmp0_elvis_lhs_0 == null ? false : tmp0_elvis_lhs_0)));
3349
+ destination_7.s(tmp$ret$29);
3280
3350
  }
3281
- tmp_0 = destination_7;
3351
+ tmp_1 = destination_7;
3282
3352
  }
3283
- tmp = tmp_0;
3353
+ tmp_0 = tmp_1;
3284
3354
  }
3285
- var tmp3_elvis_lhs = tmp;
3355
+ var tmp3_elvis_lhs = tmp_0;
3286
3356
  var requests = tmp3_elvis_lhs == null ? listOf(new Request(null)) : tmp3_elvis_lhs;
3287
3357
  // Inline function 'kotlin.collections.flatMap' call
3288
3358
  // Inline function 'kotlin.collections.orEmpty' call
@@ -3302,11 +3372,11 @@
3302
3372
  // Inline function 'kotlin.let' call
3303
3373
  // Inline function 'kotlin.contracts.contract' call
3304
3374
  // Inline function 'community.flock.wirespec.openapi.v3.OpenApiV3Parser.parseEndpoint.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
3305
- var it = resolve_8(res, $this);
3306
- var tmp0_safe_receiver_0 = it.d1w_1;
3307
- var tmp_4;
3375
+ var response = resolve_8(_this__u8e3s4, OpenApiV3Parser_instance, res);
3376
+ var tmp0_safe_receiver_0 = response.d1w_1;
3377
+ var tmp_5;
3308
3378
  if (tmp0_safe_receiver_0 == null) {
3309
- tmp_4 = null;
3379
+ tmp_5 = null;
3310
3380
  } else {
3311
3381
  // Inline function 'kotlin.collections.map' call
3312
3382
  // Inline function 'kotlin.collections.mapTo' call
@@ -3320,12 +3390,12 @@
3320
3390
  var contentType = item_4.o2().e1y_1;
3321
3391
  // Inline function 'kotlin.collections.component2' call
3322
3392
  var media = item_4.p2();
3323
- var tmp_5 = _StatusCode___get_value__impl__we50mu_0(status);
3393
+ var tmp_6 = _StatusCode___get_value__impl__we50mu_0(status);
3324
3394
  // Inline function 'kotlin.collections.orEmpty' call
3325
- var tmp0_safe_receiver_1 = it.c1w_1;
3326
- var tmp_6;
3395
+ var tmp0_safe_receiver_1 = response.c1w_1;
3396
+ var tmp_7;
3327
3397
  if (tmp0_safe_receiver_1 == null) {
3328
- tmp_6 = null;
3398
+ tmp_7 = null;
3329
3399
  } else {
3330
3400
  // Inline function 'kotlin.collections.map' call
3331
3401
  // Inline function 'kotlin.collections.mapTo' call
@@ -3335,65 +3405,74 @@
3335
3405
  while (tmp0_iterator_10.w()) {
3336
3406
  var item_5 = tmp0_iterator_10.y();
3337
3407
  // Inline function 'community.flock.wirespec.openapi.v3.OpenApiV3Parser.parseEndpoint.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
3338
- var tmp$ret$40 = toField_4(resolve_5(item_5.p2(), $this), $this, item_5.o2(), Common_instance.d2c([name, 'ResponseHeader']));
3339
- destination_10.s(tmp$ret$40);
3408
+ var tmp$ret$42 = toField_4(_this__u8e3s4, OpenApiV3Parser_instance, resolve_5(_this__u8e3s4, OpenApiV3Parser_instance, item_5.p2()), item_5.o2(), Common_instance.e2c([name, 'ResponseHeader']));
3409
+ destination_10.s(tmp$ret$42);
3340
3410
  }
3341
- tmp_6 = destination_10;
3411
+ tmp_7 = destination_10;
3342
3412
  }
3343
- var tmp0_elvis_lhs_2 = tmp_6;
3344
- var tmp_7 = tmp0_elvis_lhs_2 == null ? emptyList() : tmp0_elvis_lhs_2;
3345
- var tmp_8 = _MediaType___get_value__impl__wy58mp(contentType);
3413
+ var tmp0_elvis_lhs_2 = tmp_7;
3414
+ var tmp_8 = tmp0_elvis_lhs_2 == null ? emptyList() : tmp0_elvis_lhs_2;
3415
+ var tmp_9 = _MediaType___get_value__impl__wy58mp(contentType);
3346
3416
  var schema_0 = media.i1y_1;
3347
- var tmp_9;
3417
+ var tmp_10;
3348
3418
  if (schema_0 instanceof ReferenceObject_0) {
3349
- tmp_9 = toReference_1(schema_0, $this);
3419
+ tmp_10 = toReference_1(_this__u8e3s4, OpenApiV3Parser_instance, schema_0);
3350
3420
  } else {
3351
3421
  if (schema_0 instanceof SchemaObject_0) {
3352
- tmp_9 = toReference_2(schema_0, $this, Common_instance.d2c([name, _StatusCode___get_value__impl__we50mu_0(status), _MediaType___get_value__impl__wy58mp(contentType), 'ResponseBody']));
3422
+ tmp_10 = toReference_2(_this__u8e3s4, OpenApiV3Parser_instance, schema_0, Common_instance.e2c([name, _StatusCode___get_value__impl__we50mu_0(status), _MediaType___get_value__impl__wy58mp(contentType), 'ResponseBody']));
3353
3423
  } else {
3354
3424
  if (schema_0 == null) {
3355
- tmp_9 = new Any(false);
3425
+ tmp_10 = new Any(false);
3356
3426
  } else {
3357
3427
  noWhenBranchMatchedException();
3358
3428
  }
3359
3429
  }
3360
3430
  }
3361
- var tmp_10 = tmp_9;
3431
+ var tmp_11 = tmp_10;
3362
3432
  var tmp1_safe_receiver_0 = media.i1y_1;
3363
- var tmp2_safe_receiver_0 = tmp1_safe_receiver_0 == null ? null : resolve_4(tmp1_safe_receiver_0, $this);
3433
+ var tmp_12;
3434
+ if (tmp1_safe_receiver_0 == null) {
3435
+ tmp_12 = null;
3436
+ } else {
3437
+ // Inline function 'kotlin.let' call
3438
+ // Inline function 'kotlin.contracts.contract' call
3439
+ // Inline function 'community.flock.wirespec.openapi.v3.OpenApiV3Parser.parseEndpoint.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
3440
+ tmp_12 = resolve_4(_this__u8e3s4, OpenApiV3Parser_instance, tmp1_safe_receiver_0);
3441
+ }
3442
+ var tmp2_safe_receiver_0 = tmp_12;
3364
3443
  var tmp3_elvis_lhs_0 = tmp2_safe_receiver_0 == null ? null : tmp2_safe_receiver_0.o1u_1;
3365
- var tmp$ret$44 = new Response(tmp_5, tmp_7, new Content(tmp_8, tmp_10, tmp3_elvis_lhs_0 == null ? false : tmp3_elvis_lhs_0));
3366
- destination_9.s(tmp$ret$44);
3444
+ var tmp$ret$48 = new Response(tmp_6, tmp_8, new Content(tmp_9, tmp_11, tmp3_elvis_lhs_0 == null ? false : tmp3_elvis_lhs_0));
3445
+ destination_9.s(tmp$ret$48);
3367
3446
  }
3368
- tmp_4 = destination_9;
3447
+ tmp_5 = destination_9;
3369
3448
  }
3370
- var tmp0_elvis_lhs_3 = tmp_4;
3449
+ var tmp0_elvis_lhs_3 = tmp_5;
3371
3450
  var list = tmp0_elvis_lhs_3 == null ? listOf(new Response(_StatusCode___get_value__impl__we50mu_0(status), emptyList(), null)) : tmp0_elvis_lhs_3;
3372
3451
  addAll(destination_8, list);
3373
3452
  }
3374
3453
  var responses = destination_8;
3375
- var tmp$ret$52 = new Endpoint(null, Companion_instance.w28(name), method, segments, query, headers, cookies, requests, responses);
3376
- destination_0.s(tmp$ret$52);
3454
+ var tmp$ret$56 = new Endpoint(null, Companion_instance.w28(name), method, segments, query, headers, cookies, requests, responses);
3455
+ destination_0.s(tmp$ret$56);
3377
3456
  }
3378
3457
  var list_0 = destination_0;
3379
3458
  addAll(destination, list_0);
3380
3459
  }
3381
3460
  return destination;
3382
3461
  }
3383
- function parseParameters_0($this) {
3384
- return flatMapRequests_0($this.z2c_1, $this, OpenApiV3Parser$parseParameters$lambda($this));
3462
+ function parseParameters_0(_this__u8e3s4, $this) {
3463
+ return flatMapRequests_0(_this__u8e3s4, $this, OpenApiV3Parser$parseParameters$lambda(_this__u8e3s4));
3385
3464
  }
3386
- function parseRequestBody_0($this) {
3387
- return flatMapRequests_0($this.z2c_1, $this, OpenApiV3Parser$parseRequestBody$lambda($this));
3465
+ function parseRequestBody_0(_this__u8e3s4, $this) {
3466
+ return flatMapRequests_0(_this__u8e3s4, $this, OpenApiV3Parser$parseRequestBody$lambda(_this__u8e3s4));
3388
3467
  }
3389
- function parseResponseBody_0($this) {
3390
- return flatMapResponses_0($this.z2c_1, $this, OpenApiV3Parser$parseResponseBody$lambda($this));
3468
+ function parseResponseBody_0(_this__u8e3s4, $this) {
3469
+ return flatMapResponses_0(_this__u8e3s4, $this, OpenApiV3Parser$parseResponseBody$lambda(_this__u8e3s4));
3391
3470
  }
3392
- function parseComponents($this) {
3471
+ function parseComponents(_this__u8e3s4, $this) {
3393
3472
  // Inline function 'kotlin.collections.flatMap' call
3394
3473
  // Inline function 'kotlin.collections.filter' call
3395
3474
  // Inline function 'kotlin.collections.orEmpty' call
3396
- var tmp0_safe_receiver = $this.z2c_1.z1o_1;
3475
+ var tmp0_safe_receiver = _this__u8e3s4.z1o_1;
3397
3476
  var tmp0_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.s1q_1;
3398
3477
  // Inline function 'kotlin.collections.filterTo' call
3399
3478
  var this_0 = tmp0_elvis_lhs == null ? emptyMap() : tmp0_elvis_lhs;
@@ -3421,7 +3500,7 @@
3421
3500
  while (tmp0_iterator_0.w()) {
3422
3501
  var element_0 = tmp0_iterator_0.y();
3423
3502
  // Inline function 'community.flock.wirespec.openapi.v3.OpenApiV3Parser.parseComponents.<anonymous>' call
3424
- var list = flatten_2(element_0.p2(), $this, Common_instance.d2c([element_0.o2()]));
3503
+ var list = flatten_2(_this__u8e3s4, OpenApiV3Parser_instance, element_0.p2(), Common_instance.e2c([element_0.o2()]));
3425
3504
  addAll(destination_0, list);
3426
3505
  }
3427
3506
  return destination_0;
@@ -3438,7 +3517,7 @@
3438
3517
  // Inline function 'kotlin.let' call
3439
3518
  // Inline function 'kotlin.contracts.contract' call
3440
3519
  // Inline function 'community.flock.wirespec.openapi.v3.OpenApiV3Parser.toName.<anonymous>' call
3441
- tmp = Common_instance.d2c([tmp0_safe_receiver]);
3520
+ tmp = Common_instance.e2c([tmp0_safe_receiver]);
3442
3521
  }
3443
3522
  return tmp;
3444
3523
  }
@@ -3457,13 +3536,13 @@
3457
3536
  }
3458
3537
  }
3459
3538
  var tmp = destination;
3460
- return joinToString(tmp, '', VOID, VOID, VOID, VOID, OpenApiV3Parser$toName$lambda($this));
3539
+ return joinToString(tmp, '', VOID, VOID, VOID, VOID, OpenApiV3Parser$toName$lambda);
3461
3540
  }
3462
- function toSegments_0(_this__u8e3s4, $this, parameters) {
3541
+ function toSegments_0(_this__u8e3s4, $this, path, parameters) {
3463
3542
  // Inline function 'kotlin.collections.map' call
3464
3543
  // Inline function 'kotlin.collections.filter' call
3465
3544
  // Inline function 'kotlin.collections.filterTo' call
3466
- var this_0 = drop(split(_Path___get_value__impl__thmflc_0(_this__u8e3s4), ['/']), 1);
3545
+ var this_0 = drop(split(_Path___get_value__impl__thmflc_0(path), ['/']), 1);
3467
3546
  var destination = ArrayList_init_$Create$();
3468
3547
  var tmp0_iterator = this_0.v();
3469
3548
  while (tmp0_iterator.w()) {
@@ -3481,7 +3560,7 @@
3481
3560
  var item = tmp0_iterator_0.y();
3482
3561
  // Inline function 'community.flock.wirespec.openapi.v3.OpenApiV3Parser.toSegments.<anonymous>' call
3483
3562
  var tmp;
3484
- switch (isParam_0(item, $this)) {
3563
+ switch (isParam_0(item, OpenApiV3Parser_instance)) {
3485
3564
  case true:
3486
3565
  // Inline function 'kotlin.text.substring' call
3487
3566
 
@@ -3489,7 +3568,7 @@
3489
3568
  // Inline function 'kotlin.js.asDynamic' call
3490
3569
 
3491
3570
  var param = item.substring(1, endIndex);
3492
- var name = toName_2(_this__u8e3s4, $this);
3571
+ var name = toName_2(path, OpenApiV3Parser_instance);
3493
3572
  // Inline function 'kotlin.collections.find' call
3494
3573
 
3495
3574
  var tmp$ret$7;
@@ -3509,28 +3588,48 @@
3509
3588
 
3510
3589
  var tmp1_safe_receiver = tmp$ret$7;
3511
3590
  var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.b1u_1;
3512
- var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : resolve_4(tmp2_safe_receiver, $this);
3513
- var tmp4_safe_receiver = tmp3_safe_receiver == null ? null : toReference_2(tmp3_safe_receiver, $this, Common_instance.d2c([name, 'Parameter', param]));
3514
3591
  var tmp_0;
3515
- if (tmp4_safe_receiver == null) {
3592
+ if (tmp2_safe_receiver == null) {
3516
3593
  tmp_0 = null;
3517
3594
  } else {
3518
3595
  // Inline function 'kotlin.let' call
3519
3596
  // Inline function 'kotlin.contracts.contract' call
3520
3597
  // Inline function 'community.flock.wirespec.openapi.v3.OpenApiV3Parser.toSegments.<anonymous>.<anonymous>' call
3521
- tmp_0 = new Param(Companion_instance.w28(param), tmp4_safe_receiver);
3598
+ tmp_0 = resolve_4(_this__u8e3s4, OpenApiV3Parser_instance, tmp2_safe_receiver);
3522
3599
  }
3523
3600
 
3524
- var tmp5_elvis_lhs = tmp_0;
3601
+ var tmp3_safe_receiver = tmp_0;
3525
3602
  var tmp_1;
3603
+ if (tmp3_safe_receiver == null) {
3604
+ tmp_1 = null;
3605
+ } else {
3606
+ // Inline function 'kotlin.let' call
3607
+ // Inline function 'kotlin.contracts.contract' call
3608
+ // Inline function 'community.flock.wirespec.openapi.v3.OpenApiV3Parser.toSegments.<anonymous>.<anonymous>' call
3609
+ tmp_1 = toReference_2(_this__u8e3s4, OpenApiV3Parser_instance, tmp3_safe_receiver, Common_instance.e2c([name, 'Parameter', param]));
3610
+ }
3611
+
3612
+ var tmp4_safe_receiver = tmp_1;
3613
+ var tmp_2;
3614
+ if (tmp4_safe_receiver == null) {
3615
+ tmp_2 = null;
3616
+ } else {
3617
+ // Inline function 'kotlin.let' call
3618
+ // Inline function 'kotlin.contracts.contract' call
3619
+ // Inline function 'community.flock.wirespec.openapi.v3.OpenApiV3Parser.toSegments.<anonymous>.<anonymous>' call
3620
+ tmp_2 = new Param(Companion_instance.w28(param), tmp4_safe_receiver);
3621
+ }
3622
+
3623
+ var tmp5_elvis_lhs = tmp_2;
3624
+ var tmp_3;
3526
3625
  if (tmp5_elvis_lhs == null) {
3527
3626
  var message = ' Declared path parameter ' + param + ' needs to be defined as a path parameter in path or operation level';
3528
3627
  throw IllegalStateException_init_$Create$(toString(message));
3529
3628
  } else {
3530
- tmp_1 = tmp5_elvis_lhs;
3629
+ tmp_3 = tmp5_elvis_lhs;
3531
3630
  }
3532
3631
 
3533
- tmp = tmp_1;
3632
+ tmp = tmp_3;
3534
3633
  break;
3535
3634
  case false:
3536
3635
  tmp = new Literal(item);
@@ -3539,13 +3638,13 @@
3539
3638
  noWhenBranchMatchedException();
3540
3639
  break;
3541
3640
  }
3542
- var tmp$ret$11 = tmp;
3543
- destination_0.s(tmp$ret$11);
3641
+ var tmp$ret$15 = tmp;
3642
+ destination_0.s(tmp$ret$15);
3544
3643
  }
3545
3644
  return destination_0;
3546
3645
  }
3547
- function resolveParameters_1(_this__u8e3s4, $this) {
3548
- var tmp0_safe_receiver = _this__u8e3s4.h1s_1;
3646
+ function resolveParameters_1(_this__u8e3s4, $this, operation) {
3647
+ var tmp0_safe_receiver = operation.h1s_1;
3549
3648
  var tmp;
3550
3649
  if (tmp0_safe_receiver == null) {
3551
3650
  tmp = null;
@@ -3564,7 +3663,7 @@
3564
3663
  tmp_0 = element;
3565
3664
  } else {
3566
3665
  if (element instanceof ReferenceObject_0) {
3567
- tmp_0 = resolveParameterObject_0(element, $this);
3666
+ tmp_0 = resolveParameterObject_0(_this__u8e3s4, OpenApiV3Parser_instance, element);
3568
3667
  } else {
3569
3668
  noWhenBranchMatchedException();
3570
3669
  }
@@ -3583,8 +3682,8 @@
3583
3682
  var tmp1_elvis_lhs = tmp;
3584
3683
  return tmp1_elvis_lhs == null ? emptyList() : tmp1_elvis_lhs;
3585
3684
  }
3586
- function resolveParameters_2(_this__u8e3s4, $this) {
3587
- var tmp0_safe_receiver = _this__u8e3s4.n1q_1;
3685
+ function resolveParameters_2(_this__u8e3s4, $this, pathItem) {
3686
+ var tmp0_safe_receiver = pathItem.n1q_1;
3588
3687
  var tmp;
3589
3688
  if (tmp0_safe_receiver == null) {
3590
3689
  tmp = null;
@@ -3603,7 +3702,7 @@
3603
3702
  tmp_0 = element;
3604
3703
  } else {
3605
3704
  if (element instanceof ReferenceObject_0) {
3606
- tmp_0 = resolveParameterObject_0(element, $this);
3705
+ tmp_0 = resolveParameterObject_0(_this__u8e3s4, OpenApiV3Parser_instance, element);
3607
3706
  } else {
3608
3707
  noWhenBranchMatchedException();
3609
3708
  }
@@ -3622,10 +3721,10 @@
3622
3721
  var tmp1_elvis_lhs = tmp;
3623
3722
  return tmp1_elvis_lhs == null ? emptyList() : tmp1_elvis_lhs;
3624
3723
  }
3625
- function resolveParameterObject_0(_this__u8e3s4, $this) {
3626
- var tmp0_safe_receiver = $this.z2c_1.z1o_1;
3724
+ function resolveParameterObject_0(_this__u8e3s4, $this, reference) {
3725
+ var tmp0_safe_receiver = _this__u8e3s4.z1o_1;
3627
3726
  var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.u1q_1;
3628
- var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.u2(getReference_0(_this__u8e3s4, $this));
3727
+ var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.u2(getReference_0(reference, $this));
3629
3728
  var tmp;
3630
3729
  if (tmp2_safe_receiver == null) {
3631
3730
  tmp = null;
@@ -3638,7 +3737,7 @@
3638
3737
  tmp_0 = tmp2_safe_receiver;
3639
3738
  } else {
3640
3739
  if (tmp2_safe_receiver instanceof ReferenceObject_0) {
3641
- tmp_0 = resolveParameterObject_0(tmp2_safe_receiver, $this);
3740
+ tmp_0 = resolveParameterObject_0(_this__u8e3s4, OpenApiV3Parser_instance, tmp2_safe_receiver);
3642
3741
  } else {
3643
3742
  noWhenBranchMatchedException();
3644
3743
  }
@@ -3647,10 +3746,10 @@
3647
3746
  }
3648
3747
  return tmp;
3649
3748
  }
3650
- function resolveSchemaObject_0(_this__u8e3s4, $this) {
3651
- var tmp0_safe_receiver = $this.z2c_1.z1o_1;
3749
+ function resolveSchemaObject_0(_this__u8e3s4, $this, reference) {
3750
+ var tmp0_safe_receiver = _this__u8e3s4.z1o_1;
3652
3751
  var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.s1q_1;
3653
- var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.u2(getReference_0(_this__u8e3s4, $this));
3752
+ var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.u2(getReference_0(reference, $this));
3654
3753
  var tmp;
3655
3754
  if (tmp2_safe_receiver == null) {
3656
3755
  tmp = null;
@@ -3660,10 +3759,10 @@
3660
3759
  // Inline function 'community.flock.wirespec.openapi.v3.OpenApiV3Parser.resolveSchemaObject.<anonymous>' call
3661
3760
  var tmp_0;
3662
3761
  if (tmp2_safe_receiver instanceof SchemaObject_0) {
3663
- tmp_0 = to(_this__u8e3s4, tmp2_safe_receiver);
3762
+ tmp_0 = to(reference, tmp2_safe_receiver);
3664
3763
  } else {
3665
3764
  if (tmp2_safe_receiver instanceof ReferenceObject_0) {
3666
- tmp_0 = resolveSchemaObject_0(tmp2_safe_receiver, $this);
3765
+ tmp_0 = resolveSchemaObject_0(_this__u8e3s4, OpenApiV3Parser_instance, tmp2_safe_receiver);
3667
3766
  } else {
3668
3767
  noWhenBranchMatchedException();
3669
3768
  }
@@ -3673,17 +3772,17 @@
3673
3772
  var tmp3_elvis_lhs = tmp;
3674
3773
  var tmp_1;
3675
3774
  if (tmp3_elvis_lhs == null) {
3676
- var message = 'Cannot resolve ref: ' + new Ref_0(_this__u8e3s4.l1u_1);
3775
+ var message = 'Cannot resolve ref: ' + new Ref_0(reference.l1u_1);
3677
3776
  throw IllegalStateException_init_$Create$(toString(message));
3678
3777
  } else {
3679
3778
  tmp_1 = tmp3_elvis_lhs;
3680
3779
  }
3681
3780
  return tmp_1;
3682
3781
  }
3683
- function resolveHeaderObject(_this__u8e3s4, $this) {
3684
- var tmp0_safe_receiver = $this.z2c_1.z1o_1;
3782
+ function resolveHeaderObject(_this__u8e3s4, $this, reference) {
3783
+ var tmp0_safe_receiver = _this__u8e3s4.z1o_1;
3685
3784
  var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.x1q_1;
3686
- var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.u2(getReference_0(_this__u8e3s4, $this));
3785
+ var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.u2(getReference_0(reference, $this));
3687
3786
  var tmp;
3688
3787
  if (tmp2_safe_receiver == null) {
3689
3788
  tmp = null;
@@ -3693,10 +3792,10 @@
3693
3792
  // Inline function 'community.flock.wirespec.openapi.v3.OpenApiV3Parser.resolveHeaderObject.<anonymous>' call
3694
3793
  var tmp_0;
3695
3794
  if (tmp2_safe_receiver instanceof HeaderObject_0) {
3696
- tmp_0 = to(_this__u8e3s4, tmp2_safe_receiver);
3795
+ tmp_0 = to(reference, tmp2_safe_receiver);
3697
3796
  } else {
3698
3797
  if (tmp2_safe_receiver instanceof ReferenceObject_0) {
3699
- tmp_0 = resolveHeaderObject(tmp2_safe_receiver, $this);
3798
+ tmp_0 = resolveHeaderObject(_this__u8e3s4, OpenApiV3Parser_instance, tmp2_safe_receiver);
3700
3799
  } else {
3701
3800
  noWhenBranchMatchedException();
3702
3801
  }
@@ -3706,17 +3805,17 @@
3706
3805
  var tmp3_elvis_lhs = tmp;
3707
3806
  var tmp_1;
3708
3807
  if (tmp3_elvis_lhs == null) {
3709
- var message = 'Cannot resolve ref: ' + new Ref_0(_this__u8e3s4.l1u_1);
3808
+ var message = 'Cannot resolve ref: ' + new Ref_0(reference.l1u_1);
3710
3809
  throw IllegalStateException_init_$Create$(toString(message));
3711
3810
  } else {
3712
3811
  tmp_1 = tmp3_elvis_lhs;
3713
3812
  }
3714
3813
  return tmp_1;
3715
3814
  }
3716
- function resolveRequestBodyObject(_this__u8e3s4, $this) {
3717
- var tmp0_safe_receiver = $this.z2c_1.z1o_1;
3815
+ function resolveRequestBodyObject(_this__u8e3s4, $this, reference) {
3816
+ var tmp0_safe_receiver = _this__u8e3s4.z1o_1;
3718
3817
  var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.w1q_1;
3719
- var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.u2(getReference_0(_this__u8e3s4, $this));
3818
+ var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.u2(getReference_0(reference, $this));
3720
3819
  var tmp;
3721
3820
  if (tmp2_safe_receiver == null) {
3722
3821
  tmp = null;
@@ -3726,10 +3825,10 @@
3726
3825
  // Inline function 'community.flock.wirespec.openapi.v3.OpenApiV3Parser.resolveRequestBodyObject.<anonymous>' call
3727
3826
  var tmp_0;
3728
3827
  if (tmp2_safe_receiver instanceof RequestBodyObject) {
3729
- tmp_0 = to(_this__u8e3s4, tmp2_safe_receiver);
3828
+ tmp_0 = to(reference, tmp2_safe_receiver);
3730
3829
  } else {
3731
3830
  if (tmp2_safe_receiver instanceof ReferenceObject_0) {
3732
- tmp_0 = resolveRequestBodyObject(tmp2_safe_receiver, $this);
3831
+ tmp_0 = resolveRequestBodyObject(_this__u8e3s4, OpenApiV3Parser_instance, tmp2_safe_receiver);
3733
3832
  } else {
3734
3833
  noWhenBranchMatchedException();
3735
3834
  }
@@ -3739,17 +3838,17 @@
3739
3838
  var tmp3_elvis_lhs = tmp;
3740
3839
  var tmp_1;
3741
3840
  if (tmp3_elvis_lhs == null) {
3742
- var message = 'Cannot resolve ref: ' + new Ref_0(_this__u8e3s4.l1u_1);
3841
+ var message = 'Cannot resolve ref: ' + new Ref_0(reference.l1u_1);
3743
3842
  throw IllegalStateException_init_$Create$(toString(message));
3744
3843
  } else {
3745
3844
  tmp_1 = tmp3_elvis_lhs;
3746
3845
  }
3747
3846
  return tmp_1;
3748
3847
  }
3749
- function resolveResponseObject_0(_this__u8e3s4, $this) {
3750
- var tmp0_safe_receiver = $this.z2c_1.z1o_1;
3848
+ function resolveResponseObject_0(_this__u8e3s4, $this, reference) {
3849
+ var tmp0_safe_receiver = _this__u8e3s4.z1o_1;
3751
3850
  var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.t1q_1;
3752
- var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.u2(getReference_0(_this__u8e3s4, $this));
3851
+ var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.u2(getReference_0(reference, $this));
3753
3852
  var tmp;
3754
3853
  if (tmp2_safe_receiver == null) {
3755
3854
  tmp = null;
@@ -3759,10 +3858,10 @@
3759
3858
  // Inline function 'community.flock.wirespec.openapi.v3.OpenApiV3Parser.resolveResponseObject.<anonymous>' call
3760
3859
  var tmp_0;
3761
3860
  if (tmp2_safe_receiver instanceof ResponseObject_0) {
3762
- tmp_0 = to(_this__u8e3s4, tmp2_safe_receiver);
3861
+ tmp_0 = to(reference, tmp2_safe_receiver);
3763
3862
  } else {
3764
3863
  if (tmp2_safe_receiver instanceof ReferenceObject_0) {
3765
- tmp_0 = resolveResponseObject_0(tmp2_safe_receiver, $this);
3864
+ tmp_0 = resolveResponseObject_0(_this__u8e3s4, OpenApiV3Parser_instance, tmp2_safe_receiver);
3766
3865
  } else {
3767
3866
  noWhenBranchMatchedException();
3768
3867
  }
@@ -3772,48 +3871,48 @@
3772
3871
  var tmp3_elvis_lhs = tmp;
3773
3872
  var tmp_1;
3774
3873
  if (tmp3_elvis_lhs == null) {
3775
- var message = 'Cannot resolve ref: ' + new Ref_0(_this__u8e3s4.l1u_1);
3874
+ var message = 'Cannot resolve ref: ' + new Ref_0(reference.l1u_1);
3776
3875
  throw IllegalStateException_init_$Create$(toString(message));
3777
3876
  } else {
3778
3877
  tmp_1 = tmp3_elvis_lhs;
3779
3878
  }
3780
3879
  return tmp_1;
3781
3880
  }
3782
- function resolve_4(_this__u8e3s4, $this) {
3881
+ function resolve_4(_this__u8e3s4, $this, schemaOrReference) {
3783
3882
  var tmp;
3784
- if (_this__u8e3s4 instanceof SchemaObject_0) {
3785
- tmp = _this__u8e3s4;
3883
+ if (schemaOrReference instanceof SchemaObject_0) {
3884
+ tmp = schemaOrReference;
3786
3885
  } else {
3787
- if (_this__u8e3s4 instanceof ReferenceObject_0) {
3788
- tmp = resolveSchemaObject_0(_this__u8e3s4, $this).wd_1;
3886
+ if (schemaOrReference instanceof ReferenceObject_0) {
3887
+ tmp = resolveSchemaObject_0(_this__u8e3s4, $this, schemaOrReference).wd_1;
3789
3888
  } else {
3790
3889
  noWhenBranchMatchedException();
3791
3890
  }
3792
3891
  }
3793
3892
  return tmp;
3794
3893
  }
3795
- function resolve_5(_this__u8e3s4, $this) {
3894
+ function resolve_5(_this__u8e3s4, $this, headerOrReference) {
3796
3895
  var tmp;
3797
- if (_this__u8e3s4 instanceof HeaderObject_0) {
3798
- tmp = _this__u8e3s4;
3896
+ if (headerOrReference instanceof HeaderObject_0) {
3897
+ tmp = headerOrReference;
3799
3898
  } else {
3800
- if (_this__u8e3s4 instanceof ReferenceObject_0) {
3801
- tmp = resolveHeaderObject(_this__u8e3s4, $this).wd_1;
3899
+ if (headerOrReference instanceof ReferenceObject_0) {
3900
+ tmp = resolveHeaderObject(_this__u8e3s4, $this, headerOrReference).wd_1;
3802
3901
  } else {
3803
3902
  noWhenBranchMatchedException();
3804
3903
  }
3805
3904
  }
3806
3905
  return tmp;
3807
3906
  }
3808
- function resolve_6(_this__u8e3s4, $this) {
3907
+ function resolve_6(_this__u8e3s4, $this, schemaOrReferenceOrBoolean) {
3809
3908
  var tmp;
3810
- if (_this__u8e3s4 instanceof SchemaObject_0) {
3811
- tmp = _this__u8e3s4;
3909
+ if (schemaOrReferenceOrBoolean instanceof SchemaObject_0) {
3910
+ tmp = schemaOrReferenceOrBoolean;
3812
3911
  } else {
3813
- if (_this__u8e3s4 instanceof ReferenceObject_0) {
3814
- tmp = resolveSchemaObject_0(_this__u8e3s4, $this).wd_1;
3912
+ if (schemaOrReferenceOrBoolean instanceof ReferenceObject_0) {
3913
+ tmp = resolveSchemaObject_0(_this__u8e3s4, $this, schemaOrReferenceOrBoolean).wd_1;
3815
3914
  } else {
3816
- if (_this__u8e3s4 instanceof BooleanObject_0) {
3915
+ if (schemaOrReferenceOrBoolean instanceof BooleanObject_0) {
3817
3916
  var reason = 'Not yet implemented';
3818
3917
  throw new NotImplementedError('An operation is not implemented: ' + reason);
3819
3918
  } else {
@@ -3823,65 +3922,83 @@
3823
3922
  }
3824
3923
  return tmp;
3825
3924
  }
3826
- function resolve_7(_this__u8e3s4, $this) {
3925
+ function resolve_7(_this__u8e3s4, $this, requestBodyOrReference) {
3827
3926
  var tmp;
3828
- if (_this__u8e3s4 instanceof RequestBodyObject) {
3829
- tmp = _this__u8e3s4;
3927
+ if (requestBodyOrReference instanceof RequestBodyObject) {
3928
+ tmp = requestBodyOrReference;
3830
3929
  } else {
3831
- if (_this__u8e3s4 instanceof ReferenceObject_0) {
3832
- tmp = resolveRequestBodyObject(_this__u8e3s4, $this).wd_1;
3930
+ if (requestBodyOrReference instanceof ReferenceObject_0) {
3931
+ tmp = resolveRequestBodyObject(_this__u8e3s4, $this, requestBodyOrReference).wd_1;
3833
3932
  } else {
3834
3933
  noWhenBranchMatchedException();
3835
3934
  }
3836
3935
  }
3837
3936
  return tmp;
3838
3937
  }
3839
- function resolve_8(_this__u8e3s4, $this) {
3938
+ function resolve_8(_this__u8e3s4, $this, responseOrReferenceObject) {
3840
3939
  var tmp;
3841
- if (_this__u8e3s4 instanceof ResponseObject_0) {
3842
- tmp = _this__u8e3s4;
3940
+ if (responseOrReferenceObject instanceof ResponseObject_0) {
3941
+ tmp = responseOrReferenceObject;
3843
3942
  } else {
3844
- if (_this__u8e3s4 instanceof ReferenceObject_0) {
3845
- tmp = resolveResponseObject_0(_this__u8e3s4, $this).wd_1;
3943
+ if (responseOrReferenceObject instanceof ReferenceObject_0) {
3944
+ tmp = resolveResponseObject_0(_this__u8e3s4, $this, responseOrReferenceObject).wd_1;
3846
3945
  } else {
3847
3946
  noWhenBranchMatchedException();
3848
3947
  }
3849
3948
  }
3850
3949
  return tmp;
3851
3950
  }
3852
- function flatten_1(_this__u8e3s4, $this, name) {
3951
+ function flatten_1(_this__u8e3s4, $this, schemaObject, name) {
3853
3952
  var tmp;
3854
- if (!(_this__u8e3s4.e1v_1 == null)) {
3953
+ if (!(schemaObject.e1v_1 == null)) {
3855
3954
  var tmp_0;
3856
- if (_this__u8e3s4.e1v_1 instanceof BooleanObject_0) {
3955
+ if (schemaObject.e1v_1 instanceof BooleanObject_0) {
3857
3956
  tmp_0 = emptyList();
3858
3957
  } else {
3859
- var tmp1_safe_receiver = _this__u8e3s4.e1v_1;
3860
- var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : resolve_6(tmp1_safe_receiver, $this);
3958
+ var tmp1_safe_receiver = schemaObject.e1v_1;
3861
3959
  var tmp_1;
3862
- if (tmp2_safe_receiver == null) {
3960
+ if (tmp1_safe_receiver == null) {
3863
3961
  tmp_1 = null;
3962
+ } else {
3963
+ // Inline function 'kotlin.let' call
3964
+ // Inline function 'kotlin.contracts.contract' call
3965
+ // Inline function 'community.flock.wirespec.openapi.v3.OpenApiV3Parser.flatten.<anonymous>' call
3966
+ tmp_1 = resolve_6(_this__u8e3s4, OpenApiV3Parser_instance, tmp1_safe_receiver);
3967
+ }
3968
+ var tmp2_safe_receiver = tmp_1;
3969
+ var tmp_2;
3970
+ if (tmp2_safe_receiver == null) {
3971
+ tmp_2 = null;
3864
3972
  } else {
3865
3973
  // Inline function 'kotlin.takeIf' call
3866
3974
  // Inline function 'kotlin.contracts.contract' call
3867
- var tmp_2;
3975
+ var tmp_3;
3868
3976
  // Inline function 'community.flock.wirespec.openapi.v3.OpenApiV3Parser.flatten.<anonymous>' call
3869
3977
  if (!(tmp2_safe_receiver.d1v_1 == null)) {
3870
- tmp_2 = tmp2_safe_receiver;
3978
+ tmp_3 = tmp2_safe_receiver;
3871
3979
  } else {
3872
- tmp_2 = null;
3980
+ tmp_3 = null;
3873
3981
  }
3874
- tmp_1 = tmp_2;
3982
+ tmp_2 = tmp_3;
3983
+ }
3984
+ var tmp3_safe_receiver = tmp_2;
3985
+ var tmp_4;
3986
+ if (tmp3_safe_receiver == null) {
3987
+ tmp_4 = null;
3988
+ } else {
3989
+ // Inline function 'kotlin.let' call
3990
+ // Inline function 'kotlin.contracts.contract' call
3991
+ // Inline function 'community.flock.wirespec.openapi.v3.OpenApiV3Parser.flatten.<anonymous>' call
3992
+ tmp_4 = flatten_1(_this__u8e3s4, OpenApiV3Parser_instance, tmp3_safe_receiver, name);
3875
3993
  }
3876
- var tmp3_safe_receiver = tmp_1;
3877
- var tmp4_elvis_lhs = tmp3_safe_receiver == null ? null : flatten_1(tmp3_safe_receiver, $this, name);
3994
+ var tmp4_elvis_lhs = tmp_4;
3878
3995
  tmp_0 = tmp4_elvis_lhs == null ? emptyList() : tmp4_elvis_lhs;
3879
3996
  }
3880
3997
  tmp = tmp_0;
3881
- } else if (!(_this__u8e3s4.z1u_1 == null) ? true : !(_this__u8e3s4.a1v_1 == null)) {
3882
- var tmp_3 = Companion_instance.w28(name);
3998
+ } else if (!(schemaObject.z1u_1 == null) ? true : !(schemaObject.a1v_1 == null)) {
3999
+ var tmp_5 = Companion_instance.w28(name);
3883
4000
  // Inline function 'kotlin.collections.mapIndexed' call
3884
- var this_0 = ensureNotNull(_this__u8e3s4.z1u_1);
4001
+ var this_0 = ensureNotNull(schemaObject.z1u_1);
3885
4002
  // Inline function 'kotlin.collections.mapIndexedTo' call
3886
4003
  var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
3887
4004
  var index = 0;
@@ -3892,23 +4009,23 @@
3892
4009
  var tmp1 = index;
3893
4010
  index = tmp1 + 1 | 0;
3894
4011
  var index_0 = checkIndexOverflow(tmp1);
3895
- var tmp_4;
4012
+ var tmp_6;
3896
4013
  if (item instanceof ReferenceObject_0) {
3897
- tmp_4 = toReference_1(item, $this);
4014
+ tmp_6 = toReference_1(_this__u8e3s4, OpenApiV3Parser_instance, item);
3898
4015
  } else {
3899
4016
  if (item instanceof SchemaObject_0) {
3900
- tmp_4 = toReference_2(item, $this, Common_instance.d2c([name, index_0.toString()]));
4017
+ tmp_6 = toReference_2(_this__u8e3s4, OpenApiV3Parser_instance, item, Common_instance.e2c([name, index_0.toString()]));
3901
4018
  } else {
3902
4019
  noWhenBranchMatchedException();
3903
4020
  }
3904
4021
  }
3905
- var tmp$ret$2 = tmp_4;
3906
- destination.s(tmp$ret$2);
4022
+ var tmp$ret$6 = tmp_6;
4023
+ destination.s(tmp$ret$6);
3907
4024
  }
3908
- var tmp_5 = listOf(new Union(null, tmp_3, toSet(destination)));
4025
+ var tmp_7 = listOf(new Union(null, tmp_5, toSet(destination)));
3909
4026
  // Inline function 'kotlin.collections.flatMapIndexed' call
3910
4027
  // Inline function 'kotlin.collections.flatMapIndexedTo' call
3911
- var this_1 = ensureNotNull(_this__u8e3s4.z1u_1);
4028
+ var this_1 = ensureNotNull(schemaObject.z1u_1);
3912
4029
  var destination_0 = ArrayList_init_$Create$();
3913
4030
  var index_1 = 0;
3914
4031
  var tmp0_iterator_0 = this_1.v();
@@ -3918,26 +4035,26 @@
3918
4035
  var tmp1_0 = index_1;
3919
4036
  index_1 = tmp1_0 + 1 | 0;
3920
4037
  var index_2 = checkIndexOverflow(tmp1_0);
3921
- var tmp_6;
4038
+ var tmp_8;
3922
4039
  if (element instanceof ReferenceObject_0) {
3923
- tmp_6 = emptyList();
4040
+ tmp_8 = emptyList();
3924
4041
  } else {
3925
4042
  if (element instanceof SchemaObject_0) {
3926
- tmp_6 = flatten_1(element, $this, Common_instance.d2c([name, index_2.toString()]));
4043
+ tmp_8 = flatten_1(_this__u8e3s4, OpenApiV3Parser_instance, element, Common_instance.e2c([name, index_2.toString()]));
3927
4044
  } else {
3928
4045
  noWhenBranchMatchedException();
3929
4046
  }
3930
4047
  }
3931
- var list = tmp_6;
4048
+ var list = tmp_8;
3932
4049
  addAll(destination_0, list);
3933
4050
  }
3934
- tmp = plus(tmp_5, destination_0);
3935
- } else if (!(_this__u8e3s4.y1u_1 == null)) {
3936
- var tmp_7 = Companion_instance.w28(name);
4051
+ tmp = plus(tmp_7, destination_0);
4052
+ } else if (!(schemaObject.y1u_1 == null)) {
4053
+ var tmp_9 = Companion_instance.w28(name);
3937
4054
  // Inline function 'kotlin.collections.distinctBy' call
3938
4055
  // Inline function 'kotlin.collections.flatMap' call
3939
4056
  // Inline function 'kotlin.collections.orEmpty' call
3940
- var tmp0_elvis_lhs = _this__u8e3s4.y1u_1;
4057
+ var tmp0_elvis_lhs = schemaObject.y1u_1;
3941
4058
  // Inline function 'kotlin.collections.flatMapTo' call
3942
4059
  var this_2 = tmp0_elvis_lhs == null ? emptyList() : tmp0_elvis_lhs;
3943
4060
  var destination_1 = ArrayList_init_$Create$();
@@ -3945,7 +4062,7 @@
3945
4062
  while (tmp0_iterator_1.w()) {
3946
4063
  var element_0 = tmp0_iterator_1.y();
3947
4064
  // Inline function 'community.flock.wirespec.openapi.v3.OpenApiV3Parser.flatten.<anonymous>' call
3948
- var list_0 = toField_2(resolve_4(element_0, $this), $this, name);
4065
+ var list_0 = toField_2(_this__u8e3s4, OpenApiV3Parser_instance, resolve_4(_this__u8e3s4, OpenApiV3Parser_instance, element_0), name);
3949
4066
  addAll(destination_1, list_0);
3950
4067
  }
3951
4068
  var set = HashSet_init_$Create$();
@@ -3959,32 +4076,32 @@
3959
4076
  list_1.s(e);
3960
4077
  }
3961
4078
  }
3962
- var tmp_8 = listOf(new Type(null, tmp_7, new Shape(list_1)));
4079
+ var tmp_10 = listOf(new Type(null, tmp_9, new Shape(list_1)));
3963
4080
  // Inline function 'kotlin.collections.flatMap' call
3964
4081
  // Inline function 'kotlin.collections.flatMapTo' call
3965
- var this_3 = ensureNotNull(_this__u8e3s4.y1u_1);
4082
+ var this_3 = ensureNotNull(schemaObject.y1u_1);
3966
4083
  var destination_2 = ArrayList_init_$Create$();
3967
4084
  var tmp0_iterator_3 = this_3.v();
3968
4085
  while (tmp0_iterator_3.w()) {
3969
4086
  var element_1 = tmp0_iterator_3.y();
3970
4087
  // Inline function 'community.flock.wirespec.openapi.v3.OpenApiV3Parser.flatten.<anonymous>' call
3971
4088
  // Inline function 'kotlin.collections.flatMap' call
3972
- var tmp_9;
4089
+ var tmp_11;
3973
4090
  if (element_1 instanceof ReferenceObject_0) {
3974
4091
  // Inline function 'kotlin.collections.orEmpty' call
3975
- var tmp0_elvis_lhs_0 = resolveSchemaObject_0(element_1, $this).wd_1.d1v_1;
3976
- tmp_9 = tmp0_elvis_lhs_0 == null ? emptyMap() : tmp0_elvis_lhs_0;
4092
+ var tmp0_elvis_lhs_0 = resolveSchemaObject_0(_this__u8e3s4, OpenApiV3Parser_instance, element_1).wd_1.d1v_1;
4093
+ tmp_11 = tmp0_elvis_lhs_0 == null ? emptyMap() : tmp0_elvis_lhs_0;
3977
4094
  } else {
3978
4095
  if (element_1 instanceof SchemaObject_0) {
3979
4096
  // Inline function 'kotlin.collections.orEmpty' call
3980
4097
  var tmp0_elvis_lhs_1 = element_1.d1v_1;
3981
- tmp_9 = tmp0_elvis_lhs_1 == null ? emptyMap() : tmp0_elvis_lhs_1;
4098
+ tmp_11 = tmp0_elvis_lhs_1 == null ? emptyMap() : tmp0_elvis_lhs_1;
3982
4099
  } else {
3983
4100
  noWhenBranchMatchedException();
3984
4101
  }
3985
4102
  }
3986
4103
  // Inline function 'kotlin.collections.flatMapTo' call
3987
- var this_4 = tmp_9;
4104
+ var this_4 = tmp_11;
3988
4105
  var destination_3 = ArrayList_init_$Create$();
3989
4106
  // Inline function 'kotlin.collections.iterator' call
3990
4107
  var tmp0_iterator_4 = this_4.n2().v();
@@ -3995,33 +4112,33 @@
3995
4112
  var key_0 = element_2.o2();
3996
4113
  // Inline function 'kotlin.collections.component2' call
3997
4114
  var value = element_2.p2();
3998
- var list_2 = flatten_2(value, $this, Common_instance.d2c([name, key_0]));
4115
+ var list_2 = flatten_2(_this__u8e3s4, OpenApiV3Parser_instance, value, Common_instance.e2c([name, key_0]));
3999
4116
  addAll(destination_3, list_2);
4000
4117
  }
4001
4118
  var list_3 = destination_3;
4002
4119
  addAll(destination_2, list_3);
4003
4120
  }
4004
- tmp = plus(tmp_8, destination_2);
4005
- } else if (!(_this__u8e3s4.x1v_1 == null)) {
4121
+ tmp = plus(tmp_10, destination_2);
4122
+ } else if (!(schemaObject.x1v_1 == null)) {
4006
4123
  // Inline function 'kotlin.let' call
4007
4124
  // Inline function 'kotlin.collections.map' call
4008
- var this_5 = ensureNotNull(_this__u8e3s4.x1v_1);
4125
+ var this_5 = ensureNotNull(schemaObject.x1v_1);
4009
4126
  // Inline function 'kotlin.collections.mapTo' call
4010
4127
  var destination_4 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_5, 10));
4011
4128
  var tmp0_iterator_5 = this_5.v();
4012
4129
  while (tmp0_iterator_5.w()) {
4013
4130
  var item_0 = tmp0_iterator_5.y();
4014
4131
  // Inline function 'community.flock.wirespec.openapi.v3.OpenApiV3Parser.flatten.<anonymous>' call
4015
- var tmp$ret$25 = item_0.d16();
4016
- destination_4.s(tmp$ret$25);
4132
+ var tmp$ret$29 = item_0.d16();
4133
+ destination_4.s(tmp$ret$29);
4017
4134
  }
4018
4135
  // Inline function 'kotlin.contracts.contract' call
4019
4136
  // Inline function 'community.flock.wirespec.openapi.v3.OpenApiV3Parser.flatten.<anonymous>' call
4020
4137
  var it = toSet(destination_4);
4021
4138
  tmp = listOf(new Enum(null, Companion_instance.w28(name), it));
4022
4139
  } else {
4023
- var tmp5_subject = _this__u8e3s4.x1u_1;
4024
- var tmp_10;
4140
+ var tmp5_subject = schemaObject.x1u_1;
4141
+ var tmp_12;
4025
4142
  switch (tmp5_subject == null ? -1 : tmp5_subject.g9_1) {
4026
4143
  case -1:
4027
4144
  case 5:
@@ -4029,7 +4146,7 @@
4029
4146
 
4030
4147
  // Inline function 'kotlin.collections.orEmpty' call
4031
4148
 
4032
- var tmp0_elvis_lhs_2 = _this__u8e3s4.d1v_1;
4149
+ var tmp0_elvis_lhs_2 = schemaObject.d1v_1;
4033
4150
  // Inline function 'kotlin.collections.flatMapTo' call
4034
4151
 
4035
4152
  var this_6 = tmp0_elvis_lhs_2 == null ? emptyMap() : tmp0_elvis_lhs_2;
@@ -4044,53 +4161,53 @@
4044
4161
  var key_1 = element_3.o2();
4045
4162
  // Inline function 'kotlin.collections.component2' call
4046
4163
  var value_0 = element_3.p2();
4047
- var list_4 = flatten_2(value_0, $this, Common_instance.d2c([name, key_1]));
4164
+ var list_4 = flatten_2(_this__u8e3s4, OpenApiV3Parser_instance, value_0, Common_instance.e2c([name, key_1]));
4048
4165
  addAll(destination_5, list_4);
4049
4166
  }
4050
4167
 
4051
4168
  var fields = destination_5;
4052
- var schema = listOf(new Type(null, Companion_instance.w28(name), new Shape(toField_2(_this__u8e3s4, $this, name))));
4053
- tmp_10 = plus(schema, fields);
4169
+ var schema = listOf(new Type(null, Companion_instance.w28(name), new Shape(toField_2(_this__u8e3s4, $this, schemaObject, name))));
4170
+ tmp_12 = plus(schema, fields);
4054
4171
  break;
4055
4172
  case 4:
4056
- var tmp6_safe_receiver = _this__u8e3s4.c1v_1;
4057
- var tmp_11;
4173
+ var tmp6_safe_receiver = schemaObject.c1v_1;
4174
+ var tmp_13;
4058
4175
  if (tmp6_safe_receiver == null) {
4059
- tmp_11 = null;
4176
+ tmp_13 = null;
4060
4177
  } else {
4061
4178
  // Inline function 'kotlin.let' call
4062
4179
  // Inline function 'kotlin.contracts.contract' call
4063
4180
  // Inline function 'community.flock.wirespec.openapi.v3.OpenApiV3Parser.flatten.<anonymous>' call
4064
- var tmp_12;
4181
+ var tmp_14;
4065
4182
  if (tmp6_safe_receiver instanceof ReferenceObject_0) {
4066
- tmp_12 = emptyList();
4183
+ tmp_14 = emptyList();
4067
4184
  } else {
4068
4185
  if (tmp6_safe_receiver instanceof SchemaObject_0) {
4069
- tmp_12 = flatten_1(tmp6_safe_receiver, $this, Common_instance.d2c([name, 'array']));
4186
+ tmp_14 = flatten_1(_this__u8e3s4, OpenApiV3Parser_instance, tmp6_safe_receiver, Common_instance.e2c([name, 'array']));
4070
4187
  } else {
4071
4188
  noWhenBranchMatchedException();
4072
4189
  }
4073
4190
  }
4074
- tmp_11 = tmp_12;
4191
+ tmp_13 = tmp_14;
4075
4192
  }
4076
4193
 
4077
- var tmp7_elvis_lhs = tmp_11;
4078
- tmp_10 = tmp7_elvis_lhs == null ? emptyList() : tmp7_elvis_lhs;
4194
+ var tmp7_elvis_lhs = tmp_13;
4195
+ tmp_12 = tmp7_elvis_lhs == null ? emptyList() : tmp7_elvis_lhs;
4079
4196
  break;
4080
4197
  default:
4081
- tmp_10 = emptyList();
4198
+ tmp_12 = emptyList();
4082
4199
  break;
4083
4200
  }
4084
- tmp = tmp_10;
4201
+ tmp = tmp_12;
4085
4202
  }
4086
4203
  return tmp;
4087
4204
  }
4088
- function flatten_2(_this__u8e3s4, $this, name) {
4205
+ function flatten_2(_this__u8e3s4, $this, schemaOrReference, name) {
4089
4206
  var tmp;
4090
- if (_this__u8e3s4 instanceof SchemaObject_0) {
4091
- tmp = flatten_1(_this__u8e3s4, $this, name);
4207
+ if (schemaOrReference instanceof SchemaObject_0) {
4208
+ tmp = flatten_1(_this__u8e3s4, $this, schemaOrReference, name);
4092
4209
  } else {
4093
- if (_this__u8e3s4 instanceof ReferenceObject_0) {
4210
+ if (schemaOrReference instanceof ReferenceObject_0) {
4094
4211
  tmp = emptyList();
4095
4212
  } else {
4096
4213
  noWhenBranchMatchedException();
@@ -4098,11 +4215,11 @@
4098
4215
  }
4099
4216
  return tmp;
4100
4217
  }
4101
- function toReference_1(_this__u8e3s4, $this) {
4218
+ function toReference_1(_this__u8e3s4, $this, reference) {
4102
4219
  // Inline function 'kotlin.let' call
4103
4220
  // Inline function 'kotlin.contracts.contract' call
4104
4221
  // Inline function 'community.flock.wirespec.openapi.v3.OpenApiV3Parser.toReference.<anonymous>' call
4105
- var name_for_destructuring_parameter_0_fjsvno = resolveSchemaObject_0(_this__u8e3s4, $this);
4222
+ var name_for_destructuring_parameter_0_fjsvno = resolveSchemaObject_0(_this__u8e3s4, $this, reference);
4106
4223
  var referencingObject = name_for_destructuring_parameter_0_fjsvno.jd();
4107
4224
  var schema = name_for_destructuring_parameter_0_fjsvno.kd();
4108
4225
  var tmp;
@@ -4113,10 +4230,10 @@
4113
4230
  tmp_0 = new Any(false, true);
4114
4231
  } else {
4115
4232
  if (additionalProperties instanceof ReferenceObject_0) {
4116
- tmp_0 = toMap_1(toReference_1(additionalProperties, $this));
4233
+ tmp_0 = toMap_1(toReference_1(_this__u8e3s4, OpenApiV3Parser_instance, additionalProperties));
4117
4234
  } else {
4118
4235
  if (additionalProperties instanceof SchemaObject_0) {
4119
- tmp_0 = toMap_1(toReference_2(additionalProperties, $this, getReference_0(_this__u8e3s4, $this)));
4236
+ tmp_0 = toMap_1(toReference_2(_this__u8e3s4, OpenApiV3Parser_instance, additionalProperties, getReference_0(reference, OpenApiV3Parser_instance)));
4120
4237
  } else {
4121
4238
  noWhenBranchMatchedException();
4122
4239
  }
@@ -4124,9 +4241,9 @@
4124
4241
  }
4125
4242
  tmp = tmp_0;
4126
4243
  } else if (!(schema.x1v_1 == null)) {
4127
- tmp = new Custom(Common_instance.d2c([getReference_0(referencingObject, $this)]), false, false);
4244
+ tmp = new Custom(Common_instance.e2c([getReference_0(referencingObject, OpenApiV3Parser_instance)]), false, false);
4128
4245
  } else if (isPrimitive_0(schema.x1u_1)) {
4129
- tmp = new Primitive(toPrimitive_0(ensureNotNull(schema.x1u_1), $this), false, false);
4246
+ tmp = new Primitive(toPrimitive_0(ensureNotNull(schema.x1u_1), OpenApiV3Parser_instance), false, false);
4130
4247
  } else {
4131
4248
  var tmp0_subject = schema.x1u_1;
4132
4249
  var tmp_1;
@@ -4134,13 +4251,13 @@
4134
4251
  var items = schema.c1v_1;
4135
4252
  var tmp_2;
4136
4253
  if (items instanceof ReferenceObject_0) {
4137
- tmp_2 = new Custom(Common_instance.d2c([getReference_0(items, $this)]), true);
4254
+ tmp_2 = new Custom(Common_instance.e2c([getReference_0(items, OpenApiV3Parser_instance)]), true);
4138
4255
  } else {
4139
4256
  if (items instanceof SchemaObject_0) {
4140
- tmp_2 = new Custom(Common_instance.d2c([getReference_0(referencingObject, $this), 'Array']), true);
4257
+ tmp_2 = new Custom(Common_instance.e2c([getReference_0(referencingObject, OpenApiV3Parser_instance), 'Array']), true);
4141
4258
  } else {
4142
4259
  if (items == null) {
4143
- var message = 'items cannot be null when type is array: ' + new Ref_0(_this__u8e3s4.l1u_1);
4260
+ var message = 'items cannot be null when type is array: ' + new Ref_0(reference.l1u_1);
4144
4261
  throw IllegalStateException_init_$Create$(toString(message));
4145
4262
  } else {
4146
4263
  noWhenBranchMatchedException();
@@ -4149,22 +4266,22 @@
4149
4266
  }
4150
4267
  tmp_1 = tmp_2;
4151
4268
  } else {
4152
- tmp_1 = new Custom(Common_instance.d2c([getReference_0(referencingObject, $this)]), false);
4269
+ tmp_1 = new Custom(Common_instance.e2c([getReference_0(referencingObject, OpenApiV3Parser_instance)]), false);
4153
4270
  }
4154
4271
  tmp = tmp_1;
4155
4272
  }
4156
4273
  return tmp;
4157
4274
  }
4158
- function toReference_2(_this__u8e3s4, $this, name) {
4275
+ function toReference_2(_this__u8e3s4, $this, schema, name) {
4159
4276
  var tmp;
4160
- if (!(_this__u8e3s4.e1v_1 == null)) {
4161
- var additionalProperties = ensureNotNull(_this__u8e3s4.e1v_1);
4277
+ if (!(schema.e1v_1 == null)) {
4278
+ var additionalProperties = ensureNotNull(schema.e1v_1);
4162
4279
  var tmp_0;
4163
4280
  if (additionalProperties instanceof BooleanObject_0) {
4164
4281
  tmp_0 = new Any(false, true);
4165
4282
  } else {
4166
4283
  if (additionalProperties instanceof ReferenceObject_0) {
4167
- tmp_0 = toMap_1(toReference_1(additionalProperties, $this));
4284
+ tmp_0 = toMap_1(toReference_1(_this__u8e3s4, $this, additionalProperties));
4168
4285
  } else {
4169
4286
  if (additionalProperties instanceof SchemaObject_0) {
4170
4287
  // Inline function 'kotlin.takeIf' call
@@ -4181,10 +4298,10 @@
4181
4298
  if (tmp0_safe_receiver == null) {
4182
4299
  tmp_2 = null;
4183
4300
  } else {
4184
- // Inline function 'kotlin.run' call
4301
+ // Inline function 'kotlin.let' call
4185
4302
  // Inline function 'kotlin.contracts.contract' call
4186
4303
  // Inline function 'community.flock.wirespec.openapi.v3.OpenApiV3Parser.toReference.<anonymous>' call
4187
- tmp_2 = toMap_1(toReference_2(tmp0_safe_receiver, $this, name));
4304
+ tmp_2 = toMap_1(toReference_2(_this__u8e3s4, OpenApiV3Parser_instance, tmp0_safe_receiver, name));
4188
4305
  }
4189
4306
  var tmp1_elvis_lhs = tmp_2;
4190
4307
  tmp_0 = tmp1_elvis_lhs == null ? new Any(false, true) : tmp1_elvis_lhs;
@@ -4194,38 +4311,38 @@
4194
4311
  }
4195
4312
  }
4196
4313
  tmp = tmp_0;
4197
- } else if (!(_this__u8e3s4.x1v_1 == null)) {
4198
- tmp = new Custom(name, false, !(_this__u8e3s4.e1v_1 == null));
4314
+ } else if (!(schema.x1v_1 == null)) {
4315
+ tmp = new Custom(name, false, !(schema.e1v_1 == null));
4199
4316
  } else {
4200
- var type = _this__u8e3s4.x1u_1;
4317
+ var type = schema.x1u_1;
4201
4318
  var tmp_3;
4202
4319
  switch (type == null ? -1 : type.g9_1) {
4203
4320
  case 0:
4204
4321
  case 1:
4205
4322
  case 2:
4206
4323
  case 3:
4207
- tmp_3 = new Primitive(toPrimitive_0(type, $this), false, !(_this__u8e3s4.e1v_1 == null));
4324
+ tmp_3 = new Primitive(toPrimitive_0(type, $this), false, !(schema.e1v_1 == null));
4208
4325
  break;
4209
4326
  case -1:
4210
4327
  case 5:
4211
4328
  var tmp_4;
4212
- var tmp_5 = _this__u8e3s4.e1v_1;
4329
+ var tmp_5 = schema.e1v_1;
4213
4330
  if (tmp_5 instanceof BooleanObject_0) {
4214
- tmp_4 = new Any(false, !(_this__u8e3s4.e1v_1 == null));
4331
+ tmp_4 = new Any(false, !(schema.e1v_1 == null));
4215
4332
  } else {
4216
- tmp_4 = new Custom(name, false, !(_this__u8e3s4.e1v_1 == null));
4333
+ tmp_4 = new Custom(name, false, !(schema.e1v_1 == null));
4217
4334
  }
4218
4335
 
4219
4336
  tmp_3 = tmp_4;
4220
4337
  break;
4221
4338
  case 4:
4222
- var it = _this__u8e3s4.c1v_1;
4339
+ var it = schema.c1v_1;
4223
4340
  var tmp_6;
4224
4341
  if (it instanceof ReferenceObject_0) {
4225
- tmp_6 = toIterable_0(toReference_1(it, $this));
4342
+ tmp_6 = toIterable_0(toReference_1(_this__u8e3s4, $this, it));
4226
4343
  } else {
4227
4344
  if (it instanceof SchemaObject_0) {
4228
- tmp_6 = toIterable_0(toReference_2(it, $this, name));
4345
+ tmp_6 = toIterable_0(toReference_2(_this__u8e3s4, $this, it, name));
4229
4346
  } else {
4230
4347
  if (it == null) {
4231
4348
  var message = 'When schema is of type array items cannot be null for name: ' + name;
@@ -4247,6 +4364,7 @@
4247
4364
  return tmp;
4248
4365
  }
4249
4366
  function toOperationList_0(_this__u8e3s4, $this) {
4367
+ var tmp = Common_instance;
4250
4368
  // Inline function 'kotlin.collections.associateWith' call
4251
4369
  var this_0 = get_entries();
4252
4370
  var result = LinkedHashMap_init_$Create$(coerceAtLeast(mapCapacity(collectionSizeOrDefault(this_0, 10)), 16));
@@ -4255,40 +4373,40 @@
4255
4373
  while (tmp0_iterator.w()) {
4256
4374
  var element = tmp0_iterator.y();
4257
4375
  // Inline function 'community.flock.wirespec.openapi.v3.OpenApiV3Parser.toOperationList.<anonymous>' call
4258
- var tmp;
4376
+ var tmp_0;
4259
4377
  switch (element.g9_1) {
4260
4378
  case 0:
4261
- tmp = _this__u8e3s4.e1q_1;
4379
+ tmp_0 = _this__u8e3s4.e1q_1;
4262
4380
  break;
4263
4381
  case 1:
4264
- tmp = _this__u8e3s4.g1q_1;
4382
+ tmp_0 = _this__u8e3s4.g1q_1;
4265
4383
  break;
4266
4384
  case 2:
4267
- tmp = _this__u8e3s4.f1q_1;
4385
+ tmp_0 = _this__u8e3s4.f1q_1;
4268
4386
  break;
4269
4387
  case 3:
4270
- tmp = _this__u8e3s4.h1q_1;
4388
+ tmp_0 = _this__u8e3s4.h1q_1;
4271
4389
  break;
4272
4390
  case 4:
4273
- tmp = _this__u8e3s4.i1q_1;
4391
+ tmp_0 = _this__u8e3s4.i1q_1;
4274
4392
  break;
4275
4393
  case 5:
4276
- tmp = _this__u8e3s4.j1q_1;
4394
+ tmp_0 = _this__u8e3s4.j1q_1;
4277
4395
  break;
4278
4396
  case 6:
4279
- tmp = _this__u8e3s4.k1q_1;
4397
+ tmp_0 = _this__u8e3s4.k1q_1;
4280
4398
  break;
4281
4399
  case 7:
4282
- tmp = _this__u8e3s4.l1q_1;
4400
+ tmp_0 = _this__u8e3s4.l1q_1;
4283
4401
  break;
4284
4402
  default:
4285
4403
  noWhenBranchMatchedException();
4286
4404
  break;
4287
4405
  }
4288
- var tmp$ret$0 = tmp;
4406
+ var tmp$ret$0 = tmp_0;
4289
4407
  result.l2(element, tmp$ret$0);
4290
4408
  }
4291
- return filterNotNullValues_0(result);
4409
+ return tmp.f2c(result);
4292
4410
  }
4293
4411
  function getReference_0(_this__u8e3s4, $this) {
4294
4412
  var tmp0_elvis_lhs = getOrNull(split(_Ref___get_value__impl__kxavfe_0(_this__u8e3s4.l1u_1), ['/']), 3);
@@ -4322,10 +4440,10 @@
4322
4440
  }
4323
4441
  return tmp;
4324
4442
  }
4325
- function toField_2(_this__u8e3s4, $this, name) {
4443
+ function toField_2(_this__u8e3s4, $this, schema, name) {
4326
4444
  // Inline function 'kotlin.collections.map' call
4327
4445
  // Inline function 'kotlin.collections.orEmpty' call
4328
- var tmp0_elvis_lhs = _this__u8e3s4.d1v_1;
4446
+ var tmp0_elvis_lhs = schema.d1v_1;
4329
4447
  var this_0 = tmp0_elvis_lhs == null ? emptyMap() : tmp0_elvis_lhs;
4330
4448
  // Inline function 'kotlin.collections.mapTo' call
4331
4449
  var destination = ArrayList_init_$Create$_0(this_0.p());
@@ -4341,15 +4459,15 @@
4341
4459
  var tmp;
4342
4460
  if (value instanceof SchemaObject_0) {
4343
4461
  var tmp_0 = Companion_instance.w28(key);
4344
- var tmp_1 = !(value.x1v_1 == null) ? toReference_2(value, $this, Common_instance.d2c([name, key])) : equals(value.x1u_1, Type_ARRAY_getInstance_0()) ? toReference_2(value, $this, Common_instance.d2c([name, key, 'Array'])) : toReference_2(value, $this, Common_instance.d2c([name, key]));
4345
- var tmp1_safe_receiver = _this__u8e3s4.w1v_1;
4462
+ var tmp_1 = !(value.x1v_1 == null) ? toReference_2(_this__u8e3s4, OpenApiV3Parser_instance, value, Common_instance.e2c([name, key])) : equals(value.x1u_1, Type_ARRAY_getInstance_0()) ? toReference_2(_this__u8e3s4, OpenApiV3Parser_instance, value, Common_instance.e2c([name, key, 'Array'])) : toReference_2(_this__u8e3s4, OpenApiV3Parser_instance, value, Common_instance.e2c([name, key]));
4463
+ var tmp1_safe_receiver = schema.w1v_1;
4346
4464
  var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.r(key);
4347
4465
  tmp = new Field(tmp_0, tmp_1, !(tmp2_elvis_lhs == null ? false : tmp2_elvis_lhs));
4348
4466
  } else {
4349
4467
  if (value instanceof ReferenceObject_0) {
4350
4468
  var tmp_2 = Companion_instance.w28(key);
4351
- var tmp_3 = new Custom(Common_instance.d2c([getReference_0(value, $this)]), false);
4352
- var tmp3_safe_receiver = _this__u8e3s4.w1v_1;
4469
+ var tmp_3 = new Custom(Common_instance.e2c([getReference_0(value, OpenApiV3Parser_instance)]), false);
4470
+ var tmp3_safe_receiver = schema.w1v_1;
4353
4471
  var tmp4_elvis_lhs = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.r(key);
4354
4472
  tmp = new Field(tmp_2, tmp_3, !(tmp4_elvis_lhs == null ? false : tmp4_elvis_lhs));
4355
4473
  } else {
@@ -4361,15 +4479,15 @@
4361
4479
  }
4362
4480
  return destination;
4363
4481
  }
4364
- function toField_3(_this__u8e3s4, $this, name) {
4482
+ function toField_3(_this__u8e3s4, $this, parameter, name) {
4365
4483
  // Inline function 'kotlin.let' call
4366
- var s = _this__u8e3s4.b1u_1;
4484
+ var s = parameter.b1u_1;
4367
4485
  var tmp;
4368
4486
  if (s instanceof ReferenceObject_0) {
4369
- tmp = toReference_1(s, $this);
4487
+ tmp = toReference_1(_this__u8e3s4, $this, s);
4370
4488
  } else {
4371
4489
  if (s instanceof SchemaObject_0) {
4372
- tmp = toReference_2(s, $this, name);
4490
+ tmp = toReference_2(_this__u8e3s4, $this, s, name);
4373
4491
  } else {
4374
4492
  if (s == null) {
4375
4493
  var reason = 'Not yet implemented';
@@ -4382,19 +4500,19 @@
4382
4500
  // Inline function 'kotlin.contracts.contract' call
4383
4501
  // Inline function 'community.flock.wirespec.openapi.v3.OpenApiV3Parser.toField.<anonymous>' call
4384
4502
  var it = tmp;
4385
- var tmp_0 = Companion_instance.w28(_this__u8e3s4.f1u_1);
4386
- var tmp0_elvis_lhs = _this__u8e3s4.v1t_1;
4503
+ var tmp_0 = Companion_instance.w28(parameter.f1u_1);
4504
+ var tmp0_elvis_lhs = parameter.v1t_1;
4387
4505
  return new Field(tmp_0, it, !(tmp0_elvis_lhs == null ? false : tmp0_elvis_lhs));
4388
4506
  }
4389
- function toField_4(_this__u8e3s4, $this, identifier, name) {
4507
+ function toField_4(_this__u8e3s4, $this, header, identifier, name) {
4390
4508
  // Inline function 'kotlin.let' call
4391
- var s = _this__u8e3s4.b1x_1;
4509
+ var s = header.b1x_1;
4392
4510
  var tmp;
4393
4511
  if (s instanceof ReferenceObject_0) {
4394
- tmp = toReference_1(s, $this);
4512
+ tmp = toReference_1(_this__u8e3s4, $this, s);
4395
4513
  } else {
4396
4514
  if (s instanceof SchemaObject_0) {
4397
- tmp = toReference_2(s, $this, name);
4515
+ tmp = toReference_2(_this__u8e3s4, $this, s, name);
4398
4516
  } else {
4399
4517
  if (s == null) {
4400
4518
  var reason = 'Not yet implemented';
@@ -4408,23 +4526,23 @@
4408
4526
  // Inline function 'community.flock.wirespec.openapi.v3.OpenApiV3Parser.toField.<anonymous>' call
4409
4527
  var it = tmp;
4410
4528
  var tmp_0 = Companion_instance.w28(identifier);
4411
- var tmp0_elvis_lhs = _this__u8e3s4.v1w_1;
4529
+ var tmp0_elvis_lhs = header.v1w_1;
4412
4530
  return new Field(tmp_0, it, !(tmp0_elvis_lhs == null ? false : tmp0_elvis_lhs));
4413
4531
  }
4414
4532
  function FlattenRequest_0(path, pathItem, method, operation) {
4415
- this.a2d_1 = path;
4416
- this.b2d_1 = pathItem;
4417
- this.c2d_1 = method;
4418
- this.d2d_1 = operation;
4533
+ this.z2c_1 = path;
4534
+ this.a2d_1 = pathItem;
4535
+ this.b2d_1 = method;
4536
+ this.c2d_1 = operation;
4419
4537
  }
4420
4538
  protoOf(FlattenRequest_0).toString = function () {
4421
- return 'FlattenRequest(path=' + new Path_0(this.a2d_1) + ', pathItem=' + this.b2d_1 + ', method=' + this.c2d_1 + ', operation=' + this.d2d_1 + ')';
4539
+ return 'FlattenRequest(path=' + new Path_0(this.z2c_1) + ', pathItem=' + this.a2d_1 + ', method=' + this.b2d_1 + ', operation=' + this.c2d_1 + ')';
4422
4540
  };
4423
4541
  protoOf(FlattenRequest_0).hashCode = function () {
4424
- var result = Path__hashCode_impl_go73kd_0(this.a2d_1);
4542
+ var result = Path__hashCode_impl_go73kd_0(this.z2c_1);
4543
+ result = imul(result, 31) + this.a2d_1.hashCode() | 0;
4425
4544
  result = imul(result, 31) + this.b2d_1.hashCode() | 0;
4426
4545
  result = imul(result, 31) + this.c2d_1.hashCode() | 0;
4427
- result = imul(result, 31) + this.d2d_1.hashCode() | 0;
4428
4546
  return result;
4429
4547
  };
4430
4548
  protoOf(FlattenRequest_0).equals = function (other) {
@@ -4433,14 +4551,14 @@
4433
4551
  if (!(other instanceof FlattenRequest_0))
4434
4552
  return false;
4435
4553
  var tmp0_other_with_cast = other instanceof FlattenRequest_0 ? other : THROW_CCE();
4436
- if (!(this.a2d_1 === tmp0_other_with_cast.a2d_1))
4554
+ if (!(this.z2c_1 === tmp0_other_with_cast.z2c_1))
4555
+ return false;
4556
+ if (!this.a2d_1.equals(tmp0_other_with_cast.a2d_1))
4437
4557
  return false;
4438
4558
  if (!this.b2d_1.equals(tmp0_other_with_cast.b2d_1))
4439
4559
  return false;
4440
4560
  if (!this.c2d_1.equals(tmp0_other_with_cast.c2d_1))
4441
4561
  return false;
4442
- if (!this.d2d_1.equals(tmp0_other_with_cast.d2d_1))
4443
- return false;
4444
4562
  return true;
4445
4563
  };
4446
4564
  function flatMapRequests_0(_this__u8e3s4, $this, f) {
@@ -4459,7 +4577,7 @@
4459
4577
  // Inline function 'kotlin.collections.component2' call
4460
4578
  var pathItem = element.p2();
4461
4579
  // Inline function 'kotlin.collections.map' call
4462
- var this_1 = toOperationList_0(pathItem, $this);
4580
+ var this_1 = toOperationList_0(pathItem, OpenApiV3Parser_instance);
4463
4581
  // Inline function 'kotlin.collections.mapTo' call
4464
4582
  var destination_0 = ArrayList_init_$Create$_0(this_1.p());
4465
4583
  // Inline function 'kotlin.collections.iterator' call
@@ -4482,30 +4600,29 @@
4482
4600
  var tmp0_iterator_1 = destination.v();
4483
4601
  while (tmp0_iterator_1.w()) {
4484
4602
  var element_0 = tmp0_iterator_1.y();
4485
- // Inline function 'community.flock.wirespec.openapi.v3.OpenApiV3Parser.flatMapRequests.<anonymous>' call
4486
4603
  var list_0 = f(element_0);
4487
4604
  addAll(destination_1, list_0);
4488
4605
  }
4489
4606
  return destination_1;
4490
4607
  }
4491
4608
  function FlattenResponse_0(path, pathItem, method, operation, statusCode, response) {
4492
- this.e2d_1 = path;
4493
- this.f2d_1 = pathItem;
4494
- this.g2d_1 = method;
4495
- this.h2d_1 = operation;
4496
- this.i2d_1 = statusCode;
4497
- this.j2d_1 = response;
4609
+ this.d2d_1 = path;
4610
+ this.e2d_1 = pathItem;
4611
+ this.f2d_1 = method;
4612
+ this.g2d_1 = operation;
4613
+ this.h2d_1 = statusCode;
4614
+ this.i2d_1 = response;
4498
4615
  }
4499
4616
  protoOf(FlattenResponse_0).toString = function () {
4500
- return 'FlattenResponse(path=' + new Path_0(this.e2d_1) + ', pathItem=' + this.f2d_1 + ', method=' + this.g2d_1 + ', operation=' + this.h2d_1 + ', statusCode=' + new StatusCode_0(this.i2d_1) + ', response=' + this.j2d_1 + ')';
4617
+ return 'FlattenResponse(path=' + new Path_0(this.d2d_1) + ', pathItem=' + this.e2d_1 + ', method=' + this.f2d_1 + ', operation=' + this.g2d_1 + ', statusCode=' + new StatusCode_0(this.h2d_1) + ', response=' + this.i2d_1 + ')';
4501
4618
  };
4502
4619
  protoOf(FlattenResponse_0).hashCode = function () {
4503
- var result = Path__hashCode_impl_go73kd_0(this.e2d_1);
4620
+ var result = Path__hashCode_impl_go73kd_0(this.d2d_1);
4621
+ result = imul(result, 31) + this.e2d_1.hashCode() | 0;
4504
4622
  result = imul(result, 31) + this.f2d_1.hashCode() | 0;
4505
4623
  result = imul(result, 31) + this.g2d_1.hashCode() | 0;
4506
- result = imul(result, 31) + this.h2d_1.hashCode() | 0;
4507
- result = imul(result, 31) + StatusCode__hashCode_impl_fevhvx_0(this.i2d_1) | 0;
4508
- result = imul(result, 31) + hashCode(this.j2d_1) | 0;
4624
+ result = imul(result, 31) + StatusCode__hashCode_impl_fevhvx_0(this.h2d_1) | 0;
4625
+ result = imul(result, 31) + hashCode(this.i2d_1) | 0;
4509
4626
  return result;
4510
4627
  };
4511
4628
  protoOf(FlattenResponse_0).equals = function (other) {
@@ -4514,17 +4631,17 @@
4514
4631
  if (!(other instanceof FlattenResponse_0))
4515
4632
  return false;
4516
4633
  var tmp0_other_with_cast = other instanceof FlattenResponse_0 ? other : THROW_CCE();
4517
- if (!(this.e2d_1 === tmp0_other_with_cast.e2d_1))
4634
+ if (!(this.d2d_1 === tmp0_other_with_cast.d2d_1))
4635
+ return false;
4636
+ if (!this.e2d_1.equals(tmp0_other_with_cast.e2d_1))
4518
4637
  return false;
4519
4638
  if (!this.f2d_1.equals(tmp0_other_with_cast.f2d_1))
4520
4639
  return false;
4521
4640
  if (!this.g2d_1.equals(tmp0_other_with_cast.g2d_1))
4522
4641
  return false;
4523
- if (!this.h2d_1.equals(tmp0_other_with_cast.h2d_1))
4642
+ if (!(this.h2d_1 === tmp0_other_with_cast.h2d_1))
4524
4643
  return false;
4525
- if (!(this.i2d_1 === tmp0_other_with_cast.i2d_1))
4526
- return false;
4527
- if (!equals(this.j2d_1, tmp0_other_with_cast.j2d_1))
4644
+ if (!equals(this.i2d_1, tmp0_other_with_cast.i2d_1))
4528
4645
  return false;
4529
4646
  return true;
4530
4647
  };
@@ -4545,7 +4662,7 @@
4545
4662
  var pathItem = element.p2();
4546
4663
  // Inline function 'kotlin.collections.flatMap' call
4547
4664
  // Inline function 'kotlin.collections.flatMapTo' call
4548
- var this_1 = toOperationList_0(pathItem, $this);
4665
+ var this_1 = toOperationList_0(pathItem, OpenApiV3Parser_instance);
4549
4666
  var destination_0 = ArrayList_init_$Create$();
4550
4667
  // Inline function 'kotlin.collections.iterator' call
4551
4668
  var tmp0_iterator_0 = this_1.n2().v();
@@ -4591,17 +4708,23 @@
4591
4708
  var tmp0_iterator_2 = destination.v();
4592
4709
  while (tmp0_iterator_2.w()) {
4593
4710
  var element_1 = tmp0_iterator_2.y();
4594
- // Inline function 'community.flock.wirespec.openapi.v3.OpenApiV3Parser.flatMapResponses.<anonymous>' call
4595
4711
  var list_1 = f(element_1);
4596
4712
  addAll(destination_2, list_1);
4597
4713
  }
4598
4714
  return destination_2;
4599
4715
  }
4600
- function OpenApiV3Parser$parseParameters$lambda(this$0) {
4601
- return function (req) {
4602
- var parameters = plus(resolveParameters_2(req.b2d_1, this$0), resolveParameters_1(req.d2d_1, this$0));
4603
- var tmp0_elvis_lhs = toName_1(req.d2d_1, this$0);
4604
- var name = tmp0_elvis_lhs == null ? toName_2(req.a2d_1, this$0) + req.c2d_1.f9_1 : tmp0_elvis_lhs;
4716
+ function OpenApiV3Parser$parse$lambda($strict) {
4717
+ return function ($this$Json) {
4718
+ $this$Json.f15_1 = true;
4719
+ $this$Json.c15_1 = $strict;
4720
+ return Unit_instance;
4721
+ };
4722
+ }
4723
+ function OpenApiV3Parser$parseParameters$lambda($this_parseParameters) {
4724
+ return function ($this$flatMapRequests) {
4725
+ var parameters = plus(resolveParameters_2($this_parseParameters, OpenApiV3Parser_instance, $this$flatMapRequests.a2d_1), resolveParameters_1($this_parseParameters, OpenApiV3Parser_instance, $this$flatMapRequests.c2d_1));
4726
+ var tmp0_elvis_lhs = toName_1($this$flatMapRequests.c2d_1, OpenApiV3Parser_instance);
4727
+ var name = tmp0_elvis_lhs == null ? toName_2($this$flatMapRequests.z2c_1, OpenApiV3Parser_instance) + $this$flatMapRequests.b2d_1.f9_1 : tmp0_elvis_lhs;
4605
4728
  // Inline function 'kotlin.collections.flatMap' call
4606
4729
  // Inline function 'kotlin.collections.flatMapTo' call
4607
4730
  var destination = ArrayList_init_$Create$();
@@ -4610,21 +4733,39 @@
4610
4733
  var element = tmp0_iterator.y();
4611
4734
  // Inline function 'community.flock.wirespec.openapi.v3.OpenApiV3Parser.parseParameters.<anonymous>.<anonymous>' call
4612
4735
  var tmp0_safe_receiver = element.b1u_1;
4613
- var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : flatten_2(tmp0_safe_receiver, this$0, Common_instance.d2c([name, 'Parameter', element.f1u_1]));
4736
+ var tmp;
4737
+ if (tmp0_safe_receiver == null) {
4738
+ tmp = null;
4739
+ } else {
4740
+ // Inline function 'kotlin.let' call
4741
+ // Inline function 'kotlin.contracts.contract' call
4742
+ // Inline function 'community.flock.wirespec.openapi.v3.OpenApiV3Parser.parseParameters.<anonymous>.<anonymous>.<anonymous>' call
4743
+ tmp = flatten_2($this_parseParameters, OpenApiV3Parser_instance, tmp0_safe_receiver, Common_instance.e2c([name, 'Parameter', element.f1u_1]));
4744
+ }
4745
+ var tmp1_elvis_lhs = tmp;
4614
4746
  var list = tmp1_elvis_lhs == null ? emptyList() : tmp1_elvis_lhs;
4615
4747
  addAll(destination, list);
4616
4748
  }
4617
4749
  return destination;
4618
4750
  };
4619
4751
  }
4620
- function OpenApiV3Parser$parseRequestBody$lambda(this$0) {
4621
- return function (req) {
4622
- var tmp0_elvis_lhs = toName_1(req.d2d_1, this$0);
4623
- var name = tmp0_elvis_lhs == null ? toName_2(req.a2d_1, this$0) + req.c2d_1.f9_1 : tmp0_elvis_lhs;
4752
+ function OpenApiV3Parser$parseRequestBody$lambda($this_parseRequestBody) {
4753
+ return function ($this$flatMapRequests) {
4754
+ var tmp0_elvis_lhs = toName_1($this$flatMapRequests.c2d_1, OpenApiV3Parser_instance);
4755
+ var name = tmp0_elvis_lhs == null ? toName_2($this$flatMapRequests.z2c_1, OpenApiV3Parser_instance) + $this$flatMapRequests.b2d_1.f9_1 : tmp0_elvis_lhs;
4624
4756
  // Inline function 'kotlin.collections.flatMap' call
4625
4757
  // Inline function 'kotlin.collections.orEmpty' call
4626
- var tmp1_safe_receiver = req.d2d_1.i1s_1;
4627
- var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : resolve_7(tmp1_safe_receiver, this$0);
4758
+ var tmp1_safe_receiver = $this$flatMapRequests.c2d_1.i1s_1;
4759
+ var tmp;
4760
+ if (tmp1_safe_receiver == null) {
4761
+ tmp = null;
4762
+ } else {
4763
+ // Inline function 'kotlin.let' call
4764
+ // Inline function 'kotlin.contracts.contract' call
4765
+ // Inline function 'community.flock.wirespec.openapi.v3.OpenApiV3Parser.parseRequestBody.<anonymous>.<anonymous>' call
4766
+ tmp = resolve_7($this_parseRequestBody, OpenApiV3Parser_instance, tmp1_safe_receiver);
4767
+ }
4768
+ var tmp2_safe_receiver = tmp;
4628
4769
  var tmp0_elvis_lhs_0 = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.p1w_1;
4629
4770
  // Inline function 'kotlin.collections.flatMapTo' call
4630
4771
  var this_0 = tmp0_elvis_lhs_0 == null ? emptyMap() : tmp0_elvis_lhs_0;
@@ -4637,49 +4778,61 @@
4637
4778
  // Inline function 'kotlin.collections.component2' call
4638
4779
  var mediaObject = element.p2();
4639
4780
  var schema = mediaObject.i1y_1;
4640
- var tmp;
4781
+ var tmp_0;
4641
4782
  if (schema instanceof SchemaObject_0) {
4642
4783
  var tmp0_subject = schema.x1u_1;
4643
- var tmp_0;
4784
+ var tmp_1;
4644
4785
  switch (tmp0_subject == null ? -1 : tmp0_subject.g9_1) {
4645
4786
  case -1:
4646
4787
  case 5:
4647
- tmp_0 = flatten_1(schema, this$0, Common_instance.d2c([name, 'RequestBody']));
4788
+ tmp_1 = flatten_1($this_parseRequestBody, OpenApiV3Parser_instance, schema, Common_instance.e2c([name, 'RequestBody']));
4648
4789
  break;
4649
4790
  case 4:
4650
4791
  // Inline function 'kotlin.collections.orEmpty' call
4651
4792
 
4652
4793
  var tmp1_safe_receiver_0 = schema.c1v_1;
4653
- var tmp0_elvis_lhs_1 = tmp1_safe_receiver_0 == null ? null : flatten_2(tmp1_safe_receiver_0, this$0, Common_instance.d2c([name, 'RequestBody']));
4654
- tmp_0 = tmp0_elvis_lhs_1 == null ? emptyList() : tmp0_elvis_lhs_1;
4794
+ var tmp_2;
4795
+ if (tmp1_safe_receiver_0 == null) {
4796
+ tmp_2 = null;
4797
+ } else {
4798
+ // Inline function 'kotlin.let' call
4799
+ // Inline function 'kotlin.contracts.contract' call
4800
+ // Inline function 'community.flock.wirespec.openapi.v3.OpenApiV3Parser.parseRequestBody.<anonymous>.<anonymous>.<anonymous>' call
4801
+ tmp_2 = flatten_2($this_parseRequestBody, OpenApiV3Parser_instance, tmp1_safe_receiver_0, Common_instance.e2c([name, 'RequestBody']));
4802
+ }
4803
+
4804
+ var tmp0_elvis_lhs_1 = tmp_2;
4805
+ tmp_1 = tmp0_elvis_lhs_1 == null ? emptyList() : tmp0_elvis_lhs_1;
4655
4806
  break;
4656
4807
  default:
4657
- tmp_0 = emptyList();
4808
+ tmp_1 = emptyList();
4658
4809
  break;
4659
4810
  }
4660
- tmp = tmp_0;
4811
+ tmp_0 = tmp_1;
4661
4812
  } else {
4813
+ var tmp_3;
4662
4814
  if (schema instanceof ReferenceObject_0) {
4663
- tmp = emptyList();
4815
+ tmp_3 = true;
4664
4816
  } else {
4665
- if (schema == null) {
4666
- tmp = emptyList();
4667
- } else {
4668
- noWhenBranchMatchedException();
4669
- }
4817
+ tmp_3 = schema == null;
4818
+ }
4819
+ if (tmp_3) {
4820
+ tmp_0 = emptyList();
4821
+ } else {
4822
+ noWhenBranchMatchedException();
4670
4823
  }
4671
4824
  }
4672
- var list = tmp;
4825
+ var list = tmp_0;
4673
4826
  addAll(destination, list);
4674
4827
  }
4675
4828
  return destination;
4676
4829
  };
4677
4830
  }
4678
- function OpenApiV3Parser$parseResponseBody$lambda(this$0) {
4679
- return function (res) {
4680
- var tmp0_elvis_lhs = toName_1(res.h2d_1, this$0);
4681
- var name = tmp0_elvis_lhs == null ? toName_2(res.e2d_1, this$0) + res.g2d_1.f9_1 : tmp0_elvis_lhs;
4682
- var response = res.j2d_1;
4831
+ function OpenApiV3Parser$parseResponseBody$lambda($this_parseResponseBody) {
4832
+ return function ($this$flatMapResponses) {
4833
+ var tmp0_elvis_lhs = toName_1($this$flatMapResponses.g2d_1, OpenApiV3Parser_instance);
4834
+ var name = tmp0_elvis_lhs == null ? toName_2($this$flatMapResponses.d2d_1, OpenApiV3Parser_instance) + $this$flatMapResponses.f2d_1.f9_1 : tmp0_elvis_lhs;
4835
+ var response = $this$flatMapResponses.i2d_1;
4683
4836
  var tmp;
4684
4837
  if (response instanceof ResponseObject_0) {
4685
4838
  // Inline function 'kotlin.collections.flatMap' call
@@ -4705,13 +4858,23 @@
4705
4858
  switch (tmp0_subject == null ? -1 : tmp0_subject.g9_1) {
4706
4859
  case -1:
4707
4860
  case 5:
4708
- tmp_1 = flatten_1(schema, this$0, Common_instance.d2c([name, _StatusCode___get_value__impl__we50mu_0(res.i2d_1), _MediaType___get_value__impl__wy58mp(mediaType), 'ResponseBody']));
4861
+ tmp_1 = flatten_1($this_parseResponseBody, OpenApiV3Parser_instance, schema, Common_instance.e2c([name, _StatusCode___get_value__impl__we50mu_0($this$flatMapResponses.h2d_1), _MediaType___get_value__impl__wy58mp(mediaType), 'ResponseBody']));
4709
4862
  break;
4710
4863
  case 4:
4711
4864
  // Inline function 'kotlin.collections.orEmpty' call
4712
4865
 
4713
4866
  var tmp1_safe_receiver = schema.c1v_1;
4714
- var tmp0_elvis_lhs_1 = tmp1_safe_receiver == null ? null : flatten_2(tmp1_safe_receiver, this$0, Common_instance.d2c([name, _StatusCode___get_value__impl__we50mu_0(res.i2d_1), _MediaType___get_value__impl__wy58mp(mediaType), 'ResponseBody']));
4867
+ var tmp_2;
4868
+ if (tmp1_safe_receiver == null) {
4869
+ tmp_2 = null;
4870
+ } else {
4871
+ // Inline function 'kotlin.let' call
4872
+ // Inline function 'kotlin.contracts.contract' call
4873
+ // Inline function 'community.flock.wirespec.openapi.v3.OpenApiV3Parser.parseResponseBody.<anonymous>.<anonymous>.<anonymous>' call
4874
+ tmp_2 = flatten_2($this_parseResponseBody, OpenApiV3Parser_instance, tmp1_safe_receiver, Common_instance.e2c([name, _StatusCode___get_value__impl__we50mu_0($this$flatMapResponses.h2d_1), _MediaType___get_value__impl__wy58mp(mediaType), 'ResponseBody']));
4875
+ }
4876
+
4877
+ var tmp0_elvis_lhs_1 = tmp_2;
4715
4878
  tmp_1 = tmp0_elvis_lhs_1 == null ? emptyList() : tmp0_elvis_lhs_1;
4716
4879
  break;
4717
4880
  default:
@@ -4736,32 +4899,51 @@
4736
4899
  return tmp;
4737
4900
  };
4738
4901
  }
4739
- function OpenApiV3Parser$toName$lambda(this$0) {
4740
- return function (it) {
4741
- var tmp;
4742
- switch (isParam_0(it, this$0)) {
4743
- case true:
4744
- var tmp_0 = Common_instance;
4745
- // Inline function 'kotlin.text.substring' call
4902
+ function OpenApiV3Parser$toName$lambda(it) {
4903
+ var tmp;
4904
+ switch (isParam_0(it, OpenApiV3Parser_instance)) {
4905
+ case true:
4906
+ var tmp_0 = Common_instance;
4907
+ // Inline function 'kotlin.text.substring' call
4746
4908
 
4747
- var endIndex = it.length - 1 | 0;
4748
- // Inline function 'kotlin.js.asDynamic' call
4909
+ var endIndex = it.length - 1 | 0;
4910
+ // Inline function 'kotlin.js.asDynamic' call
4749
4911
 
4750
- var tmp$ret$1 = it.substring(1, endIndex);
4751
- tmp = tmp_0.d2c([tmp$ret$1]);
4752
- break;
4753
- case false:
4754
- tmp = Common_instance.d2c([it]);
4755
- break;
4756
- default:
4757
- noWhenBranchMatchedException();
4758
- break;
4759
- }
4760
- return tmp;
4761
- };
4912
+ var tmp$ret$1 = it.substring(1, endIndex);
4913
+ tmp = tmp_0.e2c([tmp$ret$1]);
4914
+ break;
4915
+ case false:
4916
+ tmp = Common_instance.e2c([it]);
4917
+ break;
4918
+ default:
4919
+ noWhenBranchMatchedException();
4920
+ break;
4921
+ }
4922
+ return tmp;
4762
4923
  }
4763
- function OpenApiV3Parser(openApi) {
4764
- this.z2c_1 = openApi;
4924
+ function OpenApiV3Parser() {
4925
+ }
4926
+ protoOf(OpenApiV3Parser).s2c = function (json, strict) {
4927
+ return this.j2d((new OpenAPI_0(Json(VOID, OpenApiV3Parser$parse$lambda(strict)))).r1e(json));
4928
+ };
4929
+ protoOf(OpenApiV3Parser).k2d = function (json, strict, $super) {
4930
+ strict = strict === VOID ? false : strict;
4931
+ return $super === VOID ? this.s2c(json, strict) : $super.s2c.call(this, json, strict);
4932
+ };
4933
+ protoOf(OpenApiV3Parser).j2d = function (_this__u8e3s4) {
4934
+ // Inline function 'kotlin.collections.reduce' call
4935
+ var iterator = listOf_0([parseEndpoint(_this__u8e3s4, this), parseParameters_0(_this__u8e3s4, this), parseRequestBody_0(_this__u8e3s4, this), parseResponseBody_0(_this__u8e3s4, this), parseComponents(_this__u8e3s4, this)]).v();
4936
+ if (!iterator.w())
4937
+ throw UnsupportedOperationException_init_$Create$("Empty collection can't be reduced.");
4938
+ var accumulator = iterator.y();
4939
+ while (iterator.w()) {
4940
+ accumulator = plus(accumulator, iterator.y());
4941
+ }
4942
+ return accumulator;
4943
+ };
4944
+ var OpenApiV3Parser_instance;
4945
+ function OpenApiV3Parser_getInstance() {
4946
+ return OpenApiV3Parser_instance;
4765
4947
  }
4766
4948
  function toMap_1(_this__u8e3s4) {
4767
4949
  var tmp;
@@ -4835,52 +5017,19 @@
4835
5017
  }
4836
5018
  return tmp;
4837
5019
  }
4838
- function filterNotNullValues_0(_this__u8e3s4) {
4839
- // Inline function 'kotlin.collections.mapNotNull' call
4840
- // Inline function 'kotlin.collections.mapNotNullTo' call
4841
- var destination = ArrayList_init_$Create$();
4842
- // Inline function 'kotlin.collections.forEach' call
4843
- // Inline function 'kotlin.collections.iterator' call
4844
- var tmp0_iterator = _this__u8e3s4.n2().v();
4845
- while (tmp0_iterator.w()) {
4846
- var element = tmp0_iterator.y();
4847
- // Inline function 'kotlin.collections.mapNotNullTo.<anonymous>' call
4848
- // Inline function 'community.flock.wirespec.openapi.v3.filterNotNullValues.<anonymous>' call
4849
- // Inline function 'kotlin.collections.component1' call
4850
- var key = element.o2();
4851
- // Inline function 'kotlin.collections.component2' call
4852
- var value = element.p2();
4853
- var tmp;
4854
- if (value == null) {
4855
- tmp = null;
4856
- } else {
4857
- // Inline function 'kotlin.let' call
4858
- // Inline function 'kotlin.contracts.contract' call
4859
- // Inline function 'community.flock.wirespec.openapi.v3.filterNotNullValues.<anonymous>.<anonymous>' call
4860
- tmp = to(key, value);
4861
- }
4862
- var tmp0_safe_receiver = tmp;
4863
- if (tmp0_safe_receiver == null)
4864
- null;
4865
- else {
4866
- // Inline function 'kotlin.let' call
4867
- // Inline function 'kotlin.contracts.contract' call
4868
- destination.s(tmp0_safe_receiver);
4869
- }
4870
- }
4871
- return toMap(destination);
4872
- }
4873
5020
  //region block: init
4874
5021
  Common_instance = new Common();
4875
- Companion_instance_0 = new Companion();
4876
- Companion_instance_1 = new Companion_0();
5022
+ OpenApiV2Emitter_instance = new OpenApiV2Emitter();
5023
+ OpenApiV2Parser_instance = new OpenApiV2Parser();
5024
+ OpenApiV3Emitter_instance = new OpenApiV3Emitter();
5025
+ OpenApiV3Parser_instance = new OpenApiV3Parser();
4877
5026
  //endregion
4878
5027
  //region block: exports
4879
5028
  _.$_$ = _.$_$ || {};
4880
- _.$_$.a = OpenApiV2Emitter;
4881
- _.$_$.b = OpenApiV3Emitter;
4882
- _.$_$.c = Companion_instance_0;
4883
- _.$_$.d = Companion_instance_1;
5029
+ _.$_$.a = OpenApiV2Emitter_instance;
5030
+ _.$_$.b = OpenApiV2Parser_instance;
5031
+ _.$_$.c = OpenApiV3Emitter_instance;
5032
+ _.$_$.d = OpenApiV3Parser_instance;
4884
5033
  //endregion
4885
5034
  return _;
4886
5035
  }));