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