@flock/wirespec 0.17.17 → 0.17.19
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.
- package/clikt-clikt.mjs +1160 -1160
- package/colormath-root-colormath.mjs +425 -425
- package/kotlin-kotlin-stdlib.mjs +13 -13
- package/kotlin-kotlin-stdlib.mjs.map +1 -1
- package/kotlin-openapi-bindings.mjs +1 -0
- package/kotlin-rgxgen.mjs +1767 -1767
- package/kotlinx-io-kotlinx-io-core.mjs +380 -380
- package/markdown.mjs +1850 -1850
- package/mordant-mordant.mjs +1634 -1634
- package/package.json +1 -1
- package/wirespec-src-compiler-core.mjs +204 -181
- package/wirespec-src-compiler-core.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-java.mjs +231 -208
- package/wirespec-src-compiler-emitters-java.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-kotlin.mjs +180 -161
- package/wirespec-src-compiler-emitters-kotlin.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-python.mjs +146 -127
- package/wirespec-src-compiler-emitters-python.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-typescript.mjs +63 -59
- package/wirespec-src-compiler-emitters-typescript.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-wirespec.mjs +34 -34
- package/wirespec-src-compiler-emitters-wirespec.mjs.map +1 -1
- package/wirespec-src-compiler-lib.mjs +260 -260
- package/wirespec-src-converter-avro.mjs +270 -270
- package/wirespec-src-converter-openapi.mjs +375 -372
- package/wirespec-src-converter-openapi.mjs.map +1 -1
- package/wirespec-src-plugin-arguments.mjs +134 -134
- package/wirespec-src-plugin-cli.mjs +74 -74
- package/wirespec-src-plugin-npm.mjs +11 -11
- package/wirespec-src-tools-generator.mjs +13 -13
|
@@ -9,6 +9,8 @@ import {
|
|
|
9
9
|
get_entriesolr3gz3d9pa6 as get_entries,
|
|
10
10
|
Dict3g7w5wia7rncj as Dict,
|
|
11
11
|
Iterable29qbzfup67wqp as Iterable,
|
|
12
|
+
Endpoint1jsq06yr3xdhp as Endpoint,
|
|
13
|
+
DefinitionIdentifiervfasqdb33qef as DefinitionIdentifier,
|
|
12
14
|
Singleuujp8ld3qd71 as Single,
|
|
13
15
|
Parameter2v8p72ovcf2np as Parameter,
|
|
14
16
|
Annotation2u6gjfpokxaky as Annotation,
|
|
@@ -22,7 +24,6 @@ import {
|
|
|
22
24
|
_Comment___get_value__impl__8r3plaqyy4ualbhxi3 as _Comment___get_value__impl__8r3pla,
|
|
23
25
|
Comment3jy4x02mtqi9b as Comment,
|
|
24
26
|
Enum3l2iuc342kle6 as Enum,
|
|
25
|
-
Endpoint1jsq06yr3xdhp as Endpoint,
|
|
26
27
|
Paramvfwnys2w6aj1 as Param,
|
|
27
28
|
Method_GET_getInstance387nzgbmfcn9x as Method_GET_getInstance,
|
|
28
29
|
Method_POST_getInstance3o4gi2w574o8e as Method_POST_getInstance,
|
|
@@ -42,7 +43,6 @@ import {
|
|
|
42
43
|
Content2xr1z915qbr1k as Content,
|
|
43
44
|
Request3mgjik96a5s75 as Request,
|
|
44
45
|
Response3emykwjtzgs52 as Response,
|
|
45
|
-
DefinitionIdentifiervfasqdb33qef as DefinitionIdentifier,
|
|
46
46
|
FieldIdentifier34k7iphndcnl0 as FieldIdentifier,
|
|
47
47
|
Field2nwjpxu9j2svq as Field,
|
|
48
48
|
Shape6h3qnek4ao2r as Shape,
|
|
@@ -85,6 +85,7 @@ import {
|
|
|
85
85
|
isLetterOrDigit2kuxd9e198haf as isLetterOrDigit,
|
|
86
86
|
Char19o2r8palgjof as Char,
|
|
87
87
|
listOfvhqybd2zx248 as listOf,
|
|
88
|
+
toSet2orjxp16sotqu as toSet,
|
|
88
89
|
emptyList1g2z5xcrvp2zy as emptyList,
|
|
89
90
|
to2cs3ny02qtbcb as to,
|
|
90
91
|
toMap1vec9topfei08 as toMap,
|
|
@@ -109,7 +110,6 @@ import {
|
|
|
109
110
|
charSequenceLength3278n89t01tmv as charSequenceLength,
|
|
110
111
|
ensureNotNull1e947j3ixpazm as ensureNotNull,
|
|
111
112
|
first58ocm7j58k3q as first,
|
|
112
|
-
toSet2orjxp16sotqu as toSet,
|
|
113
113
|
getKClassFromExpression3vpejubogshaw as getKClassFromExpression,
|
|
114
114
|
Collection1k04j3hzsbod0 as Collection,
|
|
115
115
|
} from './kotlin-kotlin-stdlib.mjs';
|
|
@@ -160,6 +160,7 @@ import {
|
|
|
160
160
|
Ref__toString_impl_irb7zi32liltvciubsb as Ref__toString_impl_irb7zi,
|
|
161
161
|
BooleanValue2a9num6jqp0le as BooleanValue,
|
|
162
162
|
OpenAPIV2SchemaOrReference3b32ku1sw2qie as OpenAPIV2SchemaOrReference,
|
|
163
|
+
OpenAPIV2ResponseOrReference18l2f954wxdcu as OpenAPIV2ResponseOrReference,
|
|
163
164
|
OpenAPIV3Componentspfey0g8pxl3d as OpenAPIV3Components,
|
|
164
165
|
OpenAPIV3PathItem1gskaz6lpj8no as OpenAPIV3PathItem,
|
|
165
166
|
OpenAPIV3Type_STRING_getInstance1pyncqi8aoe47 as OpenAPIV3Type_STRING_getInstance,
|
|
@@ -206,11 +207,11 @@ initMetadataForObject(OpenAPIV3Parser, 'OpenAPIV3Parser');
|
|
|
206
207
|
function emitFormat(_this__u8e3s4) {
|
|
207
208
|
var tmp;
|
|
208
209
|
if (_this__u8e3s4 instanceof Primitive) {
|
|
209
|
-
var t = _this__u8e3s4.
|
|
210
|
+
var t = _this__u8e3s4.p29_1;
|
|
210
211
|
var tmp_0;
|
|
211
212
|
if (t instanceof Number_0) {
|
|
212
213
|
var tmp_1;
|
|
213
|
-
switch (t.
|
|
214
|
+
switch (t.x28_1.r2_1) {
|
|
214
215
|
case 0:
|
|
215
216
|
tmp_1 = 'float';
|
|
216
217
|
break;
|
|
@@ -225,7 +226,7 @@ function emitFormat(_this__u8e3s4) {
|
|
|
225
226
|
} else {
|
|
226
227
|
if (t instanceof Integer) {
|
|
227
228
|
var tmp_2;
|
|
228
|
-
switch (t.
|
|
229
|
+
switch (t.u28_1.r2_1) {
|
|
229
230
|
case 0:
|
|
230
231
|
tmp_2 = 'int32';
|
|
231
232
|
break;
|
|
@@ -394,19 +395,19 @@ function flatMapRequests(_this__u8e3s4, f) {
|
|
|
394
395
|
return destination_1;
|
|
395
396
|
}
|
|
396
397
|
function FlattenRequest(path, pathItem, method, operation) {
|
|
397
|
-
this.
|
|
398
|
-
this.
|
|
399
|
-
this.
|
|
400
|
-
this.
|
|
398
|
+
this.x2e_1 = path;
|
|
399
|
+
this.y2e_1 = pathItem;
|
|
400
|
+
this.z2e_1 = method;
|
|
401
|
+
this.a2f_1 = operation;
|
|
401
402
|
}
|
|
402
403
|
protoOf(FlattenRequest).toString = function () {
|
|
403
|
-
return 'FlattenRequest(path=' + Path__toString_impl_wlr1lw(this.
|
|
404
|
+
return 'FlattenRequest(path=' + Path__toString_impl_wlr1lw(this.x2e_1) + ', pathItem=' + toString(this.y2e_1) + ', method=' + this.z2e_1.toString() + ', operation=' + toString(this.a2f_1) + ')';
|
|
404
405
|
};
|
|
405
406
|
protoOf(FlattenRequest).hashCode = function () {
|
|
406
|
-
var result = Path__hashCode_impl_go73kd(this.
|
|
407
|
-
result = imul(result, 31) + hashCode(this.
|
|
408
|
-
result = imul(result, 31) + this.
|
|
409
|
-
result = imul(result, 31) + hashCode(this.
|
|
407
|
+
var result = Path__hashCode_impl_go73kd(this.x2e_1);
|
|
408
|
+
result = imul(result, 31) + hashCode(this.y2e_1) | 0;
|
|
409
|
+
result = imul(result, 31) + this.z2e_1.hashCode() | 0;
|
|
410
|
+
result = imul(result, 31) + hashCode(this.a2f_1) | 0;
|
|
410
411
|
return result;
|
|
411
412
|
};
|
|
412
413
|
protoOf(FlattenRequest).equals = function (other) {
|
|
@@ -415,13 +416,13 @@ protoOf(FlattenRequest).equals = function (other) {
|
|
|
415
416
|
if (!(other instanceof FlattenRequest))
|
|
416
417
|
return false;
|
|
417
418
|
var tmp0_other_with_cast = other instanceof FlattenRequest ? other : THROW_CCE();
|
|
418
|
-
if (!(this.
|
|
419
|
+
if (!(this.x2e_1 === tmp0_other_with_cast.x2e_1))
|
|
419
420
|
return false;
|
|
420
|
-
if (!equals(this.
|
|
421
|
+
if (!equals(this.y2e_1, tmp0_other_with_cast.y2e_1))
|
|
421
422
|
return false;
|
|
422
|
-
if (!this.
|
|
423
|
+
if (!this.z2e_1.equals(tmp0_other_with_cast.z2e_1))
|
|
423
424
|
return false;
|
|
424
|
-
if (!equals(this.
|
|
425
|
+
if (!equals(this.a2f_1, tmp0_other_with_cast.a2f_1))
|
|
425
426
|
return false;
|
|
426
427
|
return true;
|
|
427
428
|
};
|
|
@@ -488,23 +489,23 @@ function flatMapResponses(_this__u8e3s4, f) {
|
|
|
488
489
|
return destination_2;
|
|
489
490
|
}
|
|
490
491
|
function FlattenResponse(path, pathItem, method, operation, statusCode, response) {
|
|
491
|
-
this.
|
|
492
|
-
this.
|
|
493
|
-
this.
|
|
494
|
-
this.
|
|
495
|
-
this.
|
|
496
|
-
this.
|
|
492
|
+
this.b2f_1 = path;
|
|
493
|
+
this.c2f_1 = pathItem;
|
|
494
|
+
this.d2f_1 = method;
|
|
495
|
+
this.e2f_1 = operation;
|
|
496
|
+
this.f2f_1 = statusCode;
|
|
497
|
+
this.g2f_1 = response;
|
|
497
498
|
}
|
|
498
499
|
protoOf(FlattenResponse).toString = function () {
|
|
499
|
-
return 'FlattenResponse(path=' + Path__toString_impl_wlr1lw(this.
|
|
500
|
+
return 'FlattenResponse(path=' + Path__toString_impl_wlr1lw(this.b2f_1) + ', pathItem=' + toString(this.c2f_1) + ', method=' + this.d2f_1.toString() + ', operation=' + toString(this.e2f_1) + ', statusCode=' + StatusCode__toString_impl_6caewy(this.f2f_1) + ', response=' + toString(this.g2f_1) + ')';
|
|
500
501
|
};
|
|
501
502
|
protoOf(FlattenResponse).hashCode = function () {
|
|
502
|
-
var result = Path__hashCode_impl_go73kd(this.
|
|
503
|
-
result = imul(result, 31) + hashCode(this.
|
|
504
|
-
result = imul(result, 31) + this.
|
|
505
|
-
result = imul(result, 31) + hashCode(this.
|
|
506
|
-
result = imul(result, 31) + StatusCode__hashCode_impl_fevhvx(this.
|
|
507
|
-
result = imul(result, 31) + hashCode(this.
|
|
503
|
+
var result = Path__hashCode_impl_go73kd(this.b2f_1);
|
|
504
|
+
result = imul(result, 31) + hashCode(this.c2f_1) | 0;
|
|
505
|
+
result = imul(result, 31) + this.d2f_1.hashCode() | 0;
|
|
506
|
+
result = imul(result, 31) + hashCode(this.e2f_1) | 0;
|
|
507
|
+
result = imul(result, 31) + StatusCode__hashCode_impl_fevhvx(this.f2f_1) | 0;
|
|
508
|
+
result = imul(result, 31) + hashCode(this.g2f_1) | 0;
|
|
508
509
|
return result;
|
|
509
510
|
};
|
|
510
511
|
protoOf(FlattenResponse).equals = function (other) {
|
|
@@ -513,17 +514,17 @@ protoOf(FlattenResponse).equals = function (other) {
|
|
|
513
514
|
if (!(other instanceof FlattenResponse))
|
|
514
515
|
return false;
|
|
515
516
|
var tmp0_other_with_cast = other instanceof FlattenResponse ? other : THROW_CCE();
|
|
516
|
-
if (!(this.
|
|
517
|
+
if (!(this.b2f_1 === tmp0_other_with_cast.b2f_1))
|
|
517
518
|
return false;
|
|
518
|
-
if (!equals(this.
|
|
519
|
+
if (!equals(this.c2f_1, tmp0_other_with_cast.c2f_1))
|
|
519
520
|
return false;
|
|
520
|
-
if (!this.
|
|
521
|
+
if (!this.d2f_1.equals(tmp0_other_with_cast.d2f_1))
|
|
521
522
|
return false;
|
|
522
|
-
if (!equals(this.
|
|
523
|
+
if (!equals(this.e2f_1, tmp0_other_with_cast.e2f_1))
|
|
523
524
|
return false;
|
|
524
|
-
if (!(this.
|
|
525
|
+
if (!(this.f2f_1 === tmp0_other_with_cast.f2f_1))
|
|
525
526
|
return false;
|
|
526
|
-
if (!equals(this.
|
|
527
|
+
if (!equals(this.g2f_1, tmp0_other_with_cast.g2f_1))
|
|
527
528
|
return false;
|
|
528
529
|
return true;
|
|
529
530
|
};
|
|
@@ -597,6 +598,54 @@ function get_json() {
|
|
|
597
598
|
return json;
|
|
598
599
|
}
|
|
599
600
|
var json;
|
|
601
|
+
function resolveEndpointNameCollisions(_this__u8e3s4) {
|
|
602
|
+
_init_properties_Utils_kt__jo07cx();
|
|
603
|
+
// Inline function 'kotlin.collections.map' call
|
|
604
|
+
// Inline function 'kotlin.collections.filterNot' call
|
|
605
|
+
// Inline function 'kotlin.collections.filterNotTo' call
|
|
606
|
+
var destination = ArrayList_init_$Create$();
|
|
607
|
+
var tmp0_iterator = _this__u8e3s4.g();
|
|
608
|
+
while (tmp0_iterator.h()) {
|
|
609
|
+
var element = tmp0_iterator.i();
|
|
610
|
+
// Inline function 'community.flock.wirespec.openapi.common.resolveEndpointNameCollisions.<anonymous>' call
|
|
611
|
+
if (!(element instanceof Endpoint)) {
|
|
612
|
+
destination.e(element);
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
616
|
+
var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(destination, 10));
|
|
617
|
+
var tmp0_iterator_0 = destination.g();
|
|
618
|
+
while (tmp0_iterator_0.h()) {
|
|
619
|
+
var item = tmp0_iterator_0.i();
|
|
620
|
+
// Inline function 'community.flock.wirespec.openapi.common.resolveEndpointNameCollisions.<anonymous>' call
|
|
621
|
+
var tmp$ret$3 = item.x25().b1();
|
|
622
|
+
destination_0.e(tmp$ret$3);
|
|
623
|
+
}
|
|
624
|
+
var nonEndpointNames = toSet(destination_0);
|
|
625
|
+
// Inline function 'kotlin.collections.map' call
|
|
626
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
627
|
+
var destination_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(_this__u8e3s4, 10));
|
|
628
|
+
var tmp0_iterator_1 = _this__u8e3s4.g();
|
|
629
|
+
while (tmp0_iterator_1.h()) {
|
|
630
|
+
var item_0 = tmp0_iterator_1.i();
|
|
631
|
+
// Inline function 'community.flock.wirespec.openapi.common.resolveEndpointNameCollisions.<anonymous>' call
|
|
632
|
+
var tmp;
|
|
633
|
+
var tmp_0;
|
|
634
|
+
if (item_0 instanceof Endpoint) {
|
|
635
|
+
tmp_0 = nonEndpointNames.o1(item_0.g24_1.b1());
|
|
636
|
+
} else {
|
|
637
|
+
tmp_0 = false;
|
|
638
|
+
}
|
|
639
|
+
if (tmp_0) {
|
|
640
|
+
tmp = item_0.c28(VOID, VOID, new DefinitionIdentifier(item_0.g24_1.b1() + 'Endpoint'));
|
|
641
|
+
} else {
|
|
642
|
+
tmp = item_0;
|
|
643
|
+
}
|
|
644
|
+
var tmp$ret$6 = tmp;
|
|
645
|
+
destination_1.e(tmp$ret$6);
|
|
646
|
+
}
|
|
647
|
+
return destination_1;
|
|
648
|
+
}
|
|
600
649
|
function className(arg) {
|
|
601
650
|
_init_properties_Utils_kt__jo07cx();
|
|
602
651
|
// Inline function 'kotlin.collections.flatMap' call
|
|
@@ -647,7 +696,7 @@ function findDescription(_this__u8e3s4) {
|
|
|
647
696
|
while (tmp0_iterator.h()) {
|
|
648
697
|
var element = tmp0_iterator.i();
|
|
649
698
|
// Inline function 'community.flock.wirespec.openapi.common.findDescription.<anonymous>' call
|
|
650
|
-
if (element.
|
|
699
|
+
if (element.o28_1 === 'Description') {
|
|
651
700
|
tmp$ret$1 = element;
|
|
652
701
|
break $l$block;
|
|
653
702
|
}
|
|
@@ -655,7 +704,7 @@ function findDescription(_this__u8e3s4) {
|
|
|
655
704
|
tmp$ret$1 = null;
|
|
656
705
|
}
|
|
657
706
|
var tmp0_safe_receiver = tmp$ret$1;
|
|
658
|
-
var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
707
|
+
var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.p28_1;
|
|
659
708
|
var tmp;
|
|
660
709
|
if (tmp1_safe_receiver == null) {
|
|
661
710
|
tmp = null;
|
|
@@ -668,7 +717,7 @@ function findDescription(_this__u8e3s4) {
|
|
|
668
717
|
while (tmp0_iterator_0.h()) {
|
|
669
718
|
var element_0 = tmp0_iterator_0.i();
|
|
670
719
|
// Inline function 'community.flock.wirespec.openapi.common.findDescription.<anonymous>' call
|
|
671
|
-
if (element_0.
|
|
720
|
+
if (element_0.m28_1 === 'default') {
|
|
672
721
|
tmp$ret$4 = element_0;
|
|
673
722
|
break $l$block_0;
|
|
674
723
|
}
|
|
@@ -678,7 +727,7 @@ function findDescription(_this__u8e3s4) {
|
|
|
678
727
|
tmp = tmp$ret$4;
|
|
679
728
|
}
|
|
680
729
|
var tmp2_safe_receiver = tmp;
|
|
681
|
-
var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.
|
|
730
|
+
var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.n28_1;
|
|
682
731
|
var tmp_0;
|
|
683
732
|
if (tmp3_safe_receiver == null) {
|
|
684
733
|
tmp_0 = null;
|
|
@@ -689,7 +738,7 @@ function findDescription(_this__u8e3s4) {
|
|
|
689
738
|
tmp_0 = tmp3_safe_receiver instanceof Single ? tmp3_safe_receiver : null;
|
|
690
739
|
}
|
|
691
740
|
var tmp4_safe_receiver = tmp_0;
|
|
692
|
-
return tmp4_safe_receiver == null ? null : tmp4_safe_receiver.
|
|
741
|
+
return tmp4_safe_receiver == null ? null : tmp4_safe_receiver.j28_1;
|
|
693
742
|
}
|
|
694
743
|
function filterNotNullValues(_this__u8e3s4) {
|
|
695
744
|
_init_properties_Utils_kt__jo07cx();
|
|
@@ -772,7 +821,7 @@ function emitDefinitions(_this__u8e3s4, $this, logger) {
|
|
|
772
821
|
// Inline function 'kotlin.collections.plusAssign' call
|
|
773
822
|
// Inline function 'community.flock.wirespec.openapi.v2.OpenAPIV2Emitter.emitDefinitions.<anonymous>' call
|
|
774
823
|
// Inline function 'kotlin.also' call
|
|
775
|
-
var type = element_0.e26_1.
|
|
824
|
+
var type = element_0.e26_1.p29_1;
|
|
776
825
|
var tmp;
|
|
777
826
|
if (equals(type, Boolean_instance)) {
|
|
778
827
|
tmp = to(element_0.d26_1.b1(), new OpenAPIV2Schema(VOID, OpenAPIV2Type_BOOLEAN_getInstance()));
|
|
@@ -783,28 +832,28 @@ function emitDefinitions(_this__u8e3s4, $this, logger) {
|
|
|
783
832
|
if (type instanceof Integer) {
|
|
784
833
|
var tmp_0 = element_0.d26_1.b1();
|
|
785
834
|
var tmp4_type = OpenAPIV2Type_INTEGER_getInstance();
|
|
786
|
-
var tmp0_safe_receiver = type.
|
|
787
|
-
var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
835
|
+
var tmp0_safe_receiver = type.v28_1;
|
|
836
|
+
var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.q28_1;
|
|
788
837
|
var tmp5_minimum = tmp1_safe_receiver == null ? null : toDouble(tmp1_safe_receiver);
|
|
789
|
-
var tmp2_safe_receiver = type.
|
|
790
|
-
var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.
|
|
838
|
+
var tmp2_safe_receiver = type.v28_1;
|
|
839
|
+
var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.r28_1;
|
|
791
840
|
var tmp6_maximum = tmp3_safe_receiver == null ? null : toDouble(tmp3_safe_receiver);
|
|
792
841
|
tmp = to(tmp_0, new OpenAPIV2Schema(VOID, tmp4_type, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, 'int32', tmp6_maximum, VOID, tmp5_minimum));
|
|
793
842
|
} else {
|
|
794
843
|
if (type instanceof Number_0) {
|
|
795
844
|
var tmp_1 = element_0.d26_1.b1();
|
|
796
845
|
var tmp11_type = OpenAPIV2Type_NUMBER_getInstance();
|
|
797
|
-
var tmp7_safe_receiver = type.
|
|
798
|
-
var tmp8_safe_receiver = tmp7_safe_receiver == null ? null : tmp7_safe_receiver.
|
|
846
|
+
var tmp7_safe_receiver = type.y28_1;
|
|
847
|
+
var tmp8_safe_receiver = tmp7_safe_receiver == null ? null : tmp7_safe_receiver.q28_1;
|
|
799
848
|
var tmp12_minimum = tmp8_safe_receiver == null ? null : toDouble(tmp8_safe_receiver);
|
|
800
|
-
var tmp9_safe_receiver = type.
|
|
801
|
-
var tmp10_safe_receiver = tmp9_safe_receiver == null ? null : tmp9_safe_receiver.
|
|
849
|
+
var tmp9_safe_receiver = type.y28_1;
|
|
850
|
+
var tmp10_safe_receiver = tmp9_safe_receiver == null ? null : tmp9_safe_receiver.r28_1;
|
|
802
851
|
var tmp13_maximum = tmp10_safe_receiver == null ? null : toDouble(tmp10_safe_receiver);
|
|
803
852
|
tmp = to(tmp_1, new OpenAPIV2Schema(VOID, tmp11_type, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, 'float', tmp13_maximum, VOID, tmp12_minimum));
|
|
804
853
|
} else {
|
|
805
854
|
if (type instanceof String_0) {
|
|
806
855
|
var tmp_2 = element_0.d26_1.b1();
|
|
807
|
-
var pattern = type.
|
|
856
|
+
var pattern = type.s28_1;
|
|
808
857
|
var tmp_3;
|
|
809
858
|
var tmp_4 = pattern;
|
|
810
859
|
if ((tmp_4 == null ? null : new RegExp_0(tmp_4))instanceof RegExp_0) {
|
|
@@ -1350,10 +1399,10 @@ function toSchemaOrReference(_this__u8e3s4, $this) {
|
|
|
1350
1399
|
tmp = new OpenAPIV2Schema(VOID, OpenAPIV2Type_ARRAY_getInstance(), VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, toSchemaOrReference(_this__u8e3s4.b23_1, $this));
|
|
1351
1400
|
} else {
|
|
1352
1401
|
if (_this__u8e3s4 instanceof Custom) {
|
|
1353
|
-
tmp = new OpenAPIV2Reference(_Ref___init__impl__7qfl46('#/definitions/' + _this__u8e3s4.
|
|
1402
|
+
tmp = new OpenAPIV2Reference(_Ref___init__impl__7qfl46('#/definitions/' + _this__u8e3s4.l29_1));
|
|
1354
1403
|
} else {
|
|
1355
1404
|
if (_this__u8e3s4 instanceof Primitive) {
|
|
1356
|
-
tmp = new OpenAPIV2Schema(VOID, emitType(_this__u8e3s4.
|
|
1405
|
+
tmp = new OpenAPIV2Schema(VOID, emitType(_this__u8e3s4.p29_1, $this), VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, emitFormat(_this__u8e3s4), VOID, VOID, VOID, VOID, VOID, VOID, emitPattern(_this__u8e3s4, $this));
|
|
1357
1406
|
} else {
|
|
1358
1407
|
if (_this__u8e3s4 instanceof Any) {
|
|
1359
1408
|
var message = 'Cannot map Any';
|
|
@@ -1406,7 +1455,7 @@ function emitType_0(_this__u8e3s4, $this) {
|
|
|
1406
1455
|
tmp = OpenAPIV2Type_ARRAY_getInstance();
|
|
1407
1456
|
} else {
|
|
1408
1457
|
if (_this__u8e3s4 instanceof Primitive) {
|
|
1409
|
-
tmp = emitType(_this__u8e3s4.
|
|
1458
|
+
tmp = emitType(_this__u8e3s4.p29_1, $this);
|
|
1410
1459
|
} else {
|
|
1411
1460
|
if (_this__u8e3s4 instanceof Custom) {
|
|
1412
1461
|
tmp = OpenAPIV2Type_OBJECT_getInstance();
|
|
@@ -1429,10 +1478,10 @@ function emitType_0(_this__u8e3s4, $this) {
|
|
|
1429
1478
|
function emitPattern(_this__u8e3s4, $this) {
|
|
1430
1479
|
var tmp;
|
|
1431
1480
|
if (_this__u8e3s4 instanceof Primitive) {
|
|
1432
|
-
var t = _this__u8e3s4.
|
|
1481
|
+
var t = _this__u8e3s4.p29_1;
|
|
1433
1482
|
var tmp_0;
|
|
1434
1483
|
if (t instanceof String_0) {
|
|
1435
|
-
var p = t.
|
|
1484
|
+
var p = t.s28_1;
|
|
1436
1485
|
var tmp_1;
|
|
1437
1486
|
var tmp_2 = p;
|
|
1438
1487
|
if ((tmp_2 == null ? null : new RegExp_0(tmp_2))instanceof RegExp_0) {
|
|
@@ -1453,16 +1502,16 @@ function emitPattern(_this__u8e3s4, $this) {
|
|
|
1453
1502
|
function emitMinimum(_this__u8e3s4, $this) {
|
|
1454
1503
|
var tmp;
|
|
1455
1504
|
if (_this__u8e3s4 instanceof Primitive) {
|
|
1456
|
-
var t = _this__u8e3s4.
|
|
1505
|
+
var t = _this__u8e3s4.p29_1;
|
|
1457
1506
|
var tmp_0;
|
|
1458
1507
|
if (t instanceof Number_0) {
|
|
1459
|
-
var tmp1_safe_receiver = t.
|
|
1460
|
-
var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.
|
|
1508
|
+
var tmp1_safe_receiver = t.y28_1;
|
|
1509
|
+
var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.q28_1;
|
|
1461
1510
|
tmp_0 = tmp2_safe_receiver == null ? null : toDouble(tmp2_safe_receiver);
|
|
1462
1511
|
} else {
|
|
1463
1512
|
if (t instanceof Integer) {
|
|
1464
|
-
var tmp3_safe_receiver = t.
|
|
1465
|
-
var tmp4_safe_receiver = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.
|
|
1513
|
+
var tmp3_safe_receiver = t.v28_1;
|
|
1514
|
+
var tmp4_safe_receiver = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.q28_1;
|
|
1466
1515
|
tmp_0 = tmp4_safe_receiver == null ? null : toDouble(tmp4_safe_receiver);
|
|
1467
1516
|
} else {
|
|
1468
1517
|
tmp_0 = null;
|
|
@@ -1477,16 +1526,16 @@ function emitMinimum(_this__u8e3s4, $this) {
|
|
|
1477
1526
|
function emitMaximum(_this__u8e3s4, $this) {
|
|
1478
1527
|
var tmp;
|
|
1479
1528
|
if (_this__u8e3s4 instanceof Primitive) {
|
|
1480
|
-
var t = _this__u8e3s4.
|
|
1529
|
+
var t = _this__u8e3s4.p29_1;
|
|
1481
1530
|
var tmp_0;
|
|
1482
1531
|
if (t instanceof Number_0) {
|
|
1483
|
-
var tmp1_safe_receiver = t.
|
|
1484
|
-
var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.
|
|
1532
|
+
var tmp1_safe_receiver = t.y28_1;
|
|
1533
|
+
var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.r28_1;
|
|
1485
1534
|
tmp_0 = tmp2_safe_receiver == null ? null : toDouble(tmp2_safe_receiver);
|
|
1486
1535
|
} else {
|
|
1487
1536
|
if (t instanceof Integer) {
|
|
1488
|
-
var tmp3_safe_receiver = t.
|
|
1489
|
-
var tmp4_safe_receiver = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.
|
|
1537
|
+
var tmp3_safe_receiver = t.v28_1;
|
|
1538
|
+
var tmp4_safe_receiver = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.r28_1;
|
|
1490
1539
|
tmp_0 = tmp4_safe_receiver == null ? null : toDouble(tmp4_safe_receiver);
|
|
1491
1540
|
} else {
|
|
1492
1541
|
tmp_0 = null;
|
|
@@ -1513,7 +1562,7 @@ function OpenAPIV2Emitter$emitSegment$lambda(it) {
|
|
|
1513
1562
|
}
|
|
1514
1563
|
function OpenAPIV2Emitter() {
|
|
1515
1564
|
OpenAPIV2Emitter_instance = this;
|
|
1516
|
-
this.
|
|
1565
|
+
this.h2f_1 = FileExtension_JSON_getInstance();
|
|
1517
1566
|
}
|
|
1518
1567
|
protoOf(OpenAPIV2Emitter).q22 = function (ast, logger) {
|
|
1519
1568
|
// Inline function 'kotlin.let' call
|
|
@@ -1539,10 +1588,10 @@ protoOf(OpenAPIV2Emitter).q22 = function (ast, logger) {
|
|
|
1539
1588
|
// Inline function 'kotlin.contracts.contract' call
|
|
1540
1589
|
// Inline function 'community.flock.wirespec.openapi.v2.OpenAPIV2Emitter.emit.<anonymous>' call
|
|
1541
1590
|
var it = tmp.uk(destination);
|
|
1542
|
-
var tmp_0 = 'OpenAPI.' + OpenAPIV2Emitter_getInstance().
|
|
1591
|
+
var tmp_0 = 'OpenAPI.' + OpenAPIV2Emitter_getInstance().h2f_1.p25_1;
|
|
1543
1592
|
// Inline function 'kotlinx.serialization.encodeToString' call
|
|
1544
1593
|
var this_2 = get_json();
|
|
1545
|
-
var value = OpenAPIV2Emitter_getInstance().
|
|
1594
|
+
var value = OpenAPIV2Emitter_getInstance().i2f(it, logger);
|
|
1546
1595
|
// Inline function 'kotlinx.serialization.serializer' call
|
|
1547
1596
|
var this_3 = this_2.zo();
|
|
1548
1597
|
// Inline function 'kotlinx.serialization.internal.cast' call
|
|
@@ -1554,7 +1603,7 @@ protoOf(OpenAPIV2Emitter).q22 = function (ast, logger) {
|
|
|
1554
1603
|
var it_0 = new Emitted(tmp_0, tmp$ret$7);
|
|
1555
1604
|
return nonEmptyListOf(it_0, []);
|
|
1556
1605
|
};
|
|
1557
|
-
protoOf(OpenAPIV2Emitter).
|
|
1606
|
+
protoOf(OpenAPIV2Emitter).i2f = function (statements, logger) {
|
|
1558
1607
|
var tmp0_info = new InfoObject('Wirespec', VOID, VOID, VOID, VOID, '0.0.0');
|
|
1559
1608
|
var tmp1_consumes = listOf('application/json');
|
|
1560
1609
|
var tmp2_produces = listOf('application/json');
|
|
@@ -1570,15 +1619,15 @@ function OpenAPIV2Emitter_getInstance() {
|
|
|
1570
1619
|
}
|
|
1571
1620
|
function OpenAPIV2Parser$parse$lambda($strict) {
|
|
1572
1621
|
return function (it) {
|
|
1573
|
-
return OpenAPIV2Parser_instance.
|
|
1622
|
+
return OpenAPIV2Parser_instance.j2f((new OpenAPIV2(jsonDefault($strict))).f1j(it));
|
|
1574
1623
|
};
|
|
1575
1624
|
}
|
|
1576
1625
|
function OpenAPIV2Parser() {
|
|
1577
1626
|
}
|
|
1578
|
-
protoOf(OpenAPIV2Parser).
|
|
1627
|
+
protoOf(OpenAPIV2Parser).w2e = function (moduleContent, strict) {
|
|
1579
1628
|
return parseOpenApi(moduleContent, OpenAPIV2Parser$parse$lambda(strict));
|
|
1580
1629
|
};
|
|
1581
|
-
protoOf(OpenAPIV2Parser).
|
|
1630
|
+
protoOf(OpenAPIV2Parser).j2f = function (_this__u8e3s4) {
|
|
1582
1631
|
// Inline function 'kotlin.let' call
|
|
1583
1632
|
// Inline function 'kotlin.collections.reduce' call
|
|
1584
1633
|
var iterator = listOf_0([parseEndpoints(_this__u8e3s4), parseParameters(_this__u8e3s4), parseRequestBody(_this__u8e3s4), parseResponseBody(_this__u8e3s4), parseDefinitions(_this__u8e3s4)]).g();
|
|
@@ -1593,7 +1642,7 @@ protoOf(OpenAPIV2Parser).d2f = function (_this__u8e3s4) {
|
|
|
1593
1642
|
var tmp$ret$1 = accumulator;
|
|
1594
1643
|
// Inline function 'kotlin.contracts.contract' call
|
|
1595
1644
|
// Inline function 'community.flock.wirespec.openapi.v2.OpenAPIV2Parser.parse.<anonymous>' call
|
|
1596
|
-
var it = toNonEmptyListOrNull(tmp$ret$1);
|
|
1645
|
+
var it = toNonEmptyListOrNull(resolveEndpointNameCollisions(tmp$ret$1));
|
|
1597
1646
|
var tmp$ret$3;
|
|
1598
1647
|
$l$block: {
|
|
1599
1648
|
// Inline function 'kotlin.requireNotNull' call
|
|
@@ -2489,261 +2538,215 @@ function resolve_1(_this__u8e3s4, parameterOrReference) {
|
|
|
2489
2538
|
}
|
|
2490
2539
|
function flatten_0(_this__u8e3s4, schemaObject, name) {
|
|
2491
2540
|
var tmp;
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
} else {
|
|
2503
|
-
tmp_5 = false;
|
|
2504
|
-
}
|
|
2505
|
-
if (tmp_5) {
|
|
2506
|
-
tmp_4 = schemaObject.r1o_1 == null;
|
|
2507
|
-
} else {
|
|
2508
|
-
tmp_4 = false;
|
|
2509
|
-
}
|
|
2510
|
-
if (tmp_4) {
|
|
2511
|
-
tmp_3 = schemaObject.o1o_1 == null;
|
|
2512
|
-
} else {
|
|
2513
|
-
tmp_3 = false;
|
|
2514
|
-
}
|
|
2515
|
-
if (tmp_3) {
|
|
2516
|
-
tmp_2 = schemaObject.b1o_1 == null;
|
|
2517
|
-
} else {
|
|
2518
|
-
tmp_2 = false;
|
|
2519
|
-
}
|
|
2520
|
-
if (tmp_2) {
|
|
2521
|
-
tmp_1 = schemaObject.p1o_1 == null;
|
|
2522
|
-
} else {
|
|
2523
|
-
tmp_1 = false;
|
|
2524
|
-
}
|
|
2525
|
-
if (tmp_1) {
|
|
2526
|
-
tmp_0 = schemaObject.s1o_1 == null;
|
|
2527
|
-
} else {
|
|
2528
|
-
tmp_0 = false;
|
|
2529
|
-
}
|
|
2530
|
-
if (tmp_0) {
|
|
2531
|
-
tmp = emptyList();
|
|
2532
|
-
} else {
|
|
2533
|
-
if (exists(schemaObject.s1o_1)) {
|
|
2534
|
-
var tmp1_subject = schemaObject.s1o_1;
|
|
2535
|
-
var tmp_7;
|
|
2536
|
-
if (!(tmp1_subject == null) ? isInterface(tmp1_subject, BooleanValue) : false) {
|
|
2537
|
-
tmp_7 = emptyList();
|
|
2541
|
+
if (exists(schemaObject.s1o_1)) {
|
|
2542
|
+
var tmp0_subject = schemaObject.s1o_1;
|
|
2543
|
+
var tmp_0;
|
|
2544
|
+
if (!(tmp0_subject == null) ? isInterface(tmp0_subject, BooleanValue) : false) {
|
|
2545
|
+
tmp_0 = emptyList();
|
|
2546
|
+
} else {
|
|
2547
|
+
var tmp1_safe_receiver = schemaObject.s1o_1;
|
|
2548
|
+
var tmp_1;
|
|
2549
|
+
if (tmp1_safe_receiver == null) {
|
|
2550
|
+
tmp_1 = null;
|
|
2538
2551
|
} else {
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2552
|
+
// Inline function 'kotlin.let' call
|
|
2553
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
2554
|
+
// Inline function 'community.flock.wirespec.openapi.v2.flatten.<anonymous>' call
|
|
2555
|
+
tmp_1 = resolve_3(_this__u8e3s4, tmp1_safe_receiver);
|
|
2556
|
+
}
|
|
2557
|
+
var tmp2_safe_receiver = tmp_1;
|
|
2558
|
+
var tmp_2;
|
|
2559
|
+
if (tmp2_safe_receiver == null) {
|
|
2560
|
+
tmp_2 = null;
|
|
2561
|
+
} else {
|
|
2562
|
+
// Inline function 'kotlin.takeIf' call
|
|
2563
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
2564
|
+
var tmp_3;
|
|
2565
|
+
// Inline function 'community.flock.wirespec.openapi.v2.flatten.<anonymous>' call
|
|
2566
|
+
if (!(tmp2_safe_receiver.r1o_1 == null)) {
|
|
2567
|
+
tmp_3 = tmp2_safe_receiver;
|
|
2553
2568
|
} else {
|
|
2554
|
-
|
|
2555
|
-
// Inline function 'kotlin.contracts.contract' call
|
|
2556
|
-
var tmp_10;
|
|
2557
|
-
// Inline function 'community.flock.wirespec.openapi.v2.flatten.<anonymous>' call
|
|
2558
|
-
if (!(tmp3_safe_receiver.r1o_1 == null)) {
|
|
2559
|
-
tmp_10 = tmp3_safe_receiver;
|
|
2560
|
-
} else {
|
|
2561
|
-
tmp_10 = null;
|
|
2562
|
-
}
|
|
2563
|
-
tmp_9 = tmp_10;
|
|
2569
|
+
tmp_3 = null;
|
|
2564
2570
|
}
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2571
|
+
tmp_2 = tmp_3;
|
|
2572
|
+
}
|
|
2573
|
+
var tmp3_safe_receiver = tmp_2;
|
|
2574
|
+
var tmp_4;
|
|
2575
|
+
if (tmp3_safe_receiver == null) {
|
|
2576
|
+
tmp_4 = null;
|
|
2577
|
+
} else {
|
|
2578
|
+
// Inline function 'kotlin.let' call
|
|
2579
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
2580
|
+
// Inline function 'community.flock.wirespec.openapi.v2.flatten.<anonymous>' call
|
|
2581
|
+
tmp_4 = flatten_0(_this__u8e3s4, tmp3_safe_receiver, name);
|
|
2582
|
+
}
|
|
2583
|
+
var tmp4_elvis_lhs = tmp_4;
|
|
2584
|
+
tmp_0 = tmp4_elvis_lhs == null ? emptyList() : tmp4_elvis_lhs;
|
|
2585
|
+
}
|
|
2586
|
+
tmp = tmp_0;
|
|
2587
|
+
} else if (!(schemaObject.q1o_1 == null)) {
|
|
2588
|
+
var tmp_5 = toDescriptionAnnotationList(schemaObject.h1o_1);
|
|
2589
|
+
var tmp_6 = new DefinitionIdentifier(sanitize(name));
|
|
2590
|
+
// Inline function 'kotlin.collections.distinctBy' call
|
|
2591
|
+
// Inline function 'kotlin.collections.flatMap' call
|
|
2592
|
+
// Inline function 'kotlin.collections.orEmpty' call
|
|
2593
|
+
var tmp0_elvis_lhs = schemaObject.q1o_1;
|
|
2594
|
+
// Inline function 'kotlin.collections.flatMapTo' call
|
|
2595
|
+
var this_0 = tmp0_elvis_lhs == null ? emptyList() : tmp0_elvis_lhs;
|
|
2596
|
+
var destination = ArrayList_init_$Create$();
|
|
2597
|
+
var tmp0_iterator = this_0.g();
|
|
2598
|
+
while (tmp0_iterator.h()) {
|
|
2599
|
+
var element = tmp0_iterator.i();
|
|
2600
|
+
// Inline function 'community.flock.wirespec.openapi.v2.flatten.<anonymous>' call
|
|
2601
|
+
var tmp_7;
|
|
2602
|
+
if (element instanceof OpenAPIV2Schema) {
|
|
2603
|
+
tmp_7 = toField_1(_this__u8e3s4, element, name);
|
|
2604
|
+
} else {
|
|
2605
|
+
if (element instanceof OpenAPIV2Reference) {
|
|
2606
|
+
tmp_7 = toField_1(_this__u8e3s4, resolve_2(_this__u8e3s4, resolveOpenAPIV2Schema(_this__u8e3s4, element)), getReference(element));
|
|
2569
2607
|
} else {
|
|
2570
|
-
|
|
2571
|
-
// Inline function 'kotlin.contracts.contract' call
|
|
2572
|
-
// Inline function 'community.flock.wirespec.openapi.v2.flatten.<anonymous>' call
|
|
2573
|
-
tmp_11 = flatten_0(_this__u8e3s4, tmp4_safe_receiver, name);
|
|
2608
|
+
noWhenBranchMatchedException();
|
|
2574
2609
|
}
|
|
2575
|
-
var tmp5_elvis_lhs = tmp_11;
|
|
2576
|
-
tmp_7 = tmp5_elvis_lhs == null ? emptyList() : tmp5_elvis_lhs;
|
|
2577
2610
|
}
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2611
|
+
var list = tmp_7;
|
|
2612
|
+
addAll(destination, list);
|
|
2613
|
+
}
|
|
2614
|
+
var set = HashSet_init_$Create$();
|
|
2615
|
+
var list_0 = ArrayList_init_$Create$();
|
|
2616
|
+
var tmp0_iterator_0 = destination.g();
|
|
2617
|
+
while (tmp0_iterator_0.h()) {
|
|
2618
|
+
var e = tmp0_iterator_0.i();
|
|
2619
|
+
// Inline function 'community.flock.wirespec.openapi.v2.flatten.<anonymous>' call
|
|
2620
|
+
var key = e.c24_1;
|
|
2621
|
+
if (set.e(key)) {
|
|
2622
|
+
list_0.e(e);
|
|
2623
|
+
}
|
|
2624
|
+
}
|
|
2625
|
+
var tmp_8 = listOf(new Type(null, tmp_5, tmp_6, new Shape(list_0), emptyList()));
|
|
2626
|
+
// Inline function 'kotlin.collections.flatMap' call
|
|
2627
|
+
// Inline function 'kotlin.collections.flatMapTo' call
|
|
2628
|
+
var this_1 = ensureNotNull(schemaObject.q1o_1);
|
|
2629
|
+
var destination_0 = ArrayList_init_$Create$();
|
|
2630
|
+
var tmp0_iterator_1 = this_1.g();
|
|
2631
|
+
while (tmp0_iterator_1.h()) {
|
|
2632
|
+
var element_0 = tmp0_iterator_1.i();
|
|
2633
|
+
// Inline function 'community.flock.wirespec.openapi.v2.flatten.<anonymous>' call
|
|
2634
|
+
var tmp_9;
|
|
2635
|
+
if (element_0 instanceof OpenAPIV2Reference) {
|
|
2636
|
+
tmp_9 = emptyList();
|
|
2637
|
+
} else {
|
|
2638
|
+
if (element_0 instanceof OpenAPIV2Schema) {
|
|
2639
|
+
// Inline function 'kotlin.collections.flatMap' call
|
|
2640
|
+
// Inline function 'kotlin.collections.orEmpty' call
|
|
2641
|
+
var tmp0_elvis_lhs_0 = element_0.r1o_1;
|
|
2642
|
+
// Inline function 'kotlin.collections.flatMapTo' call
|
|
2643
|
+
var this_2 = tmp0_elvis_lhs_0 == null ? emptyMap() : tmp0_elvis_lhs_0;
|
|
2644
|
+
var destination_1 = ArrayList_init_$Create$();
|
|
2645
|
+
// Inline function 'kotlin.collections.iterator' call
|
|
2646
|
+
var tmp0_iterator_2 = this_2.z().g();
|
|
2647
|
+
while (tmp0_iterator_2.h()) {
|
|
2648
|
+
var element_1 = tmp0_iterator_2.i();
|
|
2649
|
+
// Inline function 'community.flock.wirespec.openapi.v2.flatten.<anonymous>.<anonymous>' call
|
|
2650
|
+
// Inline function 'kotlin.collections.component1' call
|
|
2651
|
+
var key_0 = element_1.a1();
|
|
2652
|
+
// Inline function 'kotlin.collections.component2' call
|
|
2653
|
+
var value = element_1.b1();
|
|
2654
|
+
var tmp_10;
|
|
2655
|
+
if (value instanceof OpenAPIV2Reference) {
|
|
2656
|
+
tmp_10 = emptyList();
|
|
2600
2657
|
} else {
|
|
2601
|
-
|
|
2658
|
+
if (value instanceof OpenAPIV2Schema) {
|
|
2659
|
+
tmp_10 = flatten_0(_this__u8e3s4, value, className([name, key_0]));
|
|
2660
|
+
} else {
|
|
2661
|
+
noWhenBranchMatchedException();
|
|
2662
|
+
}
|
|
2602
2663
|
}
|
|
2664
|
+
var list_1 = tmp_10;
|
|
2665
|
+
addAll(destination_1, list_1);
|
|
2603
2666
|
}
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
var set = HashSet_init_$Create$();
|
|
2608
|
-
var list_0 = ArrayList_init_$Create$();
|
|
2609
|
-
var tmp0_iterator_0 = destination.g();
|
|
2610
|
-
while (tmp0_iterator_0.h()) {
|
|
2611
|
-
var e = tmp0_iterator_0.i();
|
|
2612
|
-
// Inline function 'community.flock.wirespec.openapi.v2.flatten.<anonymous>' call
|
|
2613
|
-
var key = e.c24_1;
|
|
2614
|
-
if (set.e(key)) {
|
|
2615
|
-
list_0.e(e);
|
|
2616
|
-
}
|
|
2667
|
+
tmp_9 = destination_1;
|
|
2668
|
+
} else {
|
|
2669
|
+
noWhenBranchMatchedException();
|
|
2617
2670
|
}
|
|
2618
|
-
|
|
2671
|
+
}
|
|
2672
|
+
var list_2 = tmp_9;
|
|
2673
|
+
addAll(destination_0, list_2);
|
|
2674
|
+
}
|
|
2675
|
+
tmp = plus_0(tmp_8, destination_0);
|
|
2676
|
+
} else if (!(schemaObject.o1o_1 == null)) {
|
|
2677
|
+
// Inline function 'kotlin.let' call
|
|
2678
|
+
// Inline function 'kotlin.collections.map' call
|
|
2679
|
+
var this_3 = ensureNotNull(schemaObject.o1o_1);
|
|
2680
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
2681
|
+
var destination_2 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_3, 10));
|
|
2682
|
+
var tmp0_iterator_3 = this_3.g();
|
|
2683
|
+
while (tmp0_iterator_3.h()) {
|
|
2684
|
+
var item = tmp0_iterator_3.i();
|
|
2685
|
+
// Inline function 'community.flock.wirespec.openapi.v2.flatten.<anonymous>' call
|
|
2686
|
+
var tmp$ret$22 = item.u17();
|
|
2687
|
+
destination_2.e(tmp$ret$22);
|
|
2688
|
+
}
|
|
2689
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
2690
|
+
// Inline function 'community.flock.wirespec.openapi.v2.flatten.<anonymous>' call
|
|
2691
|
+
var it = toSet(destination_2);
|
|
2692
|
+
tmp = listOf(new Enum(null, toDescriptionAnnotationList(schemaObject.h1o_1), new DefinitionIdentifier(sanitize(name)), it));
|
|
2693
|
+
} else {
|
|
2694
|
+
var tmp5_subject = schemaObject.b1o_1;
|
|
2695
|
+
var tmp_11;
|
|
2696
|
+
switch (tmp5_subject == null ? -1 : tmp5_subject.r2_1) {
|
|
2697
|
+
case -1:
|
|
2698
|
+
case 5:
|
|
2619
2699
|
// Inline function 'kotlin.collections.flatMap' call
|
|
2700
|
+
|
|
2701
|
+
// Inline function 'kotlin.collections.orEmpty' call
|
|
2702
|
+
|
|
2703
|
+
var tmp0_elvis_lhs_1 = schemaObject.r1o_1;
|
|
2620
2704
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
2621
|
-
|
|
2622
|
-
var
|
|
2623
|
-
var
|
|
2624
|
-
|
|
2625
|
-
|
|
2705
|
+
|
|
2706
|
+
var this_4 = tmp0_elvis_lhs_1 == null ? emptyMap() : tmp0_elvis_lhs_1;
|
|
2707
|
+
var destination_3 = ArrayList_init_$Create$();
|
|
2708
|
+
// Inline function 'kotlin.collections.iterator' call
|
|
2709
|
+
|
|
2710
|
+
var tmp0_iterator_4 = this_4.z().g();
|
|
2711
|
+
while (tmp0_iterator_4.h()) {
|
|
2712
|
+
var element_2 = tmp0_iterator_4.i();
|
|
2626
2713
|
// Inline function 'community.flock.wirespec.openapi.v2.flatten.<anonymous>' call
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2714
|
+
// Inline function 'kotlin.collections.component1' call
|
|
2715
|
+
var key_1 = element_2.a1();
|
|
2716
|
+
// Inline function 'kotlin.collections.component2' call
|
|
2717
|
+
var value_0 = element_2.b1();
|
|
2718
|
+
var list_3 = flatten(_this__u8e3s4, value_0, className([name, key_1]));
|
|
2719
|
+
addAll(destination_3, list_3);
|
|
2720
|
+
}
|
|
2721
|
+
|
|
2722
|
+
var fields = destination_3;
|
|
2723
|
+
var schema = listOf(new Type(null, toDescriptionAnnotationList(schemaObject.h1o_1), new DefinitionIdentifier(sanitize(name)), new Shape(toField_1(_this__u8e3s4, schemaObject, name)), emptyList()));
|
|
2724
|
+
tmp_11 = plus_0(schema, fields);
|
|
2725
|
+
break;
|
|
2726
|
+
case 4:
|
|
2727
|
+
var it_0 = schemaObject.p1o_1;
|
|
2728
|
+
var tmp_12;
|
|
2729
|
+
if (it_0 instanceof OpenAPIV2Reference) {
|
|
2730
|
+
tmp_12 = emptyList();
|
|
2731
|
+
} else {
|
|
2732
|
+
if (it_0 instanceof OpenAPIV2Schema) {
|
|
2733
|
+
tmp_12 = flatten_0(_this__u8e3s4, it_0, className([name, 'Array']));
|
|
2630
2734
|
} else {
|
|
2631
|
-
if (
|
|
2632
|
-
|
|
2633
|
-
// Inline function 'kotlin.collections.orEmpty' call
|
|
2634
|
-
var tmp0_elvis_lhs_0 = element_0.r1o_1;
|
|
2635
|
-
// Inline function 'kotlin.collections.flatMapTo' call
|
|
2636
|
-
var this_2 = tmp0_elvis_lhs_0 == null ? emptyMap() : tmp0_elvis_lhs_0;
|
|
2637
|
-
var destination_1 = ArrayList_init_$Create$();
|
|
2638
|
-
// Inline function 'kotlin.collections.iterator' call
|
|
2639
|
-
var tmp0_iterator_2 = this_2.z().g();
|
|
2640
|
-
while (tmp0_iterator_2.h()) {
|
|
2641
|
-
var element_1 = tmp0_iterator_2.i();
|
|
2642
|
-
// Inline function 'community.flock.wirespec.openapi.v2.flatten.<anonymous>.<anonymous>' call
|
|
2643
|
-
// Inline function 'kotlin.collections.component1' call
|
|
2644
|
-
var key_0 = element_1.a1();
|
|
2645
|
-
// Inline function 'kotlin.collections.component2' call
|
|
2646
|
-
var value = element_1.b1();
|
|
2647
|
-
var tmp_17;
|
|
2648
|
-
if (value instanceof OpenAPIV2Reference) {
|
|
2649
|
-
tmp_17 = emptyList();
|
|
2650
|
-
} else {
|
|
2651
|
-
if (value instanceof OpenAPIV2Schema) {
|
|
2652
|
-
tmp_17 = flatten_0(_this__u8e3s4, value, className([name, key_0]));
|
|
2653
|
-
} else {
|
|
2654
|
-
noWhenBranchMatchedException();
|
|
2655
|
-
}
|
|
2656
|
-
}
|
|
2657
|
-
var list_1 = tmp_17;
|
|
2658
|
-
addAll(destination_1, list_1);
|
|
2659
|
-
}
|
|
2660
|
-
tmp_16 = destination_1;
|
|
2735
|
+
if (it_0 == null) {
|
|
2736
|
+
tmp_12 = emptyList();
|
|
2661
2737
|
} else {
|
|
2662
2738
|
noWhenBranchMatchedException();
|
|
2663
2739
|
}
|
|
2664
2740
|
}
|
|
2665
|
-
var list_2 = tmp_16;
|
|
2666
|
-
addAll(destination_0, list_2);
|
|
2667
2741
|
}
|
|
2668
|
-
tmp = plus_0(tmp_15, destination_0);
|
|
2669
|
-
} else {
|
|
2670
|
-
if (!(schemaObject.o1o_1 == null)) {
|
|
2671
|
-
// Inline function 'kotlin.let' call
|
|
2672
|
-
// Inline function 'kotlin.collections.map' call
|
|
2673
|
-
var this_3 = ensureNotNull(schemaObject.o1o_1);
|
|
2674
|
-
// Inline function 'kotlin.collections.mapTo' call
|
|
2675
|
-
var destination_2 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_3, 10));
|
|
2676
|
-
var tmp0_iterator_3 = this_3.g();
|
|
2677
|
-
while (tmp0_iterator_3.h()) {
|
|
2678
|
-
var item = tmp0_iterator_3.i();
|
|
2679
|
-
// Inline function 'community.flock.wirespec.openapi.v2.flatten.<anonymous>' call
|
|
2680
|
-
var tmp$ret$22 = item.u17();
|
|
2681
|
-
destination_2.e(tmp$ret$22);
|
|
2682
|
-
}
|
|
2683
|
-
// Inline function 'kotlin.contracts.contract' call
|
|
2684
|
-
// Inline function 'community.flock.wirespec.openapi.v2.flatten.<anonymous>' call
|
|
2685
|
-
var it = toSet(destination_2);
|
|
2686
|
-
tmp = listOf(new Enum(null, toDescriptionAnnotationList(schemaObject.h1o_1), new DefinitionIdentifier(sanitize(name)), it));
|
|
2687
|
-
} else {
|
|
2688
|
-
var tmp6_subject = schemaObject.b1o_1;
|
|
2689
|
-
var tmp_18;
|
|
2690
|
-
switch (tmp6_subject == null ? -1 : tmp6_subject.r2_1) {
|
|
2691
|
-
case -1:
|
|
2692
|
-
case 5:
|
|
2693
|
-
// Inline function 'kotlin.collections.flatMap' call
|
|
2694
|
-
|
|
2695
|
-
// Inline function 'kotlin.collections.orEmpty' call
|
|
2696
|
-
|
|
2697
|
-
var tmp0_elvis_lhs_1 = schemaObject.r1o_1;
|
|
2698
|
-
// Inline function 'kotlin.collections.flatMapTo' call
|
|
2699
|
-
|
|
2700
|
-
var this_4 = tmp0_elvis_lhs_1 == null ? emptyMap() : tmp0_elvis_lhs_1;
|
|
2701
|
-
var destination_3 = ArrayList_init_$Create$();
|
|
2702
|
-
// Inline function 'kotlin.collections.iterator' call
|
|
2703
|
-
|
|
2704
|
-
var tmp0_iterator_4 = this_4.z().g();
|
|
2705
|
-
while (tmp0_iterator_4.h()) {
|
|
2706
|
-
var element_2 = tmp0_iterator_4.i();
|
|
2707
|
-
// Inline function 'community.flock.wirespec.openapi.v2.flatten.<anonymous>' call
|
|
2708
|
-
// Inline function 'kotlin.collections.component1' call
|
|
2709
|
-
var key_1 = element_2.a1();
|
|
2710
|
-
// Inline function 'kotlin.collections.component2' call
|
|
2711
|
-
var value_0 = element_2.b1();
|
|
2712
|
-
var list_3 = flatten(_this__u8e3s4, value_0, className([name, key_1]));
|
|
2713
|
-
addAll(destination_3, list_3);
|
|
2714
|
-
}
|
|
2715
|
-
|
|
2716
|
-
var fields = destination_3;
|
|
2717
|
-
var schema = listOf(new Type(null, toDescriptionAnnotationList(schemaObject.h1o_1), new DefinitionIdentifier(sanitize(name)), new Shape(toField_1(_this__u8e3s4, schemaObject, name)), emptyList()));
|
|
2718
|
-
tmp_18 = plus_0(schema, fields);
|
|
2719
|
-
break;
|
|
2720
|
-
case 4:
|
|
2721
|
-
var it_0 = schemaObject.p1o_1;
|
|
2722
|
-
var tmp_19;
|
|
2723
|
-
if (it_0 instanceof OpenAPIV2Reference) {
|
|
2724
|
-
tmp_19 = emptyList();
|
|
2725
|
-
} else {
|
|
2726
|
-
if (it_0 instanceof OpenAPIV2Schema) {
|
|
2727
|
-
tmp_19 = flatten_0(_this__u8e3s4, it_0, className([name, 'Array']));
|
|
2728
|
-
} else {
|
|
2729
|
-
if (it_0 == null) {
|
|
2730
|
-
tmp_19 = emptyList();
|
|
2731
|
-
} else {
|
|
2732
|
-
noWhenBranchMatchedException();
|
|
2733
|
-
}
|
|
2734
|
-
}
|
|
2735
|
-
}
|
|
2736
2742
|
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
}
|
|
2743
|
-
tmp = tmp_18;
|
|
2744
|
-
}
|
|
2745
|
-
}
|
|
2743
|
+
tmp_11 = tmp_12;
|
|
2744
|
+
break;
|
|
2745
|
+
default:
|
|
2746
|
+
tmp_11 = emptyList();
|
|
2747
|
+
break;
|
|
2746
2748
|
}
|
|
2749
|
+
tmp = tmp_11;
|
|
2747
2750
|
}
|
|
2748
2751
|
return tmp;
|
|
2749
2752
|
}
|
|
@@ -2941,12 +2944,12 @@ function toField_1(_this__u8e3s4, schema, name) {
|
|
|
2941
2944
|
}
|
|
2942
2945
|
function parseParameters$lambda($this_parseParameters) {
|
|
2943
2946
|
return function ($this$flatMapRequests) {
|
|
2944
|
-
var tmp = $this$flatMapRequests.
|
|
2947
|
+
var tmp = $this$flatMapRequests.y2e_1;
|
|
2945
2948
|
var tmp_0 = resolveParameters($this_parseParameters, (tmp instanceof OpenAPIV2PathItem ? tmp : THROW_CCE()).e1m_1);
|
|
2946
|
-
var tmp_1 = $this$flatMapRequests.
|
|
2949
|
+
var tmp_1 = $this$flatMapRequests.a2f_1;
|
|
2947
2950
|
var parameters = plus_0(tmp_0, resolveParameters($this_parseParameters, (tmp_1 instanceof OpenAPIV2Operation ? tmp_1 : THROW_CCE()).i1n_1));
|
|
2948
|
-
var tmp0_elvis_lhs = toName($this$flatMapRequests.
|
|
2949
|
-
var name = tmp0_elvis_lhs == null ? toName_0($this$flatMapRequests.
|
|
2951
|
+
var tmp0_elvis_lhs = toName($this$flatMapRequests.a2f_1);
|
|
2952
|
+
var name = tmp0_elvis_lhs == null ? toName_0($this$flatMapRequests.x2e_1) + $this$flatMapRequests.z2e_1.q2_1 : tmp0_elvis_lhs;
|
|
2950
2953
|
// Inline function 'kotlin.collections.flatMap' call
|
|
2951
2954
|
// Inline function 'kotlin.collections.filter' call
|
|
2952
2955
|
// Inline function 'kotlin.collections.filterTo' call
|
|
@@ -2984,12 +2987,12 @@ function parseParameters$lambda($this_parseParameters) {
|
|
|
2984
2987
|
}
|
|
2985
2988
|
function parseRequestBody$lambda($this_parseRequestBody) {
|
|
2986
2989
|
return function ($this$flatMapRequests) {
|
|
2987
|
-
var tmp = $this$flatMapRequests.
|
|
2990
|
+
var tmp = $this$flatMapRequests.y2e_1;
|
|
2988
2991
|
var tmp_0 = resolveParameters($this_parseRequestBody, (tmp instanceof OpenAPIV2PathItem ? tmp : THROW_CCE()).e1m_1);
|
|
2989
|
-
var tmp_1 = $this$flatMapRequests.
|
|
2992
|
+
var tmp_1 = $this$flatMapRequests.a2f_1;
|
|
2990
2993
|
var parameters = plus_0(tmp_0, resolveParameters($this_parseRequestBody, (tmp_1 instanceof OpenAPIV2Operation ? tmp_1 : THROW_CCE()).i1n_1));
|
|
2991
|
-
var tmp0_elvis_lhs = toName($this$flatMapRequests.
|
|
2992
|
-
var name = tmp0_elvis_lhs == null ? toName_0($this$flatMapRequests.
|
|
2994
|
+
var tmp0_elvis_lhs = toName($this$flatMapRequests.a2f_1);
|
|
2995
|
+
var name = tmp0_elvis_lhs == null ? toName_0($this$flatMapRequests.x2e_1) + $this$flatMapRequests.z2e_1.q2_1 : tmp0_elvis_lhs;
|
|
2993
2996
|
// Inline function 'kotlin.collections.flatMap' call
|
|
2994
2997
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
2995
2998
|
var destination = ArrayList_init_$Create$();
|
|
@@ -3020,7 +3023,7 @@ function parseRequestBody$lambda($this_parseRequestBody) {
|
|
|
3020
3023
|
addAll(destination, list);
|
|
3021
3024
|
}
|
|
3022
3025
|
var enums = destination;
|
|
3023
|
-
var tmp1_safe_receiver = $this$flatMapRequests.
|
|
3026
|
+
var tmp1_safe_receiver = $this$flatMapRequests.a2f_1.i1n_1;
|
|
3024
3027
|
var tmp_5;
|
|
3025
3028
|
if (tmp1_safe_receiver == null) {
|
|
3026
3029
|
tmp_5 = null;
|
|
@@ -3114,11 +3117,11 @@ function parseRequestBody$lambda($this_parseRequestBody) {
|
|
|
3114
3117
|
}
|
|
3115
3118
|
function parseResponseBody$lambda($this_parseResponseBody) {
|
|
3116
3119
|
return function ($this$flatMapResponses) {
|
|
3117
|
-
var tmp = $this$flatMapResponses.
|
|
3118
|
-
var schema = resolve_0($this_parseResponseBody, tmp
|
|
3119
|
-
var tmp_0 = $this$flatMapResponses.
|
|
3120
|
+
var tmp = $this$flatMapResponses.g2f_1;
|
|
3121
|
+
var schema = resolve_0($this_parseResponseBody, isInterface(tmp, OpenAPIV2ResponseOrReference) ? tmp : THROW_CCE()).j1l_1;
|
|
3122
|
+
var tmp_0 = $this$flatMapResponses.e2f_1;
|
|
3120
3123
|
var tmp0_elvis_lhs = toName(tmp_0 instanceof OpenAPIV2Operation ? tmp_0 : THROW_CCE());
|
|
3121
|
-
var name = tmp0_elvis_lhs == null ? toName_0($this$flatMapResponses.
|
|
3124
|
+
var name = tmp0_elvis_lhs == null ? toName_0($this$flatMapResponses.b2f_1) + $this$flatMapResponses.d2f_1.q2_1 : tmp0_elvis_lhs;
|
|
3122
3125
|
var tmp_1;
|
|
3123
3126
|
if (schema instanceof OpenAPIV2Schema) {
|
|
3124
3127
|
var tmp2_subject = schema.b1o_1;
|
|
@@ -3126,7 +3129,7 @@ function parseResponseBody$lambda($this_parseResponseBody) {
|
|
|
3126
3129
|
switch (tmp2_subject == null ? -1 : tmp2_subject.r2_1) {
|
|
3127
3130
|
case -1:
|
|
3128
3131
|
case 5:
|
|
3129
|
-
tmp_2 = flatten_0($this_parseResponseBody, schema, className([name, _StatusCode___get_value__impl__we50mu($this$flatMapResponses.
|
|
3132
|
+
tmp_2 = flatten_0($this_parseResponseBody, schema, className([name, _StatusCode___get_value__impl__we50mu($this$flatMapResponses.f2f_1), 'ResponseBody']));
|
|
3130
3133
|
break;
|
|
3131
3134
|
case 4:
|
|
3132
3135
|
// Inline function 'kotlin.collections.orEmpty' call
|
|
@@ -3139,7 +3142,7 @@ function parseResponseBody$lambda($this_parseResponseBody) {
|
|
|
3139
3142
|
// Inline function 'kotlin.let' call
|
|
3140
3143
|
// Inline function 'kotlin.contracts.contract' call
|
|
3141
3144
|
// Inline function 'community.flock.wirespec.openapi.v2.parseResponseBody.<anonymous>.<anonymous>' call
|
|
3142
|
-
tmp_3 = flatten($this_parseResponseBody, tmp3_safe_receiver, className([name, _StatusCode___get_value__impl__we50mu($this$flatMapResponses.
|
|
3145
|
+
tmp_3 = flatten($this_parseResponseBody, tmp3_safe_receiver, className([name, _StatusCode___get_value__impl__we50mu($this$flatMapResponses.f2f_1), 'ResponseBody']));
|
|
3143
3146
|
}
|
|
3144
3147
|
|
|
3145
3148
|
var tmp0_elvis_lhs_0 = tmp_3;
|
|
@@ -3316,31 +3319,31 @@ function emitPaths_0(_this__u8e3s4, $this, logger) {
|
|
|
3316
3319
|
return toMap(destination_1);
|
|
3317
3320
|
}
|
|
3318
3321
|
function emit_1(_this__u8e3s4, $this) {
|
|
3319
|
-
var type = _this__u8e3s4.e26_1.
|
|
3322
|
+
var type = _this__u8e3s4.e26_1.p29_1;
|
|
3320
3323
|
var tmp;
|
|
3321
3324
|
if (type instanceof Integer) {
|
|
3322
3325
|
var tmp4_type = OpenAPIV3Type_INTEGER_getInstance();
|
|
3323
|
-
var tmp0_safe_receiver = type.
|
|
3324
|
-
var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
3326
|
+
var tmp0_safe_receiver = type.v28_1;
|
|
3327
|
+
var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.q28_1;
|
|
3325
3328
|
var tmp5_minimum = tmp1_safe_receiver == null ? null : toDouble(tmp1_safe_receiver);
|
|
3326
|
-
var tmp2_safe_receiver = type.
|
|
3327
|
-
var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.
|
|
3329
|
+
var tmp2_safe_receiver = type.v28_1;
|
|
3330
|
+
var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.r28_1;
|
|
3328
3331
|
var tmp6_maximum = tmp3_safe_receiver == null ? null : toDouble(tmp3_safe_receiver);
|
|
3329
3332
|
tmp = new OpenAPIV3Schema(VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp4_type, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, 'int32', tmp6_maximum, VOID, tmp5_minimum);
|
|
3330
3333
|
} else {
|
|
3331
3334
|
if (type instanceof Number_0) {
|
|
3332
3335
|
var tmp11_type = OpenAPIV3Type_NUMBER_getInstance();
|
|
3333
|
-
var tmp7_safe_receiver = type.
|
|
3334
|
-
var tmp8_safe_receiver = tmp7_safe_receiver == null ? null : tmp7_safe_receiver.
|
|
3336
|
+
var tmp7_safe_receiver = type.y28_1;
|
|
3337
|
+
var tmp8_safe_receiver = tmp7_safe_receiver == null ? null : tmp7_safe_receiver.q28_1;
|
|
3335
3338
|
var tmp12_minimum = tmp8_safe_receiver == null ? null : toDouble(tmp8_safe_receiver);
|
|
3336
|
-
var tmp9_safe_receiver = type.
|
|
3337
|
-
var tmp10_safe_receiver = tmp9_safe_receiver == null ? null : tmp9_safe_receiver.
|
|
3339
|
+
var tmp9_safe_receiver = type.y28_1;
|
|
3340
|
+
var tmp10_safe_receiver = tmp9_safe_receiver == null ? null : tmp9_safe_receiver.r28_1;
|
|
3338
3341
|
var tmp13_maximum = tmp10_safe_receiver == null ? null : toDouble(tmp10_safe_receiver);
|
|
3339
3342
|
tmp = new OpenAPIV3Schema(VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp11_type, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, 'float', tmp13_maximum, VOID, tmp12_minimum);
|
|
3340
3343
|
} else {
|
|
3341
3344
|
if (type instanceof String_0) {
|
|
3342
3345
|
var tmp_0 = OpenAPIV3Type_STRING_getInstance();
|
|
3343
|
-
var tmp14_safe_receiver = type.
|
|
3346
|
+
var tmp14_safe_receiver = type.s28_1;
|
|
3344
3347
|
var tmp_1;
|
|
3345
3348
|
var tmp_2 = tmp14_safe_receiver;
|
|
3346
3349
|
if ((tmp_2 == null ? null : new RegExp_0(tmp_2)) == null) {
|
|
@@ -3802,7 +3805,7 @@ function emitHeader_0(_this__u8e3s4, $this, description) {
|
|
|
3802
3805
|
tmp = new OpenAPIV3Reference(_Ref___init__impl__7qfl46('#/components/headers/' + _this__u8e3s4.d23_1));
|
|
3803
3806
|
} else {
|
|
3804
3807
|
if (_this__u8e3s4 instanceof Custom) {
|
|
3805
|
-
tmp = new OpenAPIV3Reference(_Ref___init__impl__7qfl46('#/components/headers/' + _this__u8e3s4.
|
|
3808
|
+
tmp = new OpenAPIV3Reference(_Ref___init__impl__7qfl46('#/components/headers/' + _this__u8e3s4.l29_1));
|
|
3806
3809
|
} else {
|
|
3807
3810
|
if (_this__u8e3s4 instanceof Primitive) {
|
|
3808
3811
|
var tmp1_schema = emitSchema_0(_this__u8e3s4, $this);
|
|
@@ -3837,10 +3840,10 @@ function emitSchema_0(_this__u8e3s4, $this) {
|
|
|
3837
3840
|
tmp = new OpenAPIV3Schema(_this__u8e3s4.b23_1.jm(), VOID, VOID, VOID, VOID, VOID, VOID, OpenAPIV3Type_ARRAY_getInstance(), VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, emitSchema_0(_this__u8e3s4.b23_1, $this));
|
|
3838
3841
|
} else {
|
|
3839
3842
|
if (_this__u8e3s4 instanceof Custom) {
|
|
3840
|
-
tmp = new OpenAPIV3Reference(_Ref___init__impl__7qfl46('#/components/schemas/' + _this__u8e3s4.
|
|
3843
|
+
tmp = new OpenAPIV3Reference(_Ref___init__impl__7qfl46('#/components/schemas/' + _this__u8e3s4.l29_1));
|
|
3841
3844
|
} else {
|
|
3842
3845
|
if (_this__u8e3s4 instanceof Primitive) {
|
|
3843
|
-
var tmp1_type = emitType_1(_this__u8e3s4.
|
|
3846
|
+
var tmp1_type = emitType_1(_this__u8e3s4.p29_1, $this);
|
|
3844
3847
|
var tmp2_format = emitFormat(_this__u8e3s4);
|
|
3845
3848
|
var tmp3_pattern = emitPattern_0(_this__u8e3s4, $this);
|
|
3846
3849
|
var tmp4_minimum = emitMinimum_0(_this__u8e3s4, $this);
|
|
@@ -3895,10 +3898,10 @@ function emit_7(_this__u8e3s4, $this) {
|
|
|
3895
3898
|
function emitPattern_0(_this__u8e3s4, $this) {
|
|
3896
3899
|
var tmp;
|
|
3897
3900
|
if (_this__u8e3s4 instanceof Primitive) {
|
|
3898
|
-
var t = _this__u8e3s4.
|
|
3901
|
+
var t = _this__u8e3s4.p29_1;
|
|
3899
3902
|
var tmp_0;
|
|
3900
3903
|
if (t instanceof String_0) {
|
|
3901
|
-
var p = t.
|
|
3904
|
+
var p = t.s28_1;
|
|
3902
3905
|
var tmp_1;
|
|
3903
3906
|
var tmp_2 = p;
|
|
3904
3907
|
if ((tmp_2 == null ? null : new RegExp_0(tmp_2))instanceof RegExp_0) {
|
|
@@ -3919,16 +3922,16 @@ function emitPattern_0(_this__u8e3s4, $this) {
|
|
|
3919
3922
|
function emitMinimum_0(_this__u8e3s4, $this) {
|
|
3920
3923
|
var tmp;
|
|
3921
3924
|
if (_this__u8e3s4 instanceof Primitive) {
|
|
3922
|
-
var t = _this__u8e3s4.
|
|
3925
|
+
var t = _this__u8e3s4.p29_1;
|
|
3923
3926
|
var tmp_0;
|
|
3924
3927
|
if (t instanceof Number_0) {
|
|
3925
|
-
var tmp1_safe_receiver = t.
|
|
3926
|
-
var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.
|
|
3928
|
+
var tmp1_safe_receiver = t.y28_1;
|
|
3929
|
+
var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.q28_1;
|
|
3927
3930
|
tmp_0 = tmp2_safe_receiver == null ? null : toDouble(tmp2_safe_receiver);
|
|
3928
3931
|
} else {
|
|
3929
3932
|
if (t instanceof Integer) {
|
|
3930
|
-
var tmp3_safe_receiver = t.
|
|
3931
|
-
var tmp4_safe_receiver = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.
|
|
3933
|
+
var tmp3_safe_receiver = t.v28_1;
|
|
3934
|
+
var tmp4_safe_receiver = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.q28_1;
|
|
3932
3935
|
tmp_0 = tmp4_safe_receiver == null ? null : toDouble(tmp4_safe_receiver);
|
|
3933
3936
|
} else {
|
|
3934
3937
|
tmp_0 = null;
|
|
@@ -3943,16 +3946,16 @@ function emitMinimum_0(_this__u8e3s4, $this) {
|
|
|
3943
3946
|
function emitMaximum_0(_this__u8e3s4, $this) {
|
|
3944
3947
|
var tmp;
|
|
3945
3948
|
if (_this__u8e3s4 instanceof Primitive) {
|
|
3946
|
-
var t = _this__u8e3s4.
|
|
3949
|
+
var t = _this__u8e3s4.p29_1;
|
|
3947
3950
|
var tmp_0;
|
|
3948
3951
|
if (t instanceof Number_0) {
|
|
3949
|
-
var tmp1_safe_receiver = t.
|
|
3950
|
-
var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.
|
|
3952
|
+
var tmp1_safe_receiver = t.y28_1;
|
|
3953
|
+
var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.r28_1;
|
|
3951
3954
|
tmp_0 = tmp2_safe_receiver == null ? null : toDouble(tmp2_safe_receiver);
|
|
3952
3955
|
} else {
|
|
3953
3956
|
if (t instanceof Integer) {
|
|
3954
|
-
var tmp3_safe_receiver = t.
|
|
3955
|
-
var tmp4_safe_receiver = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.
|
|
3957
|
+
var tmp3_safe_receiver = t.v28_1;
|
|
3958
|
+
var tmp4_safe_receiver = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.r28_1;
|
|
3956
3959
|
tmp_0 = tmp4_safe_receiver == null ? null : toDouble(tmp4_safe_receiver);
|
|
3957
3960
|
} else {
|
|
3958
3961
|
tmp_0 = null;
|
|
@@ -3979,7 +3982,7 @@ function OpenAPIV3Emitter$emitSegment$lambda(it) {
|
|
|
3979
3982
|
}
|
|
3980
3983
|
function OpenAPIV3Emitter() {
|
|
3981
3984
|
OpenAPIV3Emitter_instance = this;
|
|
3982
|
-
this.
|
|
3985
|
+
this.k2f_1 = FileExtension_JSON_getInstance();
|
|
3983
3986
|
}
|
|
3984
3987
|
protoOf(OpenAPIV3Emitter).q22 = function (ast, logger) {
|
|
3985
3988
|
// Inline function 'kotlin.let' call
|
|
@@ -4005,10 +4008,10 @@ protoOf(OpenAPIV3Emitter).q22 = function (ast, logger) {
|
|
|
4005
4008
|
// Inline function 'kotlin.contracts.contract' call
|
|
4006
4009
|
// Inline function 'community.flock.wirespec.openapi.v3.OpenAPIV3Emitter.emit.<anonymous>' call
|
|
4007
4010
|
var it = tmp.uk(destination);
|
|
4008
|
-
var tmp_0 = 'OpenAPI.' + OpenAPIV3Emitter_getInstance().
|
|
4011
|
+
var tmp_0 = 'OpenAPI.' + OpenAPIV3Emitter_getInstance().k2f_1.p25_1;
|
|
4009
4012
|
// Inline function 'kotlinx.serialization.encodeToString' call
|
|
4010
4013
|
var this_2 = get_json();
|
|
4011
|
-
var value = OpenAPIV3Emitter_getInstance().
|
|
4014
|
+
var value = OpenAPIV3Emitter_getInstance().l2f(it, null, logger);
|
|
4012
4015
|
// Inline function 'kotlinx.serialization.serializer' call
|
|
4013
4016
|
var this_3 = this_2.zo();
|
|
4014
4017
|
// Inline function 'kotlinx.serialization.internal.cast' call
|
|
@@ -4020,10 +4023,10 @@ protoOf(OpenAPIV3Emitter).q22 = function (ast, logger) {
|
|
|
4020
4023
|
var it_0 = new Emitted(tmp_0, tmp$ret$7);
|
|
4021
4024
|
return nonEmptyListOf(it_0, []);
|
|
4022
4025
|
};
|
|
4023
|
-
protoOf(OpenAPIV3Emitter).
|
|
4024
|
-
var tmp1_elvis_lhs = options == null ? null : options.
|
|
4026
|
+
protoOf(OpenAPIV3Emitter).l2f = function (statements, options, logger) {
|
|
4027
|
+
var tmp1_elvis_lhs = options == null ? null : options.m2f_1;
|
|
4025
4028
|
var tmp = tmp1_elvis_lhs == null ? 'Wirespec' : tmp1_elvis_lhs;
|
|
4026
|
-
var tmp3_elvis_lhs = options == null ? null : options.
|
|
4029
|
+
var tmp3_elvis_lhs = options == null ? null : options.n2f_1;
|
|
4027
4030
|
var tmp4_info = new InfoObject(tmp, VOID, VOID, VOID, VOID, tmp3_elvis_lhs == null ? '0.0.0' : tmp3_elvis_lhs);
|
|
4028
4031
|
var tmp5_paths = emitPaths_0(statements, this, logger);
|
|
4029
4032
|
var tmp6_components = emitComponents(statements, this, logger);
|
|
@@ -4037,15 +4040,15 @@ function OpenAPIV3Emitter_getInstance() {
|
|
|
4037
4040
|
}
|
|
4038
4041
|
function OpenAPIV3Parser$parse$lambda($strict) {
|
|
4039
4042
|
return function (it) {
|
|
4040
|
-
return OpenAPIV3Parser_instance.
|
|
4043
|
+
return OpenAPIV3Parser_instance.o2f((new OpenAPIV3(jsonDefault($strict))).f1j(it));
|
|
4041
4044
|
};
|
|
4042
4045
|
}
|
|
4043
4046
|
function OpenAPIV3Parser() {
|
|
4044
4047
|
}
|
|
4045
|
-
protoOf(OpenAPIV3Parser).
|
|
4048
|
+
protoOf(OpenAPIV3Parser).w2e = function (moduleContent, strict) {
|
|
4046
4049
|
return parseOpenApi(moduleContent, OpenAPIV3Parser$parse$lambda(strict));
|
|
4047
4050
|
};
|
|
4048
|
-
protoOf(OpenAPIV3Parser).
|
|
4051
|
+
protoOf(OpenAPIV3Parser).o2f = function (_this__u8e3s4) {
|
|
4049
4052
|
// Inline function 'kotlin.let' call
|
|
4050
4053
|
// Inline function 'kotlin.collections.reduce' call
|
|
4051
4054
|
var iterator = listOf_0([parseEndpoints_0(_this__u8e3s4), parseParameters_0(_this__u8e3s4), parseRequestBody_0(_this__u8e3s4), parseResponseBody_0(_this__u8e3s4), parseDefinitions_0(_this__u8e3s4)]).g();
|
|
@@ -4060,7 +4063,7 @@ protoOf(OpenAPIV3Parser).i2f = function (_this__u8e3s4) {
|
|
|
4060
4063
|
var tmp$ret$1 = accumulator;
|
|
4061
4064
|
// Inline function 'kotlin.contracts.contract' call
|
|
4062
4065
|
// Inline function 'community.flock.wirespec.openapi.v3.OpenAPIV3Parser.parse.<anonymous>' call
|
|
4063
|
-
var it = toNonEmptyListOrNull(tmp$ret$1);
|
|
4066
|
+
var it = toNonEmptyListOrNull(resolveEndpointNameCollisions(tmp$ret$1));
|
|
4064
4067
|
var tmp$ret$3;
|
|
4065
4068
|
$l$block: {
|
|
4066
4069
|
// Inline function 'kotlin.requireNotNull' call
|
|
@@ -5503,12 +5506,12 @@ function toField_4(_this__u8e3s4, schema, name) {
|
|
|
5503
5506
|
}
|
|
5504
5507
|
function parseParameters$lambda_0($this_parseParameters) {
|
|
5505
5508
|
return function ($this$flatMapRequests) {
|
|
5506
|
-
var tmp = $this$flatMapRequests.
|
|
5509
|
+
var tmp = $this$flatMapRequests.y2e_1;
|
|
5507
5510
|
var tmp_0 = resolveParameters_0($this_parseParameters, (tmp instanceof OpenAPIV3PathItem ? tmp : THROW_CCE()).o1t_1);
|
|
5508
|
-
var tmp_1 = $this$flatMapRequests.
|
|
5511
|
+
var tmp_1 = $this$flatMapRequests.a2f_1;
|
|
5509
5512
|
var parameters = plus_0(tmp_0, resolveParameters_0($this_parseParameters, (tmp_1 instanceof OpenAPIV3Operation ? tmp_1 : THROW_CCE()).f1u_1));
|
|
5510
|
-
var tmp0_elvis_lhs = toName($this$flatMapRequests.
|
|
5511
|
-
var name = tmp0_elvis_lhs == null ? toName_0($this$flatMapRequests.
|
|
5513
|
+
var tmp0_elvis_lhs = toName($this$flatMapRequests.a2f_1);
|
|
5514
|
+
var name = tmp0_elvis_lhs == null ? toName_0($this$flatMapRequests.x2e_1) + $this$flatMapRequests.z2e_1.q2_1 : tmp0_elvis_lhs;
|
|
5512
5515
|
// Inline function 'kotlin.collections.flatMap' call
|
|
5513
5516
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
5514
5517
|
var destination = ArrayList_init_$Create$();
|
|
@@ -5535,12 +5538,12 @@ function parseParameters$lambda_0($this_parseParameters) {
|
|
|
5535
5538
|
}
|
|
5536
5539
|
function parseRequestBody$lambda_0($this_parseRequestBody) {
|
|
5537
5540
|
return function ($this$flatMapRequests) {
|
|
5538
|
-
var tmp = $this$flatMapRequests.
|
|
5541
|
+
var tmp = $this$flatMapRequests.a2f_1;
|
|
5539
5542
|
var tmp0_elvis_lhs = toName(tmp instanceof OpenAPIV3Operation ? tmp : THROW_CCE());
|
|
5540
|
-
var name = tmp0_elvis_lhs == null ? toName_0($this$flatMapRequests.
|
|
5543
|
+
var name = tmp0_elvis_lhs == null ? toName_0($this$flatMapRequests.x2e_1) + $this$flatMapRequests.z2e_1.q2_1 : tmp0_elvis_lhs;
|
|
5541
5544
|
// Inline function 'kotlin.collections.flatMap' call
|
|
5542
5545
|
// Inline function 'kotlin.collections.orEmpty' call
|
|
5543
|
-
var tmp1_safe_receiver = $this$flatMapRequests.
|
|
5546
|
+
var tmp1_safe_receiver = $this$flatMapRequests.a2f_1.g1u_1;
|
|
5544
5547
|
var tmp_0;
|
|
5545
5548
|
if (tmp1_safe_receiver == null) {
|
|
5546
5549
|
tmp_0 = null;
|
|
@@ -5615,17 +5618,17 @@ function parseRequestBody$lambda_0($this_parseRequestBody) {
|
|
|
5615
5618
|
}
|
|
5616
5619
|
function parseResponseBody$lambda_0($this_parseResponseBody) {
|
|
5617
5620
|
return function ($this$flatMapResponses) {
|
|
5618
|
-
var tmp = $this$flatMapResponses.
|
|
5621
|
+
var tmp = $this$flatMapResponses.e2f_1;
|
|
5619
5622
|
var tmp0_elvis_lhs = toName(tmp instanceof OpenAPIV3Operation ? tmp : THROW_CCE());
|
|
5620
|
-
var name = tmp0_elvis_lhs == null ? toName_0($this$flatMapResponses.
|
|
5621
|
-
var tmp_0 = $this$flatMapResponses.
|
|
5623
|
+
var name = tmp0_elvis_lhs == null ? toName_0($this$flatMapResponses.b2f_1) + $this$flatMapResponses.d2f_1.q2_1 : tmp0_elvis_lhs;
|
|
5624
|
+
var tmp_0 = $this$flatMapResponses.g2f_1;
|
|
5622
5625
|
var response = isInterface(tmp_0, OpenAPIV3ResponseOrReference) ? tmp_0 : THROW_CCE();
|
|
5623
5626
|
var tmp_1;
|
|
5624
5627
|
if (response instanceof OpenAPIV3Response) {
|
|
5625
|
-
tmp_1 = flatMapResponse($this_parseResponseBody, response, name, $this$flatMapResponses.
|
|
5628
|
+
tmp_1 = flatMapResponse($this_parseResponseBody, response, name, $this$flatMapResponses.f2f_1);
|
|
5626
5629
|
} else {
|
|
5627
5630
|
if (response instanceof OpenAPIV3Reference) {
|
|
5628
|
-
tmp_1 = flatMapResponse($this_parseResponseBody, resolveOpenAPIV3Response($this_parseResponseBody, response).fe_1, name, $this$flatMapResponses.
|
|
5631
|
+
tmp_1 = flatMapResponse($this_parseResponseBody, resolveOpenAPIV3Response($this_parseResponseBody, response).fe_1, name, $this$flatMapResponses.f2f_1);
|
|
5629
5632
|
} else {
|
|
5630
5633
|
noWhenBranchMatchedException();
|
|
5631
5634
|
}
|