@flock/wirespec 0.16.12 → 0.16.14
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/kotlin-kotlin-stdlib.mjs +5 -5
- package/kotlin-kotlin-stdlib.mjs.map +1 -1
- package/package.json +1 -1
- package/wirespec-src-compiler-emitters-java.mjs +71 -71
- package/wirespec-src-compiler-emitters-java.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-kotlin.mjs +20 -20
- package/wirespec-src-compiler-emitters-kotlin.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-python.mjs +50 -50
- package/wirespec-src-compiler-emitters-python.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-typescript.mjs +19 -12
- package/wirespec-src-compiler-emitters-typescript.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-wirespec.mjs +17 -17
- package/wirespec-src-compiler-emitters-wirespec.mjs.map +1 -1
- package/wirespec-src-compiler-lib.mjs +85 -68
- package/wirespec-src-compiler-lib.mjs.map +1 -1
- package/wirespec-src-converter-openapi.mjs +152 -148
- package/wirespec-src-converter-openapi.mjs.map +1 -1
- package/wirespec-src-plugin-npm.d.ts +1 -1
- package/wirespec-src-plugin-npm.mjs +307 -188
- package/wirespec-src-plugin-npm.mjs.map +1 -1
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Companion_instance2piryw1e8zn12 as Companion_instance,
|
|
3
|
-
Emitted12h24rpo4uifw as Emitted,
|
|
4
3
|
_Comment___get_value__impl__8r3pla12d959au1m11p as _Comment___get_value__impl__8r3pla,
|
|
5
4
|
Comment3h0atpoyd2ga8 as Comment,
|
|
6
5
|
Iterablerto606wd057m as Iterable,
|
|
@@ -19,6 +18,7 @@ import {
|
|
|
19
18
|
Literal32wmkquj6qapn as Literal,
|
|
20
19
|
Param33sus5zaarsk0 as Param,
|
|
21
20
|
FileExtension_JSON_getInstance17az9ircs0qds as FileExtension_JSON_getInstance,
|
|
21
|
+
Emitted12h24rpo4uifw as Emitted,
|
|
22
22
|
Endpoint1dn4dd2eg1gxz as Endpoint,
|
|
23
23
|
Method_GET_getInstance8splzmy83d3a as Method_GET_getInstance,
|
|
24
24
|
Method_POST_getInstance1o71cgxp73yf as Method_POST_getInstance,
|
|
@@ -60,11 +60,6 @@ import {
|
|
|
60
60
|
to2cs3ny02qtbcb as to,
|
|
61
61
|
toMap1vec9topfei08 as toMap,
|
|
62
62
|
initMetadataForObject1cxne3s9w65el as initMetadataForObject,
|
|
63
|
-
getKClass1s3j9wy1cofik as getKClass,
|
|
64
|
-
arrayOf1akklvh2at202 as arrayOf,
|
|
65
|
-
createKType1lgox3mzhchp5 as createKType,
|
|
66
|
-
THROW_CCE2g6jy02ryeudk as THROW_CCE,
|
|
67
|
-
isInterface3d6p8outrmvmk as isInterface,
|
|
68
63
|
collectionSizeOrDefault36dulx8yinfqm as collectionSizeOrDefault,
|
|
69
64
|
ArrayList_init_$Create$3m1kyiqequwm5 as ArrayList_init_$Create$_0,
|
|
70
65
|
firstOrNull1982767dljvdy as firstOrNull,
|
|
@@ -78,6 +73,11 @@ import {
|
|
|
78
73
|
toString1pkumu07cwy4m as toString,
|
|
79
74
|
IllegalStateException_init_$Create$1nm9y6jd3c9iy as IllegalStateException_init_$Create$,
|
|
80
75
|
toDouble1kn912gjoizjp as toDouble,
|
|
76
|
+
getKClass1s3j9wy1cofik as getKClass,
|
|
77
|
+
arrayOf1akklvh2at202 as arrayOf,
|
|
78
|
+
createKType1lgox3mzhchp5 as createKType,
|
|
79
|
+
THROW_CCE2g6jy02ryeudk as THROW_CCE,
|
|
80
|
+
isInterface3d6p8outrmvmk as isInterface,
|
|
81
81
|
listOfvhqybd2zx248 as listOf,
|
|
82
82
|
LinkedHashMap_init_$Create$2gfxg59gogbfz as LinkedHashMap_init_$Create$_0,
|
|
83
83
|
equals2au1ep9vhcato as equals,
|
|
@@ -113,7 +113,6 @@ import {
|
|
|
113
113
|
JsonPrimitiveolttw629wj53 as JsonPrimitive,
|
|
114
114
|
} from './kotlinx-serialization-kotlinx-serialization-json.mjs';
|
|
115
115
|
import {
|
|
116
|
-
SwaggerObject73dmk90m4fhk as SwaggerObject,
|
|
117
116
|
ParameterLocation_BODY_getInstance1v1gwd1t5o37m as ParameterLocation_BODY_getInstance,
|
|
118
117
|
ParameterObject3fho1jm5gzhuf as ParameterObject,
|
|
119
118
|
ParameterLocation_QUERY_getInstance3sz6z5qtxm79h as ParameterLocation_QUERY_getInstance,
|
|
@@ -132,12 +131,14 @@ import {
|
|
|
132
131
|
Type_BOOLEAN_getInstance33754pi8pf4h9 as Type_BOOLEAN_getInstance,
|
|
133
132
|
Type_NUMBER_getInstanceiwtkqu4ibanp as Type_NUMBER_getInstance,
|
|
134
133
|
Type_INTEGER_getInstancekt6ppwleiyxh as Type_INTEGER_getInstance,
|
|
134
|
+
OpenAPIObjectd8pbkdbpfozt as OpenAPIObject,
|
|
135
135
|
InfoObject129o03rtxiq8o as InfoObject,
|
|
136
136
|
_Path___init__impl__6uf4pwof1fowr3mxro as _Path___init__impl__6uf4pw,
|
|
137
137
|
ParameterLocation_PATH_getInstance22z7lj47orp2m as ParameterLocation_PATH_getInstance,
|
|
138
138
|
Path3lxd25tp7xomc as Path,
|
|
139
139
|
PathItemObject2heob9sihqr7e as PathItemObject,
|
|
140
140
|
Type_FILE_getInstance1x9mn7f7740hm as Type_FILE_getInstance,
|
|
141
|
+
SwaggerObject73dmk90m4fhk as SwaggerObject,
|
|
141
142
|
_StatusCode___get_value__impl__we50mu1nlm6j3i7juxr as _StatusCode___get_value__impl__we50mu,
|
|
142
143
|
Ref__toString_impl_irb7zi1p04b3j4s59ye as Ref__toString_impl_irb7zi,
|
|
143
144
|
BooleanObjecttjn04podz7ry as BooleanObject,
|
|
@@ -148,7 +149,6 @@ import {
|
|
|
148
149
|
StatusCode__toString_impl_6caewyjpl6zw0zuh68 as StatusCode__toString_impl_6caewy,
|
|
149
150
|
StatusCode__hashCode_impl_fevhvx12qd6fylv5kfj as StatusCode__hashCode_impl_fevhvx,
|
|
150
151
|
OpenAPI3nelu5jea1vb2 as OpenAPI,
|
|
151
|
-
OpenAPIObjectd8pbkdbpfozt as OpenAPIObject,
|
|
152
152
|
ComponentsObjectykgr87pc5z6j as ComponentsObject,
|
|
153
153
|
_Path___init__impl__6uf4pw3bh64wx1cqifl as _Path___init__impl__6uf4pw_0,
|
|
154
154
|
Path2hub61jm3fqpv as Path_0,
|
|
@@ -280,23 +280,10 @@ function Common_getInstance() {
|
|
|
280
280
|
new Common();
|
|
281
281
|
return Common_instance;
|
|
282
282
|
}
|
|
283
|
-
function emit($this, module_0) {
|
|
284
|
-
var tmp = 'Swagger.' + OpenAPIV3Emitter_getInstance().v2e_1.z25_1;
|
|
285
|
-
// Inline function 'kotlinx.serialization.encodeToString' call
|
|
286
|
-
var this_0 = Common_getInstance().s2e_1;
|
|
287
|
-
var value = $this.x2e(module_0);
|
|
288
|
-
// Inline function 'kotlinx.serialization.serializer' call
|
|
289
|
-
var this_1 = this_0.zo();
|
|
290
|
-
// Inline function 'kotlinx.serialization.internal.cast' call
|
|
291
|
-
var this_2 = serializer(this_1, createKType(getKClass(SwaggerObject), arrayOf([]), false));
|
|
292
|
-
var tmp$ret$1 = isInterface(this_2, KSerializer) ? this_2 : THROW_CCE();
|
|
293
|
-
var tmp$ret$2 = this_0.m15(tmp$ret$1, value);
|
|
294
|
-
return nonEmptyListOf(new Emitted(tmp, tmp$ret$2), []);
|
|
295
|
-
}
|
|
296
283
|
function toProperties(_this__u8e3s4, $this) {
|
|
297
284
|
return to(_this__u8e3s4.o24_1.b1(), toSchemaOrReference(_this__u8e3s4.p24_1, $this));
|
|
298
285
|
}
|
|
299
|
-
function
|
|
286
|
+
function emit(_this__u8e3s4, $this, method) {
|
|
300
287
|
// Inline function 'kotlin.collections.map' call
|
|
301
288
|
// Inline function 'kotlin.collections.filter' call
|
|
302
289
|
// Inline function 'kotlin.collections.filterTo' call
|
|
@@ -315,12 +302,12 @@ function emit_0(_this__u8e3s4, $this, method) {
|
|
|
315
302
|
while (tmp0_iterator_0.h()) {
|
|
316
303
|
var item = tmp0_iterator_0.i();
|
|
317
304
|
// Inline function 'community.flock.wirespec.openapi.v2.OpenAPIV2Emitter.emit.<anonymous>' call
|
|
318
|
-
var tmp$ret$3 =
|
|
305
|
+
var tmp$ret$3 = emit_0(item, OpenAPIV2Emitter_getInstance());
|
|
319
306
|
destination_0.e(tmp$ret$3);
|
|
320
307
|
}
|
|
321
308
|
return firstOrNull(destination_0);
|
|
322
309
|
}
|
|
323
|
-
function
|
|
310
|
+
function emit_0(_this__u8e3s4, $this) {
|
|
324
311
|
var tmp1_operationId = _this__u8e3s4.r24_1.b1();
|
|
325
312
|
var tmp0_safe_receiver = _this__u8e3s4.q24_1;
|
|
326
313
|
var tmp;
|
|
@@ -762,14 +749,15 @@ function OpenAPIV2Emitter$emitSegment$lambda(it) {
|
|
|
762
749
|
}
|
|
763
750
|
function OpenAPIV2Emitter() {
|
|
764
751
|
OpenAPIV2Emitter_instance = this;
|
|
765
|
-
this.
|
|
752
|
+
this.v2e_1 = FileExtension_JSON_getInstance();
|
|
766
753
|
}
|
|
767
754
|
protoOf(OpenAPIV2Emitter).g23 = function (ast, logger) {
|
|
755
|
+
// Inline function 'kotlin.let' call
|
|
756
|
+
// Inline function 'kotlin.let' call
|
|
768
757
|
// Inline function 'arrow.core.NonEmptyList.flatMap' call
|
|
769
758
|
var this_0 = ast.n25_1;
|
|
770
759
|
// Inline function 'community.flock.wirespec.openapi.v2.OpenAPIV2Emitter.emit.<anonymous>' call
|
|
771
|
-
var
|
|
772
|
-
var tmp = emit(OpenAPIV2Emitter_getInstance(), it).nk();
|
|
760
|
+
var tmp = this_0.pk_1.p25_1.nk();
|
|
773
761
|
// Inline function 'kotlin.collections.flatMap' call
|
|
774
762
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
775
763
|
var this_1 = this_0.qk_1;
|
|
@@ -778,12 +766,28 @@ protoOf(OpenAPIV2Emitter).g23 = function (ast, logger) {
|
|
|
778
766
|
while (tmp0_iterator.h()) {
|
|
779
767
|
var element = tmp0_iterator.i();
|
|
780
768
|
// Inline function 'community.flock.wirespec.openapi.v2.OpenAPIV2Emitter.emit.<anonymous>' call
|
|
781
|
-
var list =
|
|
769
|
+
var list = element.p25_1;
|
|
782
770
|
addAll(destination, list);
|
|
783
771
|
}
|
|
784
|
-
|
|
772
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
773
|
+
// Inline function 'community.flock.wirespec.openapi.v2.OpenAPIV2Emitter.emit.<anonymous>' call
|
|
774
|
+
var it = tmp.uk(destination);
|
|
775
|
+
var tmp_0 = 'OpenAPI.' + OpenAPIV3Emitter_getInstance().w2e_1.z25_1;
|
|
776
|
+
// Inline function 'kotlinx.serialization.encodeToString' call
|
|
777
|
+
var this_2 = Common_getInstance().s2e_1;
|
|
778
|
+
var value = OpenAPIV3Emitter_getInstance().x2e(it, null);
|
|
779
|
+
// Inline function 'kotlinx.serialization.serializer' call
|
|
780
|
+
var this_3 = this_2.zo();
|
|
781
|
+
// Inline function 'kotlinx.serialization.internal.cast' call
|
|
782
|
+
var this_4 = serializer(this_3, createKType(getKClass(OpenAPIObject), arrayOf([]), false));
|
|
783
|
+
var tmp$ret$6 = isInterface(this_4, KSerializer) ? this_4 : THROW_CCE();
|
|
784
|
+
var tmp$ret$7 = this_2.m15(tmp$ret$6, value);
|
|
785
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
786
|
+
// Inline function 'community.flock.wirespec.openapi.v2.OpenAPIV2Emitter.emit.<anonymous>' call
|
|
787
|
+
var it_0 = new Emitted(tmp_0, tmp$ret$7);
|
|
788
|
+
return nonEmptyListOf(it_0, []);
|
|
785
789
|
};
|
|
786
|
-
protoOf(OpenAPIV2Emitter).
|
|
790
|
+
protoOf(OpenAPIV2Emitter).y2e = function (statements) {
|
|
787
791
|
var tmp = new InfoObject('Wirespec', VOID, VOID, VOID, VOID, '0.0.0');
|
|
788
792
|
var tmp_0 = listOf('application/json');
|
|
789
793
|
var tmp_1 = listOf('application/json');
|
|
@@ -791,9 +795,8 @@ protoOf(OpenAPIV2Emitter).x2e = function (module_0) {
|
|
|
791
795
|
// Inline function 'kotlin.collections.groupBy' call
|
|
792
796
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
793
797
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
794
|
-
var this_0 = module_0.p25_1;
|
|
795
798
|
var destination = ArrayList_init_$Create$();
|
|
796
|
-
var tmp0_iterator =
|
|
799
|
+
var tmp0_iterator = statements.g();
|
|
797
800
|
while (tmp0_iterator.h()) {
|
|
798
801
|
var element = tmp0_iterator.i();
|
|
799
802
|
if (element instanceof Endpoint) {
|
|
@@ -859,14 +862,14 @@ protoOf(OpenAPIV2Emitter).x2e = function (module_0) {
|
|
|
859
862
|
var tmp$ret$12 = new ParameterObject(tmp1_name, tmp0_in, VOID, VOID, VOID, tmp2_type, VOID, tmp3_format, VOID, VOID, VOID, VOID, VOID, tmp5_minimum, VOID, VOID, VOID, tmp4_pattern);
|
|
860
863
|
destination_3.e(tmp$ret$12);
|
|
861
864
|
}
|
|
862
|
-
var tmp1_get =
|
|
863
|
-
var tmp2_post =
|
|
864
|
-
var tmp3_put =
|
|
865
|
-
var tmp4_delete =
|
|
866
|
-
var tmp5_patch =
|
|
867
|
-
var tmp6_options =
|
|
868
|
-
var tmp7_trace =
|
|
869
|
-
var tmp8_head =
|
|
865
|
+
var tmp1_get = emit(endpoints, OpenAPIV2Emitter_getInstance(), Method_GET_getInstance());
|
|
866
|
+
var tmp2_post = emit(endpoints, OpenAPIV2Emitter_getInstance(), Method_POST_getInstance());
|
|
867
|
+
var tmp3_put = emit(endpoints, OpenAPIV2Emitter_getInstance(), Method_PUT_getInstance());
|
|
868
|
+
var tmp4_delete = emit(endpoints, OpenAPIV2Emitter_getInstance(), Method_DELETE_getInstance());
|
|
869
|
+
var tmp5_patch = emit(endpoints, OpenAPIV2Emitter_getInstance(), Method_PATCH_getInstance());
|
|
870
|
+
var tmp6_options = emit(endpoints, OpenAPIV2Emitter_getInstance(), Method_OPTIONS_getInstance());
|
|
871
|
+
var tmp7_trace = emit(endpoints, OpenAPIV2Emitter_getInstance(), Method_TRACE_getInstance());
|
|
872
|
+
var tmp8_head = emit(endpoints, OpenAPIV2Emitter_getInstance(), Method_HEAD_getInstance());
|
|
870
873
|
var tmp$ret$15 = to(new Path(tmp_3), new PathItemObject(VOID, VOID, VOID, tmp1_get, tmp3_put, tmp2_post, tmp4_delete, tmp6_options, tmp8_head, tmp5_patch, tmp7_trace, VOID, destination_3));
|
|
871
874
|
destination_1.e(tmp$ret$15);
|
|
872
875
|
}
|
|
@@ -874,9 +877,8 @@ protoOf(OpenAPIV2Emitter).x2e = function (module_0) {
|
|
|
874
877
|
// Inline function 'kotlin.collections.associate' call
|
|
875
878
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
876
879
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
877
|
-
var this_1 = module_0.p25_1;
|
|
878
880
|
var destination_4 = ArrayList_init_$Create$();
|
|
879
|
-
var tmp0_iterator_4 =
|
|
881
|
+
var tmp0_iterator_4 = statements.g();
|
|
880
882
|
while (tmp0_iterator_4.h()) {
|
|
881
883
|
var element_2 = tmp0_iterator_4.i();
|
|
882
884
|
if (element_2 instanceof Refined) {
|
|
@@ -953,9 +955,8 @@ protoOf(OpenAPIV2Emitter).x2e = function (module_0) {
|
|
|
953
955
|
// Inline function 'kotlin.collections.associate' call
|
|
954
956
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
955
957
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
956
|
-
var this_2 = module_0.p25_1;
|
|
957
958
|
var destination_6 = ArrayList_init_$Create$();
|
|
958
|
-
var tmp0_iterator_6 =
|
|
959
|
+
var tmp0_iterator_6 = statements.g();
|
|
959
960
|
while (tmp0_iterator_6.h()) {
|
|
960
961
|
var element_4 = tmp0_iterator_6.i();
|
|
961
962
|
if (element_4 instanceof Type) {
|
|
@@ -972,11 +973,11 @@ protoOf(OpenAPIV2Emitter).x2e = function (module_0) {
|
|
|
972
973
|
// Inline function 'community.flock.wirespec.openapi.v2.OpenAPIV2Emitter.emitSwaggerObject.<anonymous>' call
|
|
973
974
|
var tmp_13 = element_5.k24_1.b1();
|
|
974
975
|
// Inline function 'kotlin.collections.associate' call
|
|
975
|
-
var
|
|
976
|
-
var capacity_1 = coerceAtLeast(mapCapacity(collectionSizeOrDefault(
|
|
976
|
+
var this_0 = element_5.l24_1.i24_1;
|
|
977
|
+
var capacity_1 = coerceAtLeast(mapCapacity(collectionSizeOrDefault(this_0, 10)), 16);
|
|
977
978
|
// Inline function 'kotlin.collections.associateTo' call
|
|
978
979
|
var destination_8 = LinkedHashMap_init_$Create$(capacity_1);
|
|
979
|
-
var tmp0_iterator_8 =
|
|
980
|
+
var tmp0_iterator_8 = this_0.g();
|
|
980
981
|
while (tmp0_iterator_8.h()) {
|
|
981
982
|
var element_6 = tmp0_iterator_8.i();
|
|
982
983
|
// Inline function 'kotlin.collections.plusAssign' call
|
|
@@ -988,9 +989,9 @@ protoOf(OpenAPIV2Emitter).x2e = function (module_0) {
|
|
|
988
989
|
// Inline function 'kotlin.collections.map' call
|
|
989
990
|
// Inline function 'kotlin.collections.filter' call
|
|
990
991
|
// Inline function 'kotlin.collections.filterTo' call
|
|
991
|
-
var
|
|
992
|
+
var this_1 = element_5.l24_1.i24_1;
|
|
992
993
|
var destination_9 = ArrayList_init_$Create$();
|
|
993
|
-
var tmp0_iterator_9 =
|
|
994
|
+
var tmp0_iterator_9 = this_1.g();
|
|
994
995
|
while (tmp0_iterator_9.h()) {
|
|
995
996
|
var element_7 = tmp0_iterator_9.i();
|
|
996
997
|
// Inline function 'community.flock.wirespec.openapi.v2.OpenAPIV2Emitter.emitSwaggerObject.<anonymous>.<anonymous>' call
|
|
@@ -1024,9 +1025,8 @@ protoOf(OpenAPIV2Emitter).x2e = function (module_0) {
|
|
|
1024
1025
|
// Inline function 'kotlin.collections.associate' call
|
|
1025
1026
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
1026
1027
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
1027
|
-
var this_5 = module_0.p25_1;
|
|
1028
1028
|
var destination_11 = ArrayList_init_$Create$();
|
|
1029
|
-
var tmp0_iterator_11 =
|
|
1029
|
+
var tmp0_iterator_11 = statements.g();
|
|
1030
1030
|
while (tmp0_iterator_11.h()) {
|
|
1031
1031
|
var element_8 = tmp0_iterator_11.i();
|
|
1032
1032
|
if (element_8 instanceof Enum) {
|
|
@@ -1044,10 +1044,10 @@ protoOf(OpenAPIV2Emitter).x2e = function (module_0) {
|
|
|
1044
1044
|
var tmp_16 = element_9.q26_1.b1();
|
|
1045
1045
|
var tmp0_type = Type_STRING_getInstance();
|
|
1046
1046
|
// Inline function 'kotlin.collections.map' call
|
|
1047
|
-
var
|
|
1047
|
+
var this_2 = element_9.r26_1;
|
|
1048
1048
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1049
|
-
var destination_13 = ArrayList_init_$Create$_0(collectionSizeOrDefault(
|
|
1050
|
-
var tmp0_iterator_13 =
|
|
1049
|
+
var destination_13 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_2, 10));
|
|
1050
|
+
var tmp0_iterator_13 = this_2.g();
|
|
1051
1051
|
while (tmp0_iterator_13.h()) {
|
|
1052
1052
|
var item_2 = tmp0_iterator_13.i();
|
|
1053
1053
|
// Inline function 'community.flock.wirespec.openapi.v2.OpenAPIV2Emitter.emitSwaggerObject.<anonymous>.<anonymous>' call
|
|
@@ -2304,21 +2304,21 @@ function toName_0(_this__u8e3s4, $this) {
|
|
|
2304
2304
|
return joinToString(tmp, '', VOID, VOID, VOID, VOID, OpenAPIV2Parser$toName$lambda);
|
|
2305
2305
|
}
|
|
2306
2306
|
function FlattenRequest(path, pathItem, method, operation, type) {
|
|
2307
|
-
this.
|
|
2308
|
-
this.
|
|
2309
|
-
this.
|
|
2310
|
-
this.
|
|
2311
|
-
this.
|
|
2307
|
+
this.z2e_1 = path;
|
|
2308
|
+
this.a2f_1 = pathItem;
|
|
2309
|
+
this.b2f_1 = method;
|
|
2310
|
+
this.c2f_1 = operation;
|
|
2311
|
+
this.d2f_1 = type;
|
|
2312
2312
|
}
|
|
2313
2313
|
protoOf(FlattenRequest).toString = function () {
|
|
2314
|
-
return 'FlattenRequest(path=' + Path__toString_impl_wlr1lw(this.
|
|
2314
|
+
return 'FlattenRequest(path=' + Path__toString_impl_wlr1lw(this.z2e_1) + ', pathItem=' + this.a2f_1.toString() + ', method=' + this.b2f_1.toString() + ', operation=' + this.c2f_1.toString() + ', type=' + this.d2f_1 + ')';
|
|
2315
2315
|
};
|
|
2316
2316
|
protoOf(FlattenRequest).hashCode = function () {
|
|
2317
|
-
var result = Path__hashCode_impl_go73kd(this.
|
|
2318
|
-
result = imul(result, 31) + this.z2e_1.hashCode() | 0;
|
|
2317
|
+
var result = Path__hashCode_impl_go73kd(this.z2e_1);
|
|
2319
2318
|
result = imul(result, 31) + this.a2f_1.hashCode() | 0;
|
|
2320
2319
|
result = imul(result, 31) + this.b2f_1.hashCode() | 0;
|
|
2321
|
-
result = imul(result, 31) +
|
|
2320
|
+
result = imul(result, 31) + this.c2f_1.hashCode() | 0;
|
|
2321
|
+
result = imul(result, 31) + getStringHashCode(this.d2f_1) | 0;
|
|
2322
2322
|
return result;
|
|
2323
2323
|
};
|
|
2324
2324
|
protoOf(FlattenRequest).equals = function (other) {
|
|
@@ -2327,15 +2327,15 @@ protoOf(FlattenRequest).equals = function (other) {
|
|
|
2327
2327
|
if (!(other instanceof FlattenRequest))
|
|
2328
2328
|
return false;
|
|
2329
2329
|
var tmp0_other_with_cast = other instanceof FlattenRequest ? other : THROW_CCE();
|
|
2330
|
-
if (!(this.
|
|
2331
|
-
return false;
|
|
2332
|
-
if (!this.z2e_1.equals(tmp0_other_with_cast.z2e_1))
|
|
2330
|
+
if (!(this.z2e_1 === tmp0_other_with_cast.z2e_1))
|
|
2333
2331
|
return false;
|
|
2334
2332
|
if (!this.a2f_1.equals(tmp0_other_with_cast.a2f_1))
|
|
2335
2333
|
return false;
|
|
2336
2334
|
if (!this.b2f_1.equals(tmp0_other_with_cast.b2f_1))
|
|
2337
2335
|
return false;
|
|
2338
|
-
if (!
|
|
2336
|
+
if (!this.c2f_1.equals(tmp0_other_with_cast.c2f_1))
|
|
2337
|
+
return false;
|
|
2338
|
+
if (!(this.d2f_1 === tmp0_other_with_cast.d2f_1))
|
|
2339
2339
|
return false;
|
|
2340
2340
|
return true;
|
|
2341
2341
|
};
|
|
@@ -2397,25 +2397,25 @@ function flatMapRequests(_this__u8e3s4, $this, f) {
|
|
|
2397
2397
|
return destination_2;
|
|
2398
2398
|
}
|
|
2399
2399
|
function FlattenResponse(path, pathItem, method, operation, statusCode, response, type) {
|
|
2400
|
-
this.
|
|
2401
|
-
this.
|
|
2402
|
-
this.
|
|
2403
|
-
this.
|
|
2404
|
-
this.
|
|
2405
|
-
this.
|
|
2406
|
-
this.
|
|
2400
|
+
this.e2f_1 = path;
|
|
2401
|
+
this.f2f_1 = pathItem;
|
|
2402
|
+
this.g2f_1 = method;
|
|
2403
|
+
this.h2f_1 = operation;
|
|
2404
|
+
this.i2f_1 = statusCode;
|
|
2405
|
+
this.j2f_1 = response;
|
|
2406
|
+
this.k2f_1 = type;
|
|
2407
2407
|
}
|
|
2408
2408
|
protoOf(FlattenResponse).toString = function () {
|
|
2409
|
-
return 'FlattenResponse(path=' + Path__toString_impl_wlr1lw(this.
|
|
2409
|
+
return 'FlattenResponse(path=' + Path__toString_impl_wlr1lw(this.e2f_1) + ', pathItem=' + this.f2f_1.toString() + ', method=' + this.g2f_1.toString() + ', operation=' + this.h2f_1.toString() + ', statusCode=' + StatusCode__toString_impl_6caewy(this.i2f_1) + ', response=' + toString(this.j2f_1) + ', type=' + this.k2f_1 + ')';
|
|
2410
2410
|
};
|
|
2411
2411
|
protoOf(FlattenResponse).hashCode = function () {
|
|
2412
|
-
var result = Path__hashCode_impl_go73kd(this.
|
|
2413
|
-
result = imul(result, 31) + this.e2f_1.hashCode() | 0;
|
|
2412
|
+
var result = Path__hashCode_impl_go73kd(this.e2f_1);
|
|
2414
2413
|
result = imul(result, 31) + this.f2f_1.hashCode() | 0;
|
|
2415
2414
|
result = imul(result, 31) + this.g2f_1.hashCode() | 0;
|
|
2416
|
-
result = imul(result, 31) +
|
|
2417
|
-
result = imul(result, 31) +
|
|
2418
|
-
result = imul(result, 31) +
|
|
2415
|
+
result = imul(result, 31) + this.h2f_1.hashCode() | 0;
|
|
2416
|
+
result = imul(result, 31) + StatusCode__hashCode_impl_fevhvx(this.i2f_1) | 0;
|
|
2417
|
+
result = imul(result, 31) + hashCode(this.j2f_1) | 0;
|
|
2418
|
+
result = imul(result, 31) + getStringHashCode(this.k2f_1) | 0;
|
|
2419
2419
|
return result;
|
|
2420
2420
|
};
|
|
2421
2421
|
protoOf(FlattenResponse).equals = function (other) {
|
|
@@ -2424,19 +2424,19 @@ protoOf(FlattenResponse).equals = function (other) {
|
|
|
2424
2424
|
if (!(other instanceof FlattenResponse))
|
|
2425
2425
|
return false;
|
|
2426
2426
|
var tmp0_other_with_cast = other instanceof FlattenResponse ? other : THROW_CCE();
|
|
2427
|
-
if (!(this.
|
|
2428
|
-
return false;
|
|
2429
|
-
if (!this.e2f_1.equals(tmp0_other_with_cast.e2f_1))
|
|
2427
|
+
if (!(this.e2f_1 === tmp0_other_with_cast.e2f_1))
|
|
2430
2428
|
return false;
|
|
2431
2429
|
if (!this.f2f_1.equals(tmp0_other_with_cast.f2f_1))
|
|
2432
2430
|
return false;
|
|
2433
2431
|
if (!this.g2f_1.equals(tmp0_other_with_cast.g2f_1))
|
|
2434
2432
|
return false;
|
|
2435
|
-
if (!
|
|
2433
|
+
if (!this.h2f_1.equals(tmp0_other_with_cast.h2f_1))
|
|
2434
|
+
return false;
|
|
2435
|
+
if (!(this.i2f_1 === tmp0_other_with_cast.i2f_1))
|
|
2436
2436
|
return false;
|
|
2437
|
-
if (!equals(this.
|
|
2437
|
+
if (!equals(this.j2f_1, tmp0_other_with_cast.j2f_1))
|
|
2438
2438
|
return false;
|
|
2439
|
-
if (!(this.
|
|
2439
|
+
if (!(this.k2f_1 === tmp0_other_with_cast.k2f_1))
|
|
2440
2440
|
return false;
|
|
2441
2441
|
return true;
|
|
2442
2442
|
};
|
|
@@ -2524,9 +2524,9 @@ function OpenAPIV2Parser$parse$lambda($strict) {
|
|
|
2524
2524
|
}
|
|
2525
2525
|
function OpenAPIV2Parser$parseParameters$lambda($this_parseParameters) {
|
|
2526
2526
|
return function ($this$flatMapRequests) {
|
|
2527
|
-
var parameters = plus(resolveParameters_0($this_parseParameters, OpenAPIV2Parser_instance, $this$flatMapRequests.
|
|
2528
|
-
var tmp0_elvis_lhs = toName($this$flatMapRequests.
|
|
2529
|
-
var name = tmp0_elvis_lhs == null ? toName_0($this$flatMapRequests.
|
|
2527
|
+
var parameters = plus(resolveParameters_0($this_parseParameters, OpenAPIV2Parser_instance, $this$flatMapRequests.a2f_1), resolveParameters($this_parseParameters, OpenAPIV2Parser_instance, $this$flatMapRequests.c2f_1));
|
|
2528
|
+
var tmp0_elvis_lhs = toName($this$flatMapRequests.c2f_1, OpenAPIV2Parser_instance);
|
|
2529
|
+
var name = tmp0_elvis_lhs == null ? toName_0($this$flatMapRequests.z2e_1, OpenAPIV2Parser_instance) + $this$flatMapRequests.b2f_1.q2_1 : tmp0_elvis_lhs;
|
|
2530
2530
|
// Inline function 'kotlin.collections.flatMap' call
|
|
2531
2531
|
// Inline function 'kotlin.collections.filter' call
|
|
2532
2532
|
// Inline function 'kotlin.collections.filterTo' call
|
|
@@ -2564,9 +2564,9 @@ function OpenAPIV2Parser$parseParameters$lambda($this_parseParameters) {
|
|
|
2564
2564
|
}
|
|
2565
2565
|
function OpenAPIV2Parser$parseRequestBody$lambda($this_parseRequestBody) {
|
|
2566
2566
|
return function ($this$flatMapRequests) {
|
|
2567
|
-
var parameters = plus(resolveParameters_0($this_parseRequestBody, OpenAPIV2Parser_instance, $this$flatMapRequests.
|
|
2568
|
-
var tmp0_elvis_lhs = toName($this$flatMapRequests.
|
|
2569
|
-
var name = tmp0_elvis_lhs == null ? toName_0($this$flatMapRequests.
|
|
2567
|
+
var parameters = plus(resolveParameters_0($this_parseRequestBody, OpenAPIV2Parser_instance, $this$flatMapRequests.a2f_1), resolveParameters($this_parseRequestBody, OpenAPIV2Parser_instance, $this$flatMapRequests.c2f_1));
|
|
2568
|
+
var tmp0_elvis_lhs = toName($this$flatMapRequests.c2f_1, OpenAPIV2Parser_instance);
|
|
2569
|
+
var name = tmp0_elvis_lhs == null ? toName_0($this$flatMapRequests.z2e_1, OpenAPIV2Parser_instance) + $this$flatMapRequests.b2f_1.q2_1 : tmp0_elvis_lhs;
|
|
2570
2570
|
// Inline function 'kotlin.collections.flatMap' call
|
|
2571
2571
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
2572
2572
|
var destination = ArrayList_init_$Create$();
|
|
@@ -2596,7 +2596,7 @@ function OpenAPIV2Parser$parseRequestBody$lambda($this_parseRequestBody) {
|
|
|
2596
2596
|
addAll(destination, list);
|
|
2597
2597
|
}
|
|
2598
2598
|
var enums = destination;
|
|
2599
|
-
var tmp1_safe_receiver = $this$flatMapRequests.
|
|
2599
|
+
var tmp1_safe_receiver = $this$flatMapRequests.c2f_1.y1l_1;
|
|
2600
2600
|
var tmp_1;
|
|
2601
2601
|
if (tmp1_safe_receiver == null) {
|
|
2602
2602
|
tmp_1 = null;
|
|
@@ -2690,9 +2690,9 @@ function OpenAPIV2Parser$parseRequestBody$lambda($this_parseRequestBody) {
|
|
|
2690
2690
|
}
|
|
2691
2691
|
function OpenAPIV2Parser$parseResponseBody$lambda($this_parseResponseBody) {
|
|
2692
2692
|
return function ($this$flatMapResponses) {
|
|
2693
|
-
var schema = resolve_1($this_parseResponseBody, OpenAPIV2Parser_instance, $this$flatMapResponses.
|
|
2694
|
-
var tmp0_elvis_lhs = toName($this$flatMapResponses.
|
|
2695
|
-
var name = tmp0_elvis_lhs == null ? toName_0($this$flatMapResponses.
|
|
2693
|
+
var schema = resolve_1($this_parseResponseBody, OpenAPIV2Parser_instance, $this$flatMapResponses.j2f_1).c1k_1;
|
|
2694
|
+
var tmp0_elvis_lhs = toName($this$flatMapResponses.h2f_1, OpenAPIV2Parser_instance);
|
|
2695
|
+
var name = tmp0_elvis_lhs == null ? toName_0($this$flatMapResponses.e2f_1, OpenAPIV2Parser_instance) + $this$flatMapResponses.g2f_1.q2_1 : tmp0_elvis_lhs;
|
|
2696
2696
|
var tmp;
|
|
2697
2697
|
if (schema instanceof SchemaObject) {
|
|
2698
2698
|
var tmp2_subject = schema.v1n_1;
|
|
@@ -2700,7 +2700,7 @@ function OpenAPIV2Parser$parseResponseBody$lambda($this_parseResponseBody) {
|
|
|
2700
2700
|
switch (tmp2_subject == null ? -1 : tmp2_subject.r2_1) {
|
|
2701
2701
|
case -1:
|
|
2702
2702
|
case 5:
|
|
2703
|
-
tmp_0 = flatten($this_parseResponseBody, OpenAPIV2Parser_instance, schema, Common_getInstance().t2e([name, _StatusCode___get_value__impl__we50mu($this$flatMapResponses.
|
|
2703
|
+
tmp_0 = flatten($this_parseResponseBody, OpenAPIV2Parser_instance, schema, Common_getInstance().t2e([name, _StatusCode___get_value__impl__we50mu($this$flatMapResponses.i2f_1), 'ResponseBody']));
|
|
2704
2704
|
break;
|
|
2705
2705
|
case 4:
|
|
2706
2706
|
// Inline function 'kotlin.collections.orEmpty' call
|
|
@@ -2713,7 +2713,7 @@ function OpenAPIV2Parser$parseResponseBody$lambda($this_parseResponseBody) {
|
|
|
2713
2713
|
// Inline function 'kotlin.let' call
|
|
2714
2714
|
// Inline function 'kotlin.contracts.contract' call
|
|
2715
2715
|
// Inline function 'community.flock.wirespec.openapi.v2.OpenAPIV2Parser.parseResponseBody.<anonymous>.<anonymous>' call
|
|
2716
|
-
tmp_1 = flatten_0($this_parseResponseBody, OpenAPIV2Parser_instance, tmp3_safe_receiver, Common_getInstance().t2e([name, _StatusCode___get_value__impl__we50mu($this$flatMapResponses.
|
|
2716
|
+
tmp_1 = flatten_0($this_parseResponseBody, OpenAPIV2Parser_instance, tmp3_safe_receiver, Common_getInstance().t2e([name, _StatusCode___get_value__impl__we50mu($this$flatMapResponses.i2f_1), 'ResponseBody']));
|
|
2717
2717
|
}
|
|
2718
2718
|
|
|
2719
2719
|
var tmp0_elvis_lhs_0 = tmp_1;
|
|
@@ -2755,7 +2755,7 @@ function OpenAPIV2Parser$toName$lambda(it) {
|
|
|
2755
2755
|
function OpenAPIV2Parser() {
|
|
2756
2756
|
}
|
|
2757
2757
|
protoOf(OpenAPIV2Parser).r2e = function (moduleContent, strict) {
|
|
2758
|
-
var tmp0_elvis_lhs = toNonEmptyListOrNull(this.
|
|
2758
|
+
var tmp0_elvis_lhs = toNonEmptyListOrNull(this.l2f((new OpenAPI(Json(VOID, OpenAPIV2Parser$parse$lambda(strict)))).t1g(moduleContent.q22_1)));
|
|
2759
2759
|
var tmp;
|
|
2760
2760
|
if (tmp0_elvis_lhs == null) {
|
|
2761
2761
|
var message = 'Cannot yield non empty AST for OpenAPI v2';
|
|
@@ -2765,7 +2765,7 @@ protoOf(OpenAPIV2Parser).r2e = function (moduleContent, strict) {
|
|
|
2765
2765
|
}
|
|
2766
2766
|
return new AST(nonEmptyListOf(new Module(moduleContent.p22_1, tmp), []));
|
|
2767
2767
|
};
|
|
2768
|
-
protoOf(OpenAPIV2Parser).
|
|
2768
|
+
protoOf(OpenAPIV2Parser).l2f = function (_this__u8e3s4) {
|
|
2769
2769
|
// Inline function 'kotlin.collections.reduce' call
|
|
2770
2770
|
var iterator = listOf_0([parseEndpoints(_this__u8e3s4, this), parseParameters(_this__u8e3s4, this), parseRequestBody(_this__u8e3s4, this), parseResponseBody(_this__u8e3s4, this), parseDefinitions(_this__u8e3s4, this)]).g();
|
|
2771
2771
|
if (!iterator.h())
|
|
@@ -2842,27 +2842,13 @@ function toIterable(_this__u8e3s4, isNullable) {
|
|
|
2842
2842
|
function sanitize$lambda(it) {
|
|
2843
2843
|
return isLetterOrDigit(it.x_1) || listOf(new Char(_Char___init__impl__6a9atx(95))).o1(it);
|
|
2844
2844
|
}
|
|
2845
|
-
function emit_2($this, module_0) {
|
|
2846
|
-
var tmp = 'OpenAPI.' + $this.v2e_1.z25_1;
|
|
2847
|
-
// Inline function 'kotlinx.serialization.encodeToString' call
|
|
2848
|
-
var this_0 = Common_getInstance().s2e_1;
|
|
2849
|
-
var value = $this.l2f(module_0, null);
|
|
2850
|
-
// Inline function 'kotlinx.serialization.serializer' call
|
|
2851
|
-
var this_1 = this_0.zo();
|
|
2852
|
-
// Inline function 'kotlinx.serialization.internal.cast' call
|
|
2853
|
-
var this_2 = serializer(this_1, createKType(getKClass(OpenAPIObject), arrayOf([]), false));
|
|
2854
|
-
var tmp$ret$1 = isInterface(this_2, KSerializer) ? this_2 : THROW_CCE();
|
|
2855
|
-
var tmp$ret$2 = this_0.m15(tmp$ret$1, value);
|
|
2856
|
-
return nonEmptyListOf(new Emitted(tmp, tmp$ret$2), []);
|
|
2857
|
-
}
|
|
2858
2845
|
function emitComponents(_this__u8e3s4, $this) {
|
|
2859
2846
|
// Inline function 'kotlin.let' call
|
|
2860
2847
|
// Inline function 'kotlin.collections.associate' call
|
|
2861
2848
|
// Inline function 'kotlin.collections.filter' call
|
|
2862
2849
|
// Inline function 'kotlin.collections.filterTo' call
|
|
2863
|
-
var this_0 = _this__u8e3s4.p25_1.tk();
|
|
2864
2850
|
var destination = ArrayList_init_$Create$();
|
|
2865
|
-
var tmp0_iterator =
|
|
2851
|
+
var tmp0_iterator = _this__u8e3s4.g();
|
|
2866
2852
|
while (tmp0_iterator.h()) {
|
|
2867
2853
|
var element = tmp0_iterator.i();
|
|
2868
2854
|
// Inline function 'community.flock.wirespec.openapi.v3.OpenAPIV3Emitter.emitComponents.<anonymous>' call
|
|
@@ -2881,16 +2867,16 @@ function emitComponents(_this__u8e3s4, $this) {
|
|
|
2881
2867
|
var tmp = element_0.g26().b1();
|
|
2882
2868
|
var tmp_0;
|
|
2883
2869
|
if (element_0 instanceof Enum) {
|
|
2884
|
-
tmp_0 =
|
|
2870
|
+
tmp_0 = emit_3(element_0, OpenAPIV3Emitter_getInstance());
|
|
2885
2871
|
} else {
|
|
2886
2872
|
if (element_0 instanceof Refined) {
|
|
2887
|
-
tmp_0 =
|
|
2873
|
+
tmp_0 = emit_1(element_0, OpenAPIV3Emitter_getInstance());
|
|
2888
2874
|
} else {
|
|
2889
2875
|
if (element_0 instanceof Type) {
|
|
2890
|
-
tmp_0 =
|
|
2876
|
+
tmp_0 = emit_2(element_0, OpenAPIV3Emitter_getInstance());
|
|
2891
2877
|
} else {
|
|
2892
2878
|
if (element_0 instanceof Union) {
|
|
2893
|
-
tmp_0 =
|
|
2879
|
+
tmp_0 = emit_4(element_0, OpenAPIV3Emitter_getInstance());
|
|
2894
2880
|
} else {
|
|
2895
2881
|
if (element_0 instanceof Endpoint) {
|
|
2896
2882
|
var message = 'Cannot emit endpoint';
|
|
@@ -2919,9 +2905,8 @@ function emitPaths(_this__u8e3s4, $this) {
|
|
|
2919
2905
|
// Inline function 'kotlin.collections.groupBy' call
|
|
2920
2906
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
2921
2907
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
2922
|
-
var this_0 = _this__u8e3s4.p25_1;
|
|
2923
2908
|
var destination = ArrayList_init_$Create$();
|
|
2924
|
-
var tmp0_iterator =
|
|
2909
|
+
var tmp0_iterator = _this__u8e3s4.g();
|
|
2925
2910
|
while (tmp0_iterator.h()) {
|
|
2926
2911
|
var element = tmp0_iterator.i();
|
|
2927
2912
|
if (element instanceof Endpoint) {
|
|
@@ -2991,20 +2976,20 @@ function emitPaths(_this__u8e3s4, $this) {
|
|
|
2991
2976
|
tmp_1 = destination_3;
|
|
2992
2977
|
}
|
|
2993
2978
|
var tmp0_parameters = tmp_1;
|
|
2994
|
-
var tmp1_get =
|
|
2995
|
-
var tmp2_post =
|
|
2996
|
-
var tmp3_put =
|
|
2997
|
-
var tmp4_delete =
|
|
2998
|
-
var tmp5_patch =
|
|
2999
|
-
var tmp6_options =
|
|
3000
|
-
var tmp7_trace =
|
|
3001
|
-
var tmp8_head =
|
|
2979
|
+
var tmp1_get = emit_5(endpoints, OpenAPIV3Emitter_getInstance(), Method_GET_getInstance());
|
|
2980
|
+
var tmp2_post = emit_5(endpoints, OpenAPIV3Emitter_getInstance(), Method_POST_getInstance());
|
|
2981
|
+
var tmp3_put = emit_5(endpoints, OpenAPIV3Emitter_getInstance(), Method_PUT_getInstance());
|
|
2982
|
+
var tmp4_delete = emit_5(endpoints, OpenAPIV3Emitter_getInstance(), Method_DELETE_getInstance());
|
|
2983
|
+
var tmp5_patch = emit_5(endpoints, OpenAPIV3Emitter_getInstance(), Method_PATCH_getInstance());
|
|
2984
|
+
var tmp6_options = emit_5(endpoints, OpenAPIV3Emitter_getInstance(), Method_OPTIONS_getInstance());
|
|
2985
|
+
var tmp7_trace = emit_5(endpoints, OpenAPIV3Emitter_getInstance(), Method_TRACE_getInstance());
|
|
2986
|
+
var tmp8_head = emit_5(endpoints, OpenAPIV3Emitter_getInstance(), Method_HEAD_getInstance());
|
|
3002
2987
|
var tmp$ret$17 = to(new Path_0(tmp_0), new PathItemObject_0(VOID, VOID, VOID, tmp1_get, tmp3_put, tmp2_post, tmp4_delete, tmp6_options, tmp8_head, tmp5_patch, tmp7_trace, VOID, tmp0_parameters));
|
|
3003
2988
|
destination_1.e(tmp$ret$17);
|
|
3004
2989
|
}
|
|
3005
2990
|
return toMap(destination_1);
|
|
3006
2991
|
}
|
|
3007
|
-
function
|
|
2992
|
+
function emit_1(_this__u8e3s4, $this) {
|
|
3008
2993
|
var type = _this__u8e3s4.n26_1.g29_1;
|
|
3009
2994
|
var tmp;
|
|
3010
2995
|
if (type instanceof Integer) {
|
|
@@ -3057,7 +3042,7 @@ function emit_3(_this__u8e3s4, $this) {
|
|
|
3057
3042
|
}
|
|
3058
3043
|
return tmp;
|
|
3059
3044
|
}
|
|
3060
|
-
function
|
|
3045
|
+
function emit_2(_this__u8e3s4, $this) {
|
|
3061
3046
|
var tmp0_safe_receiver = _this__u8e3s4.j24_1;
|
|
3062
3047
|
var tmp;
|
|
3063
3048
|
var tmp_0 = tmp0_safe_receiver;
|
|
@@ -3115,7 +3100,7 @@ function emit_4(_this__u8e3s4, $this) {
|
|
|
3115
3100
|
var tmp3_required = tmp_1;
|
|
3116
3101
|
return new SchemaObject_0(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, destination, VOID, tmp1_description, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp3_required);
|
|
3117
3102
|
}
|
|
3118
|
-
function
|
|
3103
|
+
function emit_3(_this__u8e3s4, $this) {
|
|
3119
3104
|
var tmp0_safe_receiver = _this__u8e3s4.p26_1;
|
|
3120
3105
|
var tmp;
|
|
3121
3106
|
var tmp_0 = tmp0_safe_receiver;
|
|
@@ -3139,7 +3124,7 @@ function emit_5(_this__u8e3s4, $this) {
|
|
|
3139
3124
|
}
|
|
3140
3125
|
return new SchemaObject_0(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp2_type, VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp1_description, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, destination);
|
|
3141
3126
|
}
|
|
3142
|
-
function
|
|
3127
|
+
function emit_4(_this__u8e3s4, $this) {
|
|
3143
3128
|
var tmp0_safe_receiver = _this__u8e3s4.f24_1;
|
|
3144
3129
|
var tmp;
|
|
3145
3130
|
var tmp_0 = tmp0_safe_receiver;
|
|
@@ -3163,7 +3148,7 @@ function emit_6(_this__u8e3s4, $this) {
|
|
|
3163
3148
|
}
|
|
3164
3149
|
return new SchemaObject_0(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp2_type, VOID, destination, VOID, VOID, VOID, VOID, VOID, tmp1_description);
|
|
3165
3150
|
}
|
|
3166
|
-
function
|
|
3151
|
+
function emit_5(_this__u8e3s4, $this, method) {
|
|
3167
3152
|
// Inline function 'kotlin.collections.map' call
|
|
3168
3153
|
// Inline function 'kotlin.collections.filter' call
|
|
3169
3154
|
// Inline function 'kotlin.collections.filterTo' call
|
|
@@ -3182,12 +3167,12 @@ function emit_7(_this__u8e3s4, $this, method) {
|
|
|
3182
3167
|
while (tmp0_iterator_0.h()) {
|
|
3183
3168
|
var item = tmp0_iterator_0.i();
|
|
3184
3169
|
// Inline function 'community.flock.wirespec.openapi.v3.OpenAPIV3Emitter.emit.<anonymous>' call
|
|
3185
|
-
var tmp$ret$3 =
|
|
3170
|
+
var tmp$ret$3 = emit_6(item, OpenAPIV3Emitter_getInstance());
|
|
3186
3171
|
destination_0.e(tmp$ret$3);
|
|
3187
3172
|
}
|
|
3188
3173
|
return firstOrNull(destination_0);
|
|
3189
3174
|
}
|
|
3190
|
-
function
|
|
3175
|
+
function emit_6(_this__u8e3s4, $this) {
|
|
3191
3176
|
var tmp2_operationId = _this__u8e3s4.r24_1.b1();
|
|
3192
3177
|
var tmp0_safe_receiver = _this__u8e3s4.q24_1;
|
|
3193
3178
|
var tmp;
|
|
@@ -3256,7 +3241,7 @@ function emit_8(_this__u8e3s4, $this) {
|
|
|
3256
3241
|
// Inline function 'kotlin.collections.mapNotNullTo.<anonymous>' call
|
|
3257
3242
|
// Inline function 'community.flock.wirespec.openapi.v3.OpenAPIV3Emitter.emit.<anonymous>' call
|
|
3258
3243
|
var tmp0_safe_receiver_0 = element_0.a25_1;
|
|
3259
|
-
var tmp0_safe_receiver_1 = tmp0_safe_receiver_0 == null ? null :
|
|
3244
|
+
var tmp0_safe_receiver_1 = tmp0_safe_receiver_0 == null ? null : emit_7(tmp0_safe_receiver_0, OpenAPIV3Emitter_getInstance());
|
|
3260
3245
|
if (tmp0_safe_receiver_1 == null)
|
|
3261
3246
|
null;
|
|
3262
3247
|
else {
|
|
@@ -3400,7 +3385,7 @@ function emit_8(_this__u8e3s4, $this) {
|
|
|
3400
3385
|
var element_6 = tmp0_iterator_10.i();
|
|
3401
3386
|
// Inline function 'kotlin.collections.plusAssign' call
|
|
3402
3387
|
// Inline function 'community.flock.wirespec.openapi.v3.OpenAPIV3Emitter.emit.<anonymous>.<anonymous>' call
|
|
3403
|
-
var pair_0 =
|
|
3388
|
+
var pair_0 = emit_7(element_6, OpenAPIV3Emitter_getInstance());
|
|
3404
3389
|
destination_9.n2(pair_0.ee_1, pair_0.fe_1);
|
|
3405
3390
|
}
|
|
3406
3391
|
// Inline function 'kotlin.contracts.contract' call
|
|
@@ -3424,13 +3409,15 @@ function emitSegment_0(_this__u8e3s4, $this) {
|
|
|
3424
3409
|
function emitParameter_0(_this__u8e3s4, $this, location) {
|
|
3425
3410
|
var tmp0_name = _this__u8e3s4.o24_1.b1();
|
|
3426
3411
|
var tmp1_schema = emitSchema_0(_this__u8e3s4.p24_1, $this);
|
|
3427
|
-
|
|
3412
|
+
var tmp2_required = !_this__u8e3s4.p24_1.jm();
|
|
3413
|
+
return new ParameterObject_0(VOID, tmp2_required, VOID, VOID, VOID, VOID, VOID, tmp1_schema, VOID, VOID, VOID, tmp0_name, location);
|
|
3428
3414
|
}
|
|
3429
3415
|
function emitParameter_1(_this__u8e3s4, $this) {
|
|
3430
3416
|
var tmp0_in = ParameterLocation_PATH_getInstance_0();
|
|
3431
3417
|
var tmp1_name = _this__u8e3s4.y24_1.b1();
|
|
3432
3418
|
var tmp2_schema = emitSchema_0(_this__u8e3s4.z24_1, $this);
|
|
3433
|
-
|
|
3419
|
+
var tmp3_required = !_this__u8e3s4.z24_1.jm();
|
|
3420
|
+
return new ParameterObject_0(VOID, tmp3_required, VOID, VOID, VOID, VOID, VOID, tmp2_schema, VOID, VOID, VOID, tmp1_name, tmp0_in);
|
|
3434
3421
|
}
|
|
3435
3422
|
function emitHeader(_this__u8e3s4, $this) {
|
|
3436
3423
|
return to(_this__u8e3s4.o24_1.b1(), emitHeader_0(_this__u8e3s4.p24_1, $this));
|
|
@@ -3533,7 +3520,7 @@ function emitType_1(_this__u8e3s4, $this) {
|
|
|
3533
3520
|
}
|
|
3534
3521
|
return tmp;
|
|
3535
3522
|
}
|
|
3536
|
-
function
|
|
3523
|
+
function emit_7(_this__u8e3s4, $this) {
|
|
3537
3524
|
return to(new MediaType(_MediaType___init__impl__i9gzb9(_this__u8e3s4.b25_1)), new MediaTypeObject(emitSchema_0(_this__u8e3s4.c25_1, $this)));
|
|
3538
3525
|
}
|
|
3539
3526
|
function emitFormat_0(_this__u8e3s4, $this) {
|
|
@@ -3671,14 +3658,15 @@ function OpenAPIV3Emitter$emitSegment$lambda(it) {
|
|
|
3671
3658
|
}
|
|
3672
3659
|
function OpenAPIV3Emitter() {
|
|
3673
3660
|
OpenAPIV3Emitter_instance = this;
|
|
3674
|
-
this.
|
|
3661
|
+
this.w2e_1 = FileExtension_JSON_getInstance();
|
|
3675
3662
|
}
|
|
3676
3663
|
protoOf(OpenAPIV3Emitter).g23 = function (ast, logger) {
|
|
3664
|
+
// Inline function 'kotlin.let' call
|
|
3665
|
+
// Inline function 'kotlin.let' call
|
|
3677
3666
|
// Inline function 'arrow.core.NonEmptyList.flatMap' call
|
|
3678
3667
|
var this_0 = ast.n25_1;
|
|
3679
3668
|
// Inline function 'community.flock.wirespec.openapi.v3.OpenAPIV3Emitter.emit.<anonymous>' call
|
|
3680
|
-
var
|
|
3681
|
-
var tmp = emit_2(OpenAPIV3Emitter_getInstance(), it).nk();
|
|
3669
|
+
var tmp = this_0.pk_1.p25_1.nk();
|
|
3682
3670
|
// Inline function 'kotlin.collections.flatMap' call
|
|
3683
3671
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
3684
3672
|
var this_1 = this_0.qk_1;
|
|
@@ -3687,16 +3675,32 @@ protoOf(OpenAPIV3Emitter).g23 = function (ast, logger) {
|
|
|
3687
3675
|
while (tmp0_iterator.h()) {
|
|
3688
3676
|
var element = tmp0_iterator.i();
|
|
3689
3677
|
// Inline function 'community.flock.wirespec.openapi.v3.OpenAPIV3Emitter.emit.<anonymous>' call
|
|
3690
|
-
var list =
|
|
3678
|
+
var list = element.p25_1;
|
|
3691
3679
|
addAll(destination, list);
|
|
3692
3680
|
}
|
|
3693
|
-
|
|
3681
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
3682
|
+
// Inline function 'community.flock.wirespec.openapi.v3.OpenAPIV3Emitter.emit.<anonymous>' call
|
|
3683
|
+
var it = tmp.uk(destination);
|
|
3684
|
+
var tmp_0 = 'OpenAPI.' + OpenAPIV3Emitter_getInstance().w2e_1.z25_1;
|
|
3685
|
+
// Inline function 'kotlinx.serialization.encodeToString' call
|
|
3686
|
+
var this_2 = Common_getInstance().s2e_1;
|
|
3687
|
+
var value = OpenAPIV3Emitter_getInstance().x2e(it, null);
|
|
3688
|
+
// Inline function 'kotlinx.serialization.serializer' call
|
|
3689
|
+
var this_3 = this_2.zo();
|
|
3690
|
+
// Inline function 'kotlinx.serialization.internal.cast' call
|
|
3691
|
+
var this_4 = serializer(this_3, createKType(getKClass(OpenAPIObject), arrayOf([]), false));
|
|
3692
|
+
var tmp$ret$6 = isInterface(this_4, KSerializer) ? this_4 : THROW_CCE();
|
|
3693
|
+
var tmp$ret$7 = this_2.m15(tmp$ret$6, value);
|
|
3694
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
3695
|
+
// Inline function 'community.flock.wirespec.openapi.v3.OpenAPIV3Emitter.emit.<anonymous>' call
|
|
3696
|
+
var it_0 = new Emitted(tmp_0, tmp$ret$7);
|
|
3697
|
+
return nonEmptyListOf(it_0, []);
|
|
3694
3698
|
};
|
|
3695
|
-
protoOf(OpenAPIV3Emitter).
|
|
3699
|
+
protoOf(OpenAPIV3Emitter).x2e = function (statements, options) {
|
|
3696
3700
|
var tmp1_elvis_lhs = options == null ? null : options.m2f_1;
|
|
3697
3701
|
var tmp = tmp1_elvis_lhs == null ? 'Wirespec' : tmp1_elvis_lhs;
|
|
3698
3702
|
var tmp3_elvis_lhs = options == null ? null : options.n2f_1;
|
|
3699
|
-
return new OpenAPIObject('3.0.0', new InfoObject_0(tmp, VOID, VOID, VOID, VOID, tmp3_elvis_lhs == null ? '0.0.0' : tmp3_elvis_lhs), VOID, emitPaths(
|
|
3703
|
+
return new OpenAPIObject('3.0.0', new InfoObject_0(tmp, VOID, VOID, VOID, VOID, tmp3_elvis_lhs == null ? '0.0.0' : tmp3_elvis_lhs), VOID, emitPaths(statements, this), emitComponents(statements, this));
|
|
3700
3704
|
};
|
|
3701
3705
|
var OpenAPIV3Emitter_instance;
|
|
3702
3706
|
function OpenAPIV3Emitter_getInstance() {
|