@flock/wirespec 0.0.1
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/Kotlinx-Cli-Library-kotlinx-cli-js-ir.js +1601 -0
- package/kotlin/Kotlinx-Cli-Library-kotlinx-cli-js-ir.js.map +1 -0
- package/kotlin/arrow-arrow-annotations.js +15 -0
- package/kotlin/arrow-arrow-annotations.js.map +1 -0
- package/kotlin/arrow-arrow-atomic.js +57 -0
- package/kotlin/arrow-arrow-atomic.js.map +1 -0
- package/kotlin/arrow-arrow-continuations.js +31 -0
- package/kotlin/arrow-arrow-continuations.js.map +1 -0
- package/kotlin/arrow-arrow-core.js +357 -0
- package/kotlin/arrow-arrow-core.js.map +1 -0
- package/kotlin/kotlin-kotlin-stdlib-js-ir.js +11509 -0
- package/kotlin/kotlin-kotlin-stdlib-js-ir.js.map +1 -0
- package/kotlin/kotlin-openapi-bindings.js +12060 -0
- package/kotlin/kotlin-openapi-bindings.js.map +1 -0
- package/kotlin/kotlinx-serialization-kotlinx-serialization-core-js-ir.js +5362 -0
- package/kotlin/kotlinx-serialization-kotlinx-serialization-core-js-ir.js.map +1 -0
- package/kotlin/kotlinx-serialization-kotlinx-serialization-json-js-ir.js +4421 -0
- package/kotlin/kotlinx-serialization-kotlinx-serialization-json-js-ir.js.map +1 -0
- package/kotlin/wirespec-bin.js +3 -0
- package/kotlin/wirespec-cli.js +1069 -0
- package/kotlin/wirespec-cli.js.map +1 -0
- package/kotlin/wirespec-core.js +4687 -0
- package/kotlin/wirespec-core.js.map +1 -0
- package/kotlin/wirespec-lib.js +620 -0
- package/kotlin/wirespec-lib.js.map +1 -0
- package/kotlin/wirespec-openapi.js +2614 -0
- package/kotlin/wirespec-openapi.js.map +1 -0
- package/package.json +17 -0
- package/sync-hashes/Kotlinx-Cli-Library-kotlinx-cli-js-ir.js.hash +1 -0
- package/sync-hashes/Kotlinx-Cli-Library-kotlinx-cli-js-ir.js.map.hash +1 -0
- package/sync-hashes/arrow-arrow-annotations.js.hash +1 -0
- package/sync-hashes/arrow-arrow-annotations.js.map.hash +1 -0
- package/sync-hashes/arrow-arrow-atomic.js.hash +1 -0
- package/sync-hashes/arrow-arrow-atomic.js.map.hash +1 -0
- package/sync-hashes/arrow-arrow-continuations.js.hash +1 -0
- package/sync-hashes/arrow-arrow-continuations.js.map.hash +1 -0
- package/sync-hashes/arrow-arrow-core.js.hash +1 -0
- package/sync-hashes/arrow-arrow-core.js.map.hash +1 -0
- package/sync-hashes/kotlin-kotlin-stdlib-js-ir.js.hash +1 -0
- package/sync-hashes/kotlin-kotlin-stdlib-js-ir.js.map.hash +1 -0
- package/sync-hashes/kotlin-openapi-bindings.js.hash +1 -0
- package/sync-hashes/kotlin-openapi-bindings.js.map.hash +1 -0
- package/sync-hashes/kotlinx-serialization-kotlinx-serialization-core-js-ir.js.hash +1 -0
- package/sync-hashes/kotlinx-serialization-kotlinx-serialization-core-js-ir.js.map.hash +1 -0
- package/sync-hashes/kotlinx-serialization-kotlinx-serialization-json-js-ir.js.hash +1 -0
- package/sync-hashes/kotlinx-serialization-kotlinx-serialization-json-js-ir.js.map.hash +1 -0
- package/sync-hashes/wirespec-bin.js.hash +1 -0
- package/sync-hashes/wirespec-cli.js.hash +1 -0
- package/sync-hashes/wirespec-cli.js.map.hash +1 -0
- package/sync-hashes/wirespec-core.js.hash +1 -0
- package/sync-hashes/wirespec-core.js.map.hash +1 -0
- package/sync-hashes/wirespec-lib.js.hash +1 -0
- package/sync-hashes/wirespec-lib.js.map.hash +1 -0
- package/sync-hashes/wirespec-openapi.js.hash +1 -0
- package/sync-hashes/wirespec-openapi.js.map.hash +1 -0
|
@@ -0,0 +1,2614 @@
|
|
|
1
|
+
(function (root, factory) {
|
|
2
|
+
if (typeof define === 'function' && define.amd)
|
|
3
|
+
define(['exports', './kotlin-kotlin-stdlib-js-ir.js', './wirespec-core.js', './kotlin-openapi-bindings.js'], factory);
|
|
4
|
+
else if (typeof exports === 'object')
|
|
5
|
+
factory(module.exports, require('./kotlin-kotlin-stdlib-js-ir.js'), require('./wirespec-core.js'), require('./kotlin-openapi-bindings.js'));
|
|
6
|
+
else {
|
|
7
|
+
if (typeof this['kotlin-kotlin-stdlib-js-ir'] === 'undefined') {
|
|
8
|
+
throw new Error("Error loading module 'wirespec-openapi'. Its dependency 'kotlin-kotlin-stdlib-js-ir' was not found. Please, check whether 'kotlin-kotlin-stdlib-js-ir' is loaded prior to 'wirespec-openapi'.");
|
|
9
|
+
}
|
|
10
|
+
if (typeof this['wirespec-core'] === 'undefined') {
|
|
11
|
+
throw new Error("Error loading module 'wirespec-openapi'. Its dependency 'wirespec-core' was not found. Please, check whether 'wirespec-core' is loaded prior to 'wirespec-openapi'.");
|
|
12
|
+
}
|
|
13
|
+
if (typeof this['kotlin-openapi-bindings'] === 'undefined') {
|
|
14
|
+
throw new Error("Error loading module 'wirespec-openapi'. Its dependency 'kotlin-openapi-bindings' was not found. Please, check whether 'kotlin-openapi-bindings' is loaded prior to 'wirespec-openapi'.");
|
|
15
|
+
}
|
|
16
|
+
root['wirespec-openapi'] = factory(typeof this['wirespec-openapi'] === 'undefined' ? {} : this['wirespec-openapi'], this['kotlin-kotlin-stdlib-js-ir'], this['wirespec-core'], this['kotlin-openapi-bindings']);
|
|
17
|
+
}
|
|
18
|
+
}(this, function (_, kotlin_kotlin, kotlin_community_flock_wirespec_compiler_core, kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings) {
|
|
19
|
+
'use strict';
|
|
20
|
+
//region block: imports
|
|
21
|
+
var imul = Math.imul;
|
|
22
|
+
var charSequenceLength = kotlin_kotlin.$_$.o6;
|
|
23
|
+
var Unit_getInstance = kotlin_kotlin.$_$.i3;
|
|
24
|
+
var charSequenceGet = kotlin_kotlin.$_$.n6;
|
|
25
|
+
var toString = kotlin_kotlin.$_$.l1;
|
|
26
|
+
var toString_0 = kotlin_kotlin.$_$.y7;
|
|
27
|
+
var VOID = kotlin_kotlin.$_$.ya;
|
|
28
|
+
var joinToString = kotlin_kotlin.$_$.b5;
|
|
29
|
+
var protoOf = kotlin_kotlin.$_$.t7;
|
|
30
|
+
var objectMeta = kotlin_kotlin.$_$.s7;
|
|
31
|
+
var setMetadataFor = kotlin_kotlin.$_$.u7;
|
|
32
|
+
var noWhenBranchMatchedException = kotlin_kotlin.$_$.ta;
|
|
33
|
+
var Param = kotlin_community_flock_wirespec_compiler_core.$_$.l;
|
|
34
|
+
var Literal = kotlin_community_flock_wirespec_compiler_core.$_$.k;
|
|
35
|
+
var Default_getInstance = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.y;
|
|
36
|
+
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.g;
|
|
37
|
+
var collectionSizeOrDefault = kotlin_kotlin.$_$.c4;
|
|
38
|
+
var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.f;
|
|
39
|
+
var emptyList = kotlin_kotlin.$_$.r4;
|
|
40
|
+
var plus = kotlin_kotlin.$_$.p5;
|
|
41
|
+
var _Path___get_value__impl__thmflc = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.r;
|
|
42
|
+
var split = kotlin_kotlin.$_$.w8;
|
|
43
|
+
var drop = kotlin_kotlin.$_$.q4;
|
|
44
|
+
var Char = kotlin_kotlin.$_$.m9;
|
|
45
|
+
var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.i1;
|
|
46
|
+
var equals = kotlin_kotlin.$_$.s6;
|
|
47
|
+
var Identifier = kotlin_community_flock_wirespec_compiler_core.$_$.o;
|
|
48
|
+
var Primitive = kotlin_community_flock_wirespec_compiler_core.$_$.q;
|
|
49
|
+
var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.e1;
|
|
50
|
+
var joinToString_0 = kotlin_kotlin.$_$.a5;
|
|
51
|
+
var ParameterLocation_QUERY_getInstance = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.n;
|
|
52
|
+
var ParameterLocation_HEADER_getInstance = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.m;
|
|
53
|
+
var ParameterLocation_BODY_getInstance = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.l;
|
|
54
|
+
var NotImplementedError = kotlin_kotlin.$_$.u9;
|
|
55
|
+
var Content = kotlin_community_flock_wirespec_compiler_core.$_$.g;
|
|
56
|
+
var Request = kotlin_community_flock_wirespec_compiler_core.$_$.i;
|
|
57
|
+
var listOf = kotlin_kotlin.$_$.i5;
|
|
58
|
+
var _StatusCode___get_value__impl__we50mu = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.t;
|
|
59
|
+
var Response = kotlin_community_flock_wirespec_compiler_core.$_$.j;
|
|
60
|
+
var addAll = kotlin_kotlin.$_$.z3;
|
|
61
|
+
var Endpoint = kotlin_community_flock_wirespec_compiler_core.$_$.m;
|
|
62
|
+
var Shape = kotlin_community_flock_wirespec_compiler_core.$_$.s;
|
|
63
|
+
var Type = kotlin_community_flock_wirespec_compiler_core.$_$.t;
|
|
64
|
+
var ReferenceObject = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.b;
|
|
65
|
+
var ParameterObject = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.a;
|
|
66
|
+
var Type_String_getInstance = kotlin_community_flock_wirespec_compiler_core.$_$.z;
|
|
67
|
+
var Type_Integer_getInstance = kotlin_community_flock_wirespec_compiler_core.$_$.y;
|
|
68
|
+
var Type_Boolean_getInstance = kotlin_community_flock_wirespec_compiler_core.$_$.x;
|
|
69
|
+
var Field = kotlin_community_flock_wirespec_compiler_core.$_$.r;
|
|
70
|
+
var THROW_CCE = kotlin_kotlin.$_$.y9;
|
|
71
|
+
var Type_0 = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.e;
|
|
72
|
+
var Custom = kotlin_community_flock_wirespec_compiler_core.$_$.p;
|
|
73
|
+
var SchemaObject = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.d;
|
|
74
|
+
var ResponseObject = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.c;
|
|
75
|
+
var values = kotlin_community_flock_wirespec_compiler_core.$_$.h;
|
|
76
|
+
var to = kotlin_kotlin.$_$.xa;
|
|
77
|
+
var getStringHashCode = kotlin_kotlin.$_$.x6;
|
|
78
|
+
var hashCode = kotlin_kotlin.$_$.y6;
|
|
79
|
+
var classMeta = kotlin_kotlin.$_$.q6;
|
|
80
|
+
var contains = kotlin_kotlin.$_$.d4;
|
|
81
|
+
var _Ref___get_value__impl__kxavfe = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.s;
|
|
82
|
+
var Default_getInstance_0 = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.z;
|
|
83
|
+
var _Path___get_value__impl__thmflc_0 = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.v;
|
|
84
|
+
var ParameterLocation_QUERY_getInstance_0 = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.q;
|
|
85
|
+
var ParameterLocation_HEADER_getInstance_0 = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.p;
|
|
86
|
+
var ParameterLocation_COOKIE_getInstance = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.o;
|
|
87
|
+
var _MediaType___get_value__impl__wy58mp = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.u;
|
|
88
|
+
var _StatusCode___get_value__impl__we50mu_0 = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.x;
|
|
89
|
+
var ReferenceObject_0 = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.g;
|
|
90
|
+
var ParameterObject_0 = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.f;
|
|
91
|
+
var SchemaObject_0 = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.j;
|
|
92
|
+
var RequestBodyObject = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.h;
|
|
93
|
+
var ResponseObject_0 = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.i;
|
|
94
|
+
var _Ref___get_value__impl__kxavfe_0 = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.w;
|
|
95
|
+
var Type_1 = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.k;
|
|
96
|
+
//endregion
|
|
97
|
+
//region block: pre-declaration
|
|
98
|
+
setMetadataFor(Common, 'Common', objectMeta);
|
|
99
|
+
setMetadataFor(OpenApiParser, 'OpenApiParser', objectMeta);
|
|
100
|
+
setMetadataFor(SimpleSchema, 'SimpleSchema', classMeta);
|
|
101
|
+
setMetadataFor(SimpleProp, 'SimpleProp', classMeta);
|
|
102
|
+
setMetadataFor(OpenApiParser_0, 'OpenApiParser', objectMeta);
|
|
103
|
+
setMetadataFor(SimpleSchema_0, 'SimpleSchema', classMeta);
|
|
104
|
+
setMetadataFor(SimpleProp_0, 'SimpleProp', classMeta);
|
|
105
|
+
//endregion
|
|
106
|
+
function Common$className$lambda(it) {
|
|
107
|
+
var tmp$ret$7;
|
|
108
|
+
// Inline function 'kotlin.text.replaceFirstChar' call
|
|
109
|
+
var tmp;
|
|
110
|
+
var tmp$ret$0;
|
|
111
|
+
// Inline function 'kotlin.text.isNotEmpty' call
|
|
112
|
+
tmp$ret$0 = charSequenceLength(it) > 0;
|
|
113
|
+
if (tmp$ret$0) {
|
|
114
|
+
var tmp$ret$4;
|
|
115
|
+
// Inline function 'community.flock.wirespec.openapi.Common.className.<anonymous>.<anonymous>' call
|
|
116
|
+
var tmp0__anonymous__q1qw7t = charSequenceGet(it, 0);
|
|
117
|
+
var tmp$ret$3;
|
|
118
|
+
// Inline function 'kotlin.text.uppercase' call
|
|
119
|
+
var tmp$ret$2;
|
|
120
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
121
|
+
var tmp$ret$1;
|
|
122
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
123
|
+
var tmp0_asDynamic = toString(tmp0__anonymous__q1qw7t);
|
|
124
|
+
tmp$ret$1 = tmp0_asDynamic;
|
|
125
|
+
var tmp1_unsafeCast = tmp$ret$1.toUpperCase();
|
|
126
|
+
tmp$ret$2 = tmp1_unsafeCast;
|
|
127
|
+
tmp$ret$3 = tmp$ret$2;
|
|
128
|
+
tmp$ret$4 = tmp$ret$3;
|
|
129
|
+
var tmp_0 = toString_0(tmp$ret$4);
|
|
130
|
+
var tmp$ret$6;
|
|
131
|
+
// Inline function 'kotlin.text.substring' call
|
|
132
|
+
var tmp$ret$5;
|
|
133
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
134
|
+
tmp$ret$5 = it;
|
|
135
|
+
tmp$ret$6 = tmp$ret$5.substring(1);
|
|
136
|
+
tmp = tmp_0 + tmp$ret$6;
|
|
137
|
+
} else {
|
|
138
|
+
tmp = it;
|
|
139
|
+
}
|
|
140
|
+
tmp$ret$7 = tmp;
|
|
141
|
+
return tmp$ret$7;
|
|
142
|
+
}
|
|
143
|
+
function Common() {
|
|
144
|
+
Common_instance = this;
|
|
145
|
+
}
|
|
146
|
+
protoOf(Common).q1s = function (arg) {
|
|
147
|
+
return joinToString(arg, '', VOID, VOID, VOID, VOID, Common$className$lambda);
|
|
148
|
+
};
|
|
149
|
+
var Common_instance;
|
|
150
|
+
function Common_getInstance() {
|
|
151
|
+
if (Common_instance == null)
|
|
152
|
+
new Common();
|
|
153
|
+
return Common_instance;
|
|
154
|
+
}
|
|
155
|
+
function OpenApiParser$parse$lambda(it) {
|
|
156
|
+
var tmp0_subject = it;
|
|
157
|
+
var tmp;
|
|
158
|
+
if (tmp0_subject instanceof Literal) {
|
|
159
|
+
tmp = Common_getInstance().q1s([it.pj_1]);
|
|
160
|
+
} else {
|
|
161
|
+
if (tmp0_subject instanceof Param) {
|
|
162
|
+
tmp = Common_getInstance().q1s([it.si_1.dj_1]);
|
|
163
|
+
} else {
|
|
164
|
+
noWhenBranchMatchedException();
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
return tmp;
|
|
168
|
+
}
|
|
169
|
+
function OpenApiParser() {
|
|
170
|
+
OpenApiParser_instance = this;
|
|
171
|
+
}
|
|
172
|
+
protoOf(OpenApiParser).r1s = function (json) {
|
|
173
|
+
var tmp$ret$1;
|
|
174
|
+
// Inline function 'kotlin.let' call
|
|
175
|
+
var tmp0_let = Default_getInstance().x19(json);
|
|
176
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
177
|
+
var tmp$ret$0;
|
|
178
|
+
// Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.parse.<anonymous>' call
|
|
179
|
+
tmp$ret$0 = OpenApiParser_getInstance().s1s(tmp0_let);
|
|
180
|
+
tmp$ret$1 = tmp$ret$0;
|
|
181
|
+
return tmp$ret$1;
|
|
182
|
+
};
|
|
183
|
+
protoOf(OpenApiParser).s1s = function (openApi) {
|
|
184
|
+
var tmp$ret$51;
|
|
185
|
+
// Inline function 'kotlin.collections.flatMap' call
|
|
186
|
+
var tmp1_flatMap = openApi.h1a_1;
|
|
187
|
+
var tmp$ret$50;
|
|
188
|
+
// Inline function 'kotlin.collections.flatMapTo' call
|
|
189
|
+
var tmp0_flatMapTo = ArrayList_init_$Create$();
|
|
190
|
+
var tmp$ret$0;
|
|
191
|
+
// Inline function 'kotlin.collections.iterator' call
|
|
192
|
+
tmp$ret$0 = tmp1_flatMap.u().c();
|
|
193
|
+
var tmp0_iterator = tmp$ret$0;
|
|
194
|
+
while (tmp0_iterator.d()) {
|
|
195
|
+
var element = tmp0_iterator.e();
|
|
196
|
+
var tmp$ret$49;
|
|
197
|
+
// Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.parse.<anonymous>' call
|
|
198
|
+
var tmp$ret$1;
|
|
199
|
+
// Inline function 'kotlin.collections.component1' call
|
|
200
|
+
tmp$ret$1 = element.v().s1a_1;
|
|
201
|
+
var key = tmp$ret$1;
|
|
202
|
+
var tmp$ret$2;
|
|
203
|
+
// Inline function 'kotlin.collections.component2' call
|
|
204
|
+
tmp$ret$2 = element.w();
|
|
205
|
+
var path = tmp$ret$2;
|
|
206
|
+
var tmp$ret$48;
|
|
207
|
+
// Inline function 'kotlin.collections.map' call
|
|
208
|
+
var tmp1_map = toOperationList(path);
|
|
209
|
+
var tmp$ret$47;
|
|
210
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
211
|
+
var tmp0_mapTo = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp1_map, 10));
|
|
212
|
+
var tmp0_iterator_0 = tmp1_map.c();
|
|
213
|
+
while (tmp0_iterator_0.d()) {
|
|
214
|
+
var item = tmp0_iterator_0.e();
|
|
215
|
+
var tmp$ret$46;
|
|
216
|
+
// Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.parse.<anonymous>.<anonymous>' call
|
|
217
|
+
var method = item.i3();
|
|
218
|
+
var operation = item.j3();
|
|
219
|
+
var tmp = resolveParameters_0(path, openApi);
|
|
220
|
+
var tmp0_safe_receiver = operation;
|
|
221
|
+
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : resolveParameters(tmp0_safe_receiver, openApi);
|
|
222
|
+
var parameters = plus(tmp, tmp1_elvis_lhs == null ? emptyList() : tmp1_elvis_lhs);
|
|
223
|
+
var tmp$ret$14;
|
|
224
|
+
// Inline function 'kotlin.collections.map' call
|
|
225
|
+
var tmp1_map_0 = drop(split(_Path___get_value__impl__thmflc(key), ['/']), 1);
|
|
226
|
+
var tmp$ret$13;
|
|
227
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
228
|
+
var tmp0_mapTo_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp1_map_0, 10));
|
|
229
|
+
var tmp0_iterator_1 = tmp1_map_0.c();
|
|
230
|
+
while (tmp0_iterator_1.d()) {
|
|
231
|
+
var item_0 = tmp0_iterator_1.e();
|
|
232
|
+
var tmp$ret$12;
|
|
233
|
+
// Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.parse.<anonymous>.<anonymous>.<anonymous>' call
|
|
234
|
+
var isParam = equals(new Char(charSequenceGet(item_0, 0)), new Char(_Char___init__impl__6a9atx(123))) ? equals(new Char(charSequenceGet(item_0, item_0.length - 1 | 0)), new Char(_Char___init__impl__6a9atx(125))) : false;
|
|
235
|
+
var tmp_0;
|
|
236
|
+
if (isParam) {
|
|
237
|
+
var tmp$ret$4;
|
|
238
|
+
// Inline function 'kotlin.text.substring' call
|
|
239
|
+
var tmp0_substring = item_0.length - 1 | 0;
|
|
240
|
+
var tmp$ret$3;
|
|
241
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
242
|
+
tmp$ret$3 = item_0;
|
|
243
|
+
tmp$ret$4 = tmp$ret$3.substring(1, tmp0_substring);
|
|
244
|
+
var param = tmp$ret$4;
|
|
245
|
+
var tmp$ret$7;
|
|
246
|
+
// Inline function 'kotlin.collections.find' call
|
|
247
|
+
var tmp$ret$6;
|
|
248
|
+
$l$block: {
|
|
249
|
+
// Inline function 'kotlin.collections.firstOrNull' call
|
|
250
|
+
var tmp0_iterator_2 = parameters.c();
|
|
251
|
+
while (tmp0_iterator_2.d()) {
|
|
252
|
+
var element_0 = tmp0_iterator_2.e();
|
|
253
|
+
var tmp$ret$5;
|
|
254
|
+
// Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.parse.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
|
|
255
|
+
tmp$ret$5 = element_0.b1c_1 === param;
|
|
256
|
+
if (tmp$ret$5) {
|
|
257
|
+
tmp$ret$6 = element_0;
|
|
258
|
+
break $l$block;
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
tmp$ret$6 = null;
|
|
262
|
+
}
|
|
263
|
+
tmp$ret$7 = tmp$ret$6;
|
|
264
|
+
var tmp0_safe_receiver_0 = tmp$ret$7;
|
|
265
|
+
var tmp_1;
|
|
266
|
+
if (tmp0_safe_receiver_0 == null) {
|
|
267
|
+
tmp_1 = null;
|
|
268
|
+
} else {
|
|
269
|
+
var tmp$ret$9;
|
|
270
|
+
// Inline function 'kotlin.let' call
|
|
271
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
272
|
+
var tmp$ret$8;
|
|
273
|
+
// Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.parse.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
|
|
274
|
+
var tmp0_safe_receiver_1 = tmp0_safe_receiver_0.g1c_1;
|
|
275
|
+
tmp$ret$8 = tmp0_safe_receiver_1 == null ? null : toPrimitive(tmp0_safe_receiver_1);
|
|
276
|
+
tmp$ret$9 = tmp$ret$8;
|
|
277
|
+
tmp_1 = tmp$ret$9;
|
|
278
|
+
}
|
|
279
|
+
var tmp1_safe_receiver = tmp_1;
|
|
280
|
+
var tmp_2;
|
|
281
|
+
if (tmp1_safe_receiver == null) {
|
|
282
|
+
tmp_2 = null;
|
|
283
|
+
} else {
|
|
284
|
+
var tmp$ret$11;
|
|
285
|
+
// Inline function 'kotlin.let' call
|
|
286
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
287
|
+
var tmp$ret$10;
|
|
288
|
+
// Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.parse.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
|
|
289
|
+
tmp$ret$10 = new Param(new Identifier(param), new Primitive(tmp1_safe_receiver, false));
|
|
290
|
+
tmp$ret$11 = tmp$ret$10;
|
|
291
|
+
tmp_2 = tmp$ret$11;
|
|
292
|
+
}
|
|
293
|
+
var tmp2_elvis_lhs = tmp_2;
|
|
294
|
+
var tmp_3;
|
|
295
|
+
if (tmp2_elvis_lhs == null) {
|
|
296
|
+
var tmp1_error = ' Declared path parameter ' + param + ' needs to be defined as a path parameter in path or operation level';
|
|
297
|
+
throw IllegalStateException_init_$Create$(toString_0(tmp1_error));
|
|
298
|
+
} else {
|
|
299
|
+
tmp_3 = tmp2_elvis_lhs;
|
|
300
|
+
}
|
|
301
|
+
tmp_0 = tmp_3;
|
|
302
|
+
} else {
|
|
303
|
+
tmp_0 = new Literal(item_0);
|
|
304
|
+
}
|
|
305
|
+
tmp$ret$12 = tmp_0;
|
|
306
|
+
tmp0_mapTo_0.a(tmp$ret$12);
|
|
307
|
+
}
|
|
308
|
+
tmp$ret$13 = tmp0_mapTo_0;
|
|
309
|
+
tmp$ret$14 = tmp$ret$13;
|
|
310
|
+
var segments = tmp$ret$14;
|
|
311
|
+
var tmp2_safe_receiver = operation;
|
|
312
|
+
var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.p1b_1;
|
|
313
|
+
var tmp_4;
|
|
314
|
+
if (tmp3_safe_receiver == null) {
|
|
315
|
+
tmp_4 = null;
|
|
316
|
+
} else {
|
|
317
|
+
var tmp$ret$16;
|
|
318
|
+
// Inline function 'kotlin.let' call
|
|
319
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
320
|
+
var tmp$ret$15;
|
|
321
|
+
// Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.parse.<anonymous>.<anonymous>.<anonymous>' call
|
|
322
|
+
tmp$ret$15 = Common_getInstance().q1s([tmp3_safe_receiver]);
|
|
323
|
+
tmp$ret$16 = tmp$ret$15;
|
|
324
|
+
tmp_4 = tmp$ret$16;
|
|
325
|
+
}
|
|
326
|
+
var tmp4_elvis_lhs = tmp_4;
|
|
327
|
+
var tmp_5;
|
|
328
|
+
if (tmp4_elvis_lhs == null) {
|
|
329
|
+
var tmp$ret$18;
|
|
330
|
+
// Inline function 'kotlin.let' call
|
|
331
|
+
var tmp2_let = joinToString_0(segments, '', VOID, VOID, VOID, VOID, OpenApiParser$parse$lambda);
|
|
332
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
333
|
+
var tmp$ret$17;
|
|
334
|
+
// Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.parse.<anonymous>.<anonymous>.<anonymous>' call
|
|
335
|
+
tmp$ret$17 = tmp2_let + method.p4_1;
|
|
336
|
+
tmp$ret$18 = tmp$ret$17;
|
|
337
|
+
tmp_5 = tmp$ret$18;
|
|
338
|
+
} else {
|
|
339
|
+
tmp_5 = tmp4_elvis_lhs;
|
|
340
|
+
}
|
|
341
|
+
var name = tmp_5;
|
|
342
|
+
var tmp$ret$25;
|
|
343
|
+
// Inline function 'kotlin.collections.mapNotNull' call
|
|
344
|
+
var tmp$ret$21;
|
|
345
|
+
// Inline function 'kotlin.collections.filter' call
|
|
346
|
+
var tmp$ret$20;
|
|
347
|
+
// Inline function 'kotlin.collections.filterTo' call
|
|
348
|
+
var tmp3_filterTo = ArrayList_init_$Create$();
|
|
349
|
+
var tmp0_iterator_3 = parameters.c();
|
|
350
|
+
while (tmp0_iterator_3.d()) {
|
|
351
|
+
var element_1 = tmp0_iterator_3.e();
|
|
352
|
+
var tmp$ret$19;
|
|
353
|
+
// Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.parse.<anonymous>.<anonymous>.<anonymous>' call
|
|
354
|
+
tmp$ret$19 = element_1.c1c_1.equals(ParameterLocation_QUERY_getInstance());
|
|
355
|
+
if (tmp$ret$19) {
|
|
356
|
+
tmp3_filterTo.a(element_1);
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
tmp$ret$20 = tmp3_filterTo;
|
|
360
|
+
tmp$ret$21 = tmp$ret$20;
|
|
361
|
+
var tmp5_mapNotNull = tmp$ret$21;
|
|
362
|
+
var tmp$ret$24;
|
|
363
|
+
// Inline function 'kotlin.collections.mapNotNullTo' call
|
|
364
|
+
var tmp4_mapNotNullTo = ArrayList_init_$Create$();
|
|
365
|
+
// Inline function 'kotlin.collections.forEach' call
|
|
366
|
+
var tmp0_iterator_4 = tmp5_mapNotNull.c();
|
|
367
|
+
while (tmp0_iterator_4.d()) {
|
|
368
|
+
var element_2 = tmp0_iterator_4.e();
|
|
369
|
+
// Inline function 'kotlin.collections.mapNotNullTo.<anonymous>' call
|
|
370
|
+
var tmp$ret$22;
|
|
371
|
+
// Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.parse.<anonymous>.<anonymous>.<anonymous>' call
|
|
372
|
+
tmp$ret$22 = toField(element_2, openApi);
|
|
373
|
+
var tmp0_safe_receiver_2 = tmp$ret$22;
|
|
374
|
+
if (tmp0_safe_receiver_2 == null)
|
|
375
|
+
null;
|
|
376
|
+
else {
|
|
377
|
+
var tmp$ret$23;
|
|
378
|
+
// Inline function 'kotlin.let' call
|
|
379
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
380
|
+
tmp4_mapNotNullTo.a(tmp0_safe_receiver_2);
|
|
381
|
+
tmp$ret$23 = Unit_getInstance();
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
tmp$ret$24 = tmp4_mapNotNullTo;
|
|
385
|
+
tmp$ret$25 = tmp$ret$24;
|
|
386
|
+
var query = tmp$ret$25;
|
|
387
|
+
var tmp$ret$32;
|
|
388
|
+
// Inline function 'kotlin.collections.mapNotNull' call
|
|
389
|
+
var tmp$ret$28;
|
|
390
|
+
// Inline function 'kotlin.collections.filter' call
|
|
391
|
+
var tmp$ret$27;
|
|
392
|
+
// Inline function 'kotlin.collections.filterTo' call
|
|
393
|
+
var tmp6_filterTo = ArrayList_init_$Create$();
|
|
394
|
+
var tmp0_iterator_5 = parameters.c();
|
|
395
|
+
while (tmp0_iterator_5.d()) {
|
|
396
|
+
var element_3 = tmp0_iterator_5.e();
|
|
397
|
+
var tmp$ret$26;
|
|
398
|
+
// Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.parse.<anonymous>.<anonymous>.<anonymous>' call
|
|
399
|
+
tmp$ret$26 = element_3.c1c_1.equals(ParameterLocation_HEADER_getInstance());
|
|
400
|
+
if (tmp$ret$26) {
|
|
401
|
+
tmp6_filterTo.a(element_3);
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
tmp$ret$27 = tmp6_filterTo;
|
|
405
|
+
tmp$ret$28 = tmp$ret$27;
|
|
406
|
+
var tmp8_mapNotNull = tmp$ret$28;
|
|
407
|
+
var tmp$ret$31;
|
|
408
|
+
// Inline function 'kotlin.collections.mapNotNullTo' call
|
|
409
|
+
var tmp7_mapNotNullTo = ArrayList_init_$Create$();
|
|
410
|
+
// Inline function 'kotlin.collections.forEach' call
|
|
411
|
+
var tmp0_iterator_6 = tmp8_mapNotNull.c();
|
|
412
|
+
while (tmp0_iterator_6.d()) {
|
|
413
|
+
var element_4 = tmp0_iterator_6.e();
|
|
414
|
+
// Inline function 'kotlin.collections.mapNotNullTo.<anonymous>' call
|
|
415
|
+
var tmp$ret$29;
|
|
416
|
+
// Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.parse.<anonymous>.<anonymous>.<anonymous>' call
|
|
417
|
+
tmp$ret$29 = toField(element_4, openApi);
|
|
418
|
+
var tmp0_safe_receiver_3 = tmp$ret$29;
|
|
419
|
+
if (tmp0_safe_receiver_3 == null)
|
|
420
|
+
null;
|
|
421
|
+
else {
|
|
422
|
+
var tmp$ret$30;
|
|
423
|
+
// Inline function 'kotlin.let' call
|
|
424
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
425
|
+
tmp7_mapNotNullTo.a(tmp0_safe_receiver_3);
|
|
426
|
+
tmp$ret$30 = Unit_getInstance();
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
tmp$ret$31 = tmp7_mapNotNullTo;
|
|
430
|
+
tmp$ret$32 = tmp$ret$31;
|
|
431
|
+
var headers = tmp$ret$32;
|
|
432
|
+
var tmp$ret$35;
|
|
433
|
+
// Inline function 'kotlin.collections.find' call
|
|
434
|
+
var tmp$ret$34;
|
|
435
|
+
$l$block_0: {
|
|
436
|
+
// Inline function 'kotlin.collections.firstOrNull' call
|
|
437
|
+
var tmp0_iterator_7 = parameters.c();
|
|
438
|
+
while (tmp0_iterator_7.d()) {
|
|
439
|
+
var element_5 = tmp0_iterator_7.e();
|
|
440
|
+
var tmp$ret$33;
|
|
441
|
+
// Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.parse.<anonymous>.<anonymous>.<anonymous>' call
|
|
442
|
+
tmp$ret$33 = element_5.c1c_1.equals(ParameterLocation_BODY_getInstance());
|
|
443
|
+
if (tmp$ret$33) {
|
|
444
|
+
tmp$ret$34 = element_5;
|
|
445
|
+
break $l$block_0;
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
tmp$ret$34 = null;
|
|
449
|
+
}
|
|
450
|
+
tmp$ret$35 = tmp$ret$34;
|
|
451
|
+
var tmp5_safe_receiver = tmp$ret$35;
|
|
452
|
+
var tmp_6;
|
|
453
|
+
if (tmp5_safe_receiver == null) {
|
|
454
|
+
tmp_6 = null;
|
|
455
|
+
} else {
|
|
456
|
+
var tmp$ret$37;
|
|
457
|
+
// Inline function 'kotlin.let' call
|
|
458
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
459
|
+
var tmp$ret$36;
|
|
460
|
+
// Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.parse.<anonymous>.<anonymous>.<anonymous>' call
|
|
461
|
+
var tmp0_safe_receiver_4 = tmp5_safe_receiver.f1c_1;
|
|
462
|
+
var tmp1_elvis_lhs_0 = tmp0_safe_receiver_4 == null ? null : toReference(tmp0_safe_receiver_4, openApi);
|
|
463
|
+
var tmp_7;
|
|
464
|
+
if (tmp1_elvis_lhs_0 == null) {
|
|
465
|
+
throw new NotImplementedError();
|
|
466
|
+
} else {
|
|
467
|
+
tmp_7 = tmp1_elvis_lhs_0;
|
|
468
|
+
}
|
|
469
|
+
var tmp_8 = tmp_7;
|
|
470
|
+
var tmp2_elvis_lhs_0 = tmp5_safe_receiver.e1c_1;
|
|
471
|
+
tmp$ret$36 = listOf(new Request(new Content('application/json', tmp_8, tmp2_elvis_lhs_0 == null ? false : tmp2_elvis_lhs_0)));
|
|
472
|
+
tmp$ret$37 = tmp$ret$36;
|
|
473
|
+
tmp_6 = tmp$ret$37;
|
|
474
|
+
}
|
|
475
|
+
var tmp6_elvis_lhs = tmp_6;
|
|
476
|
+
var requests = tmp6_elvis_lhs == null ? listOf(new Request(null)) : tmp6_elvis_lhs;
|
|
477
|
+
var tmp7_safe_receiver = operation;
|
|
478
|
+
var tmp8_safe_receiver = tmp7_safe_receiver == null ? null : tmp7_safe_receiver.t1b_1;
|
|
479
|
+
var tmp_9;
|
|
480
|
+
if (tmp8_safe_receiver == null) {
|
|
481
|
+
tmp_9 = null;
|
|
482
|
+
} else {
|
|
483
|
+
var tmp$ret$45;
|
|
484
|
+
// Inline function 'kotlin.collections.flatMap' call
|
|
485
|
+
var tmp$ret$44;
|
|
486
|
+
// Inline function 'kotlin.collections.flatMapTo' call
|
|
487
|
+
var tmp9_flatMapTo = ArrayList_init_$Create$();
|
|
488
|
+
var tmp$ret$38;
|
|
489
|
+
// Inline function 'kotlin.collections.iterator' call
|
|
490
|
+
tmp$ret$38 = tmp8_safe_receiver.u().c();
|
|
491
|
+
var tmp0_iterator_8 = tmp$ret$38;
|
|
492
|
+
while (tmp0_iterator_8.d()) {
|
|
493
|
+
var element_6 = tmp0_iterator_8.e();
|
|
494
|
+
var tmp$ret$43;
|
|
495
|
+
// Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.parse.<anonymous>.<anonymous>.<anonymous>' call
|
|
496
|
+
var tmp$ret$39;
|
|
497
|
+
// Inline function 'kotlin.collections.component1' call
|
|
498
|
+
tmp$ret$39 = element_6.v().b1d_1;
|
|
499
|
+
var status = tmp$ret$39;
|
|
500
|
+
var tmp$ret$40;
|
|
501
|
+
// Inline function 'kotlin.collections.component2' call
|
|
502
|
+
tmp$ret$40 = element_6.w();
|
|
503
|
+
var res = tmp$ret$40;
|
|
504
|
+
var tmp0_safe_receiver_5 = resolve(res, openApi);
|
|
505
|
+
var tmp_10;
|
|
506
|
+
if (tmp0_safe_receiver_5 == null) {
|
|
507
|
+
tmp_10 = null;
|
|
508
|
+
} else {
|
|
509
|
+
var tmp$ret$42;
|
|
510
|
+
// Inline function 'kotlin.let' call
|
|
511
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
512
|
+
var tmp$ret$41;
|
|
513
|
+
// Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.parse.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
|
|
514
|
+
var tmp_11;
|
|
515
|
+
if (!(tmp0_safe_receiver_5.f1d_1 == null)) {
|
|
516
|
+
var tmp_12 = _StatusCode___get_value__impl__we50mu(status);
|
|
517
|
+
var tmp0_safe_receiver_6 = tmp0_safe_receiver_5.f1d_1;
|
|
518
|
+
var tmp1_elvis_lhs_1 = tmp0_safe_receiver_6 == null ? null : toReference(tmp0_safe_receiver_6, openApi);
|
|
519
|
+
var tmp_13;
|
|
520
|
+
if (tmp1_elvis_lhs_1 == null) {
|
|
521
|
+
throw new NotImplementedError();
|
|
522
|
+
} else {
|
|
523
|
+
tmp_13 = tmp1_elvis_lhs_1;
|
|
524
|
+
}
|
|
525
|
+
tmp_11 = listOf(new Response(tmp_12, new Content('application/json', tmp_13, false)));
|
|
526
|
+
} else {
|
|
527
|
+
tmp_11 = null;
|
|
528
|
+
}
|
|
529
|
+
tmp$ret$41 = tmp_11;
|
|
530
|
+
tmp$ret$42 = tmp$ret$41;
|
|
531
|
+
tmp_10 = tmp$ret$42;
|
|
532
|
+
}
|
|
533
|
+
var tmp1_elvis_lhs_2 = tmp_10;
|
|
534
|
+
tmp$ret$43 = tmp1_elvis_lhs_2 == null ? listOf(new Response(_StatusCode___get_value__impl__we50mu(status), null)) : tmp1_elvis_lhs_2;
|
|
535
|
+
var list = tmp$ret$43;
|
|
536
|
+
addAll(tmp9_flatMapTo, list);
|
|
537
|
+
}
|
|
538
|
+
tmp$ret$44 = tmp9_flatMapTo;
|
|
539
|
+
tmp$ret$45 = tmp$ret$44;
|
|
540
|
+
tmp_9 = tmp$ret$45;
|
|
541
|
+
}
|
|
542
|
+
var tmp9_elvis_lhs = tmp_9;
|
|
543
|
+
var responses = tmp9_elvis_lhs == null ? emptyList() : tmp9_elvis_lhs;
|
|
544
|
+
tmp$ret$46 = new Endpoint(name, method, segments, query, headers, emptyList(), requests, responses);
|
|
545
|
+
tmp0_mapTo.a(tmp$ret$46);
|
|
546
|
+
}
|
|
547
|
+
tmp$ret$47 = tmp0_mapTo;
|
|
548
|
+
tmp$ret$48 = tmp$ret$47;
|
|
549
|
+
tmp$ret$49 = tmp$ret$48;
|
|
550
|
+
var list_0 = tmp$ret$49;
|
|
551
|
+
addAll(tmp0_flatMapTo, list_0);
|
|
552
|
+
}
|
|
553
|
+
tmp$ret$50 = tmp0_flatMapTo;
|
|
554
|
+
tmp$ret$51 = tmp$ret$50;
|
|
555
|
+
var endpointAst = tmp$ret$51;
|
|
556
|
+
var tmp0_safe_receiver_7 = openApi.i1a_1;
|
|
557
|
+
var tmp_14;
|
|
558
|
+
if (tmp0_safe_receiver_7 == null) {
|
|
559
|
+
tmp_14 = null;
|
|
560
|
+
} else {
|
|
561
|
+
var tmp$ret$55;
|
|
562
|
+
// Inline function 'kotlin.collections.flatMap' call
|
|
563
|
+
var tmp$ret$54;
|
|
564
|
+
// Inline function 'kotlin.collections.flatMapTo' call
|
|
565
|
+
var tmp2_flatMapTo = ArrayList_init_$Create$();
|
|
566
|
+
var tmp$ret$52;
|
|
567
|
+
// Inline function 'kotlin.collections.iterator' call
|
|
568
|
+
tmp$ret$52 = tmp0_safe_receiver_7.u().c();
|
|
569
|
+
var tmp0_iterator_9 = tmp$ret$52;
|
|
570
|
+
while (tmp0_iterator_9.d()) {
|
|
571
|
+
var element_7 = tmp0_iterator_9.e();
|
|
572
|
+
var tmp$ret$53;
|
|
573
|
+
// Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.parse.<anonymous>' call
|
|
574
|
+
tmp$ret$53 = flatten(element_7.w(), Common_getInstance().q1s([element_7.v()]), openApi);
|
|
575
|
+
var list_1 = tmp$ret$53;
|
|
576
|
+
addAll(tmp2_flatMapTo, list_1);
|
|
577
|
+
}
|
|
578
|
+
tmp$ret$54 = tmp2_flatMapTo;
|
|
579
|
+
tmp$ret$55 = tmp$ret$54;
|
|
580
|
+
tmp_14 = tmp$ret$55;
|
|
581
|
+
}
|
|
582
|
+
var tmp1_safe_receiver_0 = tmp_14;
|
|
583
|
+
var tmp_15;
|
|
584
|
+
if (tmp1_safe_receiver_0 == null) {
|
|
585
|
+
tmp_15 = null;
|
|
586
|
+
} else {
|
|
587
|
+
var tmp$ret$61;
|
|
588
|
+
// Inline function 'kotlin.collections.map' call
|
|
589
|
+
var tmp$ret$60;
|
|
590
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
591
|
+
var tmp3_mapTo = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp1_safe_receiver_0, 10));
|
|
592
|
+
var tmp0_iterator_10 = tmp1_safe_receiver_0.c();
|
|
593
|
+
while (tmp0_iterator_10.d()) {
|
|
594
|
+
var item_1 = tmp0_iterator_10.e();
|
|
595
|
+
var tmp$ret$59;
|
|
596
|
+
// Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.parse.<anonymous>' call
|
|
597
|
+
var tmp$ret$58;
|
|
598
|
+
// Inline function 'kotlin.collections.map' call
|
|
599
|
+
var tmp1_map_1 = item_1.u1s_1;
|
|
600
|
+
var tmp$ret$57;
|
|
601
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
602
|
+
var tmp0_mapTo_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp1_map_1, 10));
|
|
603
|
+
var tmp0_iterator_11 = tmp1_map_1.c();
|
|
604
|
+
while (tmp0_iterator_11.d()) {
|
|
605
|
+
var item_2 = tmp0_iterator_11.e();
|
|
606
|
+
var tmp$ret$56;
|
|
607
|
+
// Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.parse.<anonymous>.<anonymous>' call
|
|
608
|
+
tmp$ret$56 = item_2.w1s_1;
|
|
609
|
+
tmp0_mapTo_1.a(tmp$ret$56);
|
|
610
|
+
}
|
|
611
|
+
tmp$ret$57 = tmp0_mapTo_1;
|
|
612
|
+
tmp$ret$58 = tmp$ret$57;
|
|
613
|
+
tmp$ret$59 = new Type(item_1.t1s_1, new Shape(tmp$ret$58));
|
|
614
|
+
tmp3_mapTo.a(tmp$ret$59);
|
|
615
|
+
}
|
|
616
|
+
tmp$ret$60 = tmp3_mapTo;
|
|
617
|
+
tmp$ret$61 = tmp$ret$60;
|
|
618
|
+
tmp_15 = tmp$ret$61;
|
|
619
|
+
}
|
|
620
|
+
var tmp2_elvis_lhs_1 = tmp_15;
|
|
621
|
+
var definitionsAst = tmp2_elvis_lhs_1 == null ? emptyList() : tmp2_elvis_lhs_1;
|
|
622
|
+
return plus(endpointAst, definitionsAst);
|
|
623
|
+
};
|
|
624
|
+
var OpenApiParser_instance;
|
|
625
|
+
function OpenApiParser_getInstance() {
|
|
626
|
+
if (OpenApiParser_instance == null)
|
|
627
|
+
new OpenApiParser();
|
|
628
|
+
return OpenApiParser_instance;
|
|
629
|
+
}
|
|
630
|
+
function resolveParameters(_this__u8e3s4, openApi) {
|
|
631
|
+
var tmp0_safe_receiver = _this__u8e3s4.s1b_1;
|
|
632
|
+
var tmp;
|
|
633
|
+
if (tmp0_safe_receiver == null) {
|
|
634
|
+
tmp = null;
|
|
635
|
+
} else {
|
|
636
|
+
var tmp$ret$3;
|
|
637
|
+
// Inline function 'kotlin.collections.mapNotNull' call
|
|
638
|
+
var tmp$ret$2;
|
|
639
|
+
// Inline function 'kotlin.collections.mapNotNullTo' call
|
|
640
|
+
var tmp0_mapNotNullTo = ArrayList_init_$Create$();
|
|
641
|
+
// Inline function 'kotlin.collections.forEach' call
|
|
642
|
+
var tmp0_iterator = tmp0_safe_receiver.c();
|
|
643
|
+
while (tmp0_iterator.d()) {
|
|
644
|
+
var element = tmp0_iterator.e();
|
|
645
|
+
// Inline function 'kotlin.collections.mapNotNullTo.<anonymous>' call
|
|
646
|
+
var tmp$ret$0;
|
|
647
|
+
// Inline function 'community.flock.wirespec.openapi.v2.resolveParameters.<anonymous>' call
|
|
648
|
+
var tmp0_subject = element;
|
|
649
|
+
var tmp_0;
|
|
650
|
+
if (tmp0_subject instanceof ParameterObject) {
|
|
651
|
+
tmp_0 = element;
|
|
652
|
+
} else {
|
|
653
|
+
if (tmp0_subject instanceof ReferenceObject) {
|
|
654
|
+
tmp_0 = resolveParameterObject(element, openApi);
|
|
655
|
+
} else {
|
|
656
|
+
noWhenBranchMatchedException();
|
|
657
|
+
}
|
|
658
|
+
}
|
|
659
|
+
tmp$ret$0 = tmp_0;
|
|
660
|
+
var tmp0_safe_receiver_0 = tmp$ret$0;
|
|
661
|
+
if (tmp0_safe_receiver_0 == null)
|
|
662
|
+
null;
|
|
663
|
+
else {
|
|
664
|
+
var tmp$ret$1;
|
|
665
|
+
// Inline function 'kotlin.let' call
|
|
666
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
667
|
+
tmp0_mapNotNullTo.a(tmp0_safe_receiver_0);
|
|
668
|
+
tmp$ret$1 = Unit_getInstance();
|
|
669
|
+
}
|
|
670
|
+
}
|
|
671
|
+
tmp$ret$2 = tmp0_mapNotNullTo;
|
|
672
|
+
tmp$ret$3 = tmp$ret$2;
|
|
673
|
+
tmp = tmp$ret$3;
|
|
674
|
+
}
|
|
675
|
+
var tmp1_elvis_lhs = tmp;
|
|
676
|
+
return tmp1_elvis_lhs == null ? emptyList() : tmp1_elvis_lhs;
|
|
677
|
+
}
|
|
678
|
+
function resolveParameters_0(_this__u8e3s4, openApi) {
|
|
679
|
+
var tmp0_safe_receiver = _this__u8e3s4.h1b_1;
|
|
680
|
+
var tmp;
|
|
681
|
+
if (tmp0_safe_receiver == null) {
|
|
682
|
+
tmp = null;
|
|
683
|
+
} else {
|
|
684
|
+
var tmp$ret$3;
|
|
685
|
+
// Inline function 'kotlin.collections.mapNotNull' call
|
|
686
|
+
var tmp$ret$2;
|
|
687
|
+
// Inline function 'kotlin.collections.mapNotNullTo' call
|
|
688
|
+
var tmp0_mapNotNullTo = ArrayList_init_$Create$();
|
|
689
|
+
// Inline function 'kotlin.collections.forEach' call
|
|
690
|
+
var tmp0_iterator = tmp0_safe_receiver.c();
|
|
691
|
+
while (tmp0_iterator.d()) {
|
|
692
|
+
var element = tmp0_iterator.e();
|
|
693
|
+
// Inline function 'kotlin.collections.mapNotNullTo.<anonymous>' call
|
|
694
|
+
var tmp$ret$0;
|
|
695
|
+
// Inline function 'community.flock.wirespec.openapi.v2.resolveParameters.<anonymous>' call
|
|
696
|
+
var tmp0_subject = element;
|
|
697
|
+
var tmp_0;
|
|
698
|
+
if (tmp0_subject instanceof ParameterObject) {
|
|
699
|
+
tmp_0 = element;
|
|
700
|
+
} else {
|
|
701
|
+
if (tmp0_subject instanceof ReferenceObject) {
|
|
702
|
+
tmp_0 = resolveParameterObject(element, openApi);
|
|
703
|
+
} else {
|
|
704
|
+
noWhenBranchMatchedException();
|
|
705
|
+
}
|
|
706
|
+
}
|
|
707
|
+
tmp$ret$0 = tmp_0;
|
|
708
|
+
var tmp0_safe_receiver_0 = tmp$ret$0;
|
|
709
|
+
if (tmp0_safe_receiver_0 == null)
|
|
710
|
+
null;
|
|
711
|
+
else {
|
|
712
|
+
var tmp$ret$1;
|
|
713
|
+
// Inline function 'kotlin.let' call
|
|
714
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
715
|
+
tmp0_mapNotNullTo.a(tmp0_safe_receiver_0);
|
|
716
|
+
tmp$ret$1 = Unit_getInstance();
|
|
717
|
+
}
|
|
718
|
+
}
|
|
719
|
+
tmp$ret$2 = tmp0_mapNotNullTo;
|
|
720
|
+
tmp$ret$3 = tmp$ret$2;
|
|
721
|
+
tmp = tmp$ret$3;
|
|
722
|
+
}
|
|
723
|
+
var tmp1_elvis_lhs = tmp;
|
|
724
|
+
return tmp1_elvis_lhs == null ? emptyList() : tmp1_elvis_lhs;
|
|
725
|
+
}
|
|
726
|
+
function toPrimitive(_this__u8e3s4) {
|
|
727
|
+
var tmp0_subject = _this__u8e3s4;
|
|
728
|
+
var tmp0 = tmp0_subject.q4_1;
|
|
729
|
+
var tmp;
|
|
730
|
+
switch (tmp0) {
|
|
731
|
+
case 0:
|
|
732
|
+
tmp = Type_String_getInstance();
|
|
733
|
+
break;
|
|
734
|
+
case 2:
|
|
735
|
+
tmp = Type_Integer_getInstance();
|
|
736
|
+
break;
|
|
737
|
+
case 1:
|
|
738
|
+
tmp = Type_Integer_getInstance();
|
|
739
|
+
break;
|
|
740
|
+
case 3:
|
|
741
|
+
tmp = Type_Boolean_getInstance();
|
|
742
|
+
break;
|
|
743
|
+
default:
|
|
744
|
+
throw IllegalStateException_init_$Create$('Type is not a primitive');
|
|
745
|
+
}
|
|
746
|
+
return tmp;
|
|
747
|
+
}
|
|
748
|
+
function toField(_this__u8e3s4, openApi) {
|
|
749
|
+
var tmp0_safe_receiver = resolve_0(_this__u8e3s4, openApi);
|
|
750
|
+
var tmp;
|
|
751
|
+
if (tmp0_safe_receiver == null) {
|
|
752
|
+
tmp = null;
|
|
753
|
+
} else {
|
|
754
|
+
var tmp$ret$5;
|
|
755
|
+
// Inline function 'kotlin.let' call
|
|
756
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
757
|
+
var tmp$ret$4;
|
|
758
|
+
// Inline function 'community.flock.wirespec.openapi.v2.toField.<anonymous>' call
|
|
759
|
+
var type = tmp0_safe_receiver.g1c_1;
|
|
760
|
+
var tmp0 = type == null ? -1 : type.q4_1;
|
|
761
|
+
var tmp_0;
|
|
762
|
+
switch (tmp0) {
|
|
763
|
+
case 0:
|
|
764
|
+
case 1:
|
|
765
|
+
case 2:
|
|
766
|
+
case 3:
|
|
767
|
+
var tmp$ret$1;
|
|
768
|
+
// Inline function 'kotlin.let' call
|
|
769
|
+
var tmp0_let = toPrimitive(type);
|
|
770
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
771
|
+
var tmp$ret$0;
|
|
772
|
+
// Inline function 'community.flock.wirespec.openapi.v2.toField.<anonymous>.<anonymous>' call
|
|
773
|
+
tmp$ret$0 = new Primitive(tmp0_let, false);
|
|
774
|
+
tmp$ret$1 = tmp$ret$0;
|
|
775
|
+
|
|
776
|
+
tmp_0 = tmp$ret$1;
|
|
777
|
+
break;
|
|
778
|
+
case 4:
|
|
779
|
+
var tmp0_safe_receiver_0 = tmp0_safe_receiver.h1c_1;
|
|
780
|
+
var tmp1_safe_receiver = tmp0_safe_receiver_0 == null ? null : resolve_1(tmp0_safe_receiver_0, openApi);
|
|
781
|
+
var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.k1e_1;
|
|
782
|
+
var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : toPrimitive(tmp2_safe_receiver);
|
|
783
|
+
var tmp_1;
|
|
784
|
+
if (tmp3_safe_receiver == null) {
|
|
785
|
+
tmp_1 = null;
|
|
786
|
+
} else {
|
|
787
|
+
var tmp$ret$3;
|
|
788
|
+
// Inline function 'kotlin.let' call
|
|
789
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
790
|
+
var tmp$ret$2;
|
|
791
|
+
// Inline function 'community.flock.wirespec.openapi.v2.toField.<anonymous>.<anonymous>' call
|
|
792
|
+
tmp$ret$2 = new Primitive(tmp3_safe_receiver, true);
|
|
793
|
+
tmp$ret$3 = tmp$ret$2;
|
|
794
|
+
tmp_1 = tmp$ret$3;
|
|
795
|
+
}
|
|
796
|
+
|
|
797
|
+
var tmp4_elvis_lhs = tmp_1;
|
|
798
|
+
var tmp_2;
|
|
799
|
+
if (tmp4_elvis_lhs == null) {
|
|
800
|
+
throw new NotImplementedError();
|
|
801
|
+
} else {
|
|
802
|
+
tmp_2 = tmp4_elvis_lhs;
|
|
803
|
+
}
|
|
804
|
+
|
|
805
|
+
tmp_0 = tmp_2;
|
|
806
|
+
break;
|
|
807
|
+
case 5:
|
|
808
|
+
throw new NotImplementedError();
|
|
809
|
+
case 6:
|
|
810
|
+
throw new NotImplementedError();
|
|
811
|
+
case -1:
|
|
812
|
+
throw new NotImplementedError();
|
|
813
|
+
default:
|
|
814
|
+
noWhenBranchMatchedException();
|
|
815
|
+
break;
|
|
816
|
+
}
|
|
817
|
+
tmp$ret$4 = tmp_0;
|
|
818
|
+
tmp$ret$5 = tmp$ret$4;
|
|
819
|
+
tmp = tmp$ret$5;
|
|
820
|
+
}
|
|
821
|
+
var tmp1_safe_receiver_0 = tmp;
|
|
822
|
+
var tmp_3;
|
|
823
|
+
if (tmp1_safe_receiver_0 == null) {
|
|
824
|
+
tmp_3 = null;
|
|
825
|
+
} else {
|
|
826
|
+
var tmp$ret$7;
|
|
827
|
+
// Inline function 'kotlin.let' call
|
|
828
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
829
|
+
var tmp$ret$6;
|
|
830
|
+
// Inline function 'community.flock.wirespec.openapi.v2.toField.<anonymous>' call
|
|
831
|
+
var tmp_4 = new Identifier(_this__u8e3s4.b1c_1);
|
|
832
|
+
var tmp0_elvis_lhs = _this__u8e3s4.e1c_1;
|
|
833
|
+
tmp$ret$6 = new Field(tmp_4, tmp1_safe_receiver_0, !(tmp0_elvis_lhs == null ? false : tmp0_elvis_lhs));
|
|
834
|
+
tmp$ret$7 = tmp$ret$6;
|
|
835
|
+
tmp_3 = tmp$ret$7;
|
|
836
|
+
}
|
|
837
|
+
return tmp_3;
|
|
838
|
+
}
|
|
839
|
+
function toReference(_this__u8e3s4, openApi) {
|
|
840
|
+
var tmp0_subject = _this__u8e3s4;
|
|
841
|
+
var tmp;
|
|
842
|
+
if (tmp0_subject instanceof ReferenceObject) {
|
|
843
|
+
var tmp1_elvis_lhs = resolveSchemaObject(_this__u8e3s4, openApi);
|
|
844
|
+
var tmp_0;
|
|
845
|
+
if (tmp1_elvis_lhs == null) {
|
|
846
|
+
throw new NotImplementedError();
|
|
847
|
+
} else {
|
|
848
|
+
tmp_0 = tmp1_elvis_lhs;
|
|
849
|
+
}
|
|
850
|
+
var resolved = tmp_0;
|
|
851
|
+
var tmp2_subject = resolved.h3_1.k1e_1;
|
|
852
|
+
var tmp0 = tmp2_subject == null ? -1 : tmp2_subject.q4_1;
|
|
853
|
+
var tmp_1;
|
|
854
|
+
if (tmp0 === 4) {
|
|
855
|
+
var tmp3_subject = resolved.h3_1.l1e_1;
|
|
856
|
+
var tmp_2;
|
|
857
|
+
if (tmp3_subject instanceof ReferenceObject) {
|
|
858
|
+
var tmp_3 = Common_getInstance();
|
|
859
|
+
var tmp_4 = resolved.h3_1.l1e_1;
|
|
860
|
+
tmp_2 = new Custom(tmp_3.q1s([getReference(tmp_4 instanceof ReferenceObject ? tmp_4 : THROW_CCE())]), true);
|
|
861
|
+
} else {
|
|
862
|
+
if (tmp3_subject instanceof SchemaObject) {
|
|
863
|
+
tmp_2 = new Custom(Common_getInstance().q1s([getReference(resolved.g3_1), 'Array']), true);
|
|
864
|
+
} else {
|
|
865
|
+
throw new NotImplementedError();
|
|
866
|
+
}
|
|
867
|
+
}
|
|
868
|
+
tmp_1 = tmp_2;
|
|
869
|
+
} else {
|
|
870
|
+
tmp_1 = new Custom(Common_getInstance().q1s([getReference(resolved.g3_1)]), false);
|
|
871
|
+
}
|
|
872
|
+
tmp = tmp_1;
|
|
873
|
+
} else {
|
|
874
|
+
if (tmp0_subject instanceof SchemaObject) {
|
|
875
|
+
var tmp4_subject = _this__u8e3s4.k1e_1;
|
|
876
|
+
var tmp0_0 = tmp4_subject == null ? -1 : tmp4_subject.q4_1;
|
|
877
|
+
var tmp_5;
|
|
878
|
+
switch (tmp0_0) {
|
|
879
|
+
case 0:
|
|
880
|
+
case 2:
|
|
881
|
+
case 1:
|
|
882
|
+
case 3:
|
|
883
|
+
var tmp_6 = _this__u8e3s4.k1e_1;
|
|
884
|
+
tmp_5 = new Primitive(toPrimitive(tmp_6 instanceof Type_0 ? tmp_6 : THROW_CCE()), false);
|
|
885
|
+
break;
|
|
886
|
+
case 4:
|
|
887
|
+
var tmp5_subject = _this__u8e3s4.l1e_1;
|
|
888
|
+
var tmp_7;
|
|
889
|
+
if (tmp5_subject instanceof ReferenceObject) {
|
|
890
|
+
var tmp_8 = Common_getInstance();
|
|
891
|
+
var tmp_9 = _this__u8e3s4.l1e_1;
|
|
892
|
+
tmp_7 = new Custom(tmp_8.q1s([getReference(tmp_9 instanceof ReferenceObject ? tmp_9 : THROW_CCE())]), true);
|
|
893
|
+
} else {
|
|
894
|
+
throw new NotImplementedError();
|
|
895
|
+
}
|
|
896
|
+
|
|
897
|
+
tmp_5 = tmp_7;
|
|
898
|
+
break;
|
|
899
|
+
default:
|
|
900
|
+
throw new NotImplementedError();
|
|
901
|
+
}
|
|
902
|
+
tmp = tmp_5;
|
|
903
|
+
} else {
|
|
904
|
+
noWhenBranchMatchedException();
|
|
905
|
+
}
|
|
906
|
+
}
|
|
907
|
+
return tmp;
|
|
908
|
+
}
|
|
909
|
+
function resolve(_this__u8e3s4, openApi) {
|
|
910
|
+
var tmp0_subject = _this__u8e3s4;
|
|
911
|
+
var tmp;
|
|
912
|
+
if (tmp0_subject instanceof ResponseObject) {
|
|
913
|
+
tmp = _this__u8e3s4;
|
|
914
|
+
} else {
|
|
915
|
+
if (tmp0_subject instanceof ReferenceObject) {
|
|
916
|
+
var tmp1_safe_receiver = resolveResponseObject(_this__u8e3s4, openApi);
|
|
917
|
+
tmp = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.h3_1;
|
|
918
|
+
} else {
|
|
919
|
+
noWhenBranchMatchedException();
|
|
920
|
+
}
|
|
921
|
+
}
|
|
922
|
+
return tmp;
|
|
923
|
+
}
|
|
924
|
+
function toOperationList(_this__u8e3s4) {
|
|
925
|
+
var tmp$ret$5;
|
|
926
|
+
// Inline function 'kotlin.collections.filter' call
|
|
927
|
+
var tmp$ret$2;
|
|
928
|
+
// Inline function 'kotlin.collections.map' call
|
|
929
|
+
var tmp1_map = values();
|
|
930
|
+
var tmp$ret$1;
|
|
931
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
932
|
+
var tmp0_mapTo = ArrayList_init_$Create$_0(tmp1_map.length);
|
|
933
|
+
var indexedObject = tmp1_map;
|
|
934
|
+
var inductionVariable = 0;
|
|
935
|
+
var last = indexedObject.length;
|
|
936
|
+
while (inductionVariable < last) {
|
|
937
|
+
var item = indexedObject[inductionVariable];
|
|
938
|
+
inductionVariable = inductionVariable + 1 | 0;
|
|
939
|
+
var tmp$ret$0;
|
|
940
|
+
// Inline function 'community.flock.wirespec.openapi.v2.toOperationList.<anonymous>' call
|
|
941
|
+
var tmp0_subject = item;
|
|
942
|
+
var tmp0 = tmp0_subject.q4_1;
|
|
943
|
+
var tmp;
|
|
944
|
+
switch (tmp0) {
|
|
945
|
+
case 0:
|
|
946
|
+
tmp = _this__u8e3s4.y1a_1;
|
|
947
|
+
break;
|
|
948
|
+
case 1:
|
|
949
|
+
tmp = _this__u8e3s4.a1b_1;
|
|
950
|
+
break;
|
|
951
|
+
case 2:
|
|
952
|
+
tmp = _this__u8e3s4.z1a_1;
|
|
953
|
+
break;
|
|
954
|
+
case 3:
|
|
955
|
+
tmp = _this__u8e3s4.b1b_1;
|
|
956
|
+
break;
|
|
957
|
+
case 4:
|
|
958
|
+
tmp = _this__u8e3s4.c1b_1;
|
|
959
|
+
break;
|
|
960
|
+
case 5:
|
|
961
|
+
tmp = _this__u8e3s4.d1b_1;
|
|
962
|
+
break;
|
|
963
|
+
case 6:
|
|
964
|
+
tmp = _this__u8e3s4.e1b_1;
|
|
965
|
+
break;
|
|
966
|
+
case 7:
|
|
967
|
+
tmp = _this__u8e3s4.f1b_1;
|
|
968
|
+
break;
|
|
969
|
+
default:
|
|
970
|
+
noWhenBranchMatchedException();
|
|
971
|
+
break;
|
|
972
|
+
}
|
|
973
|
+
tmp$ret$0 = to(item, tmp);
|
|
974
|
+
tmp0_mapTo.a(tmp$ret$0);
|
|
975
|
+
}
|
|
976
|
+
tmp$ret$1 = tmp0_mapTo;
|
|
977
|
+
tmp$ret$2 = tmp$ret$1;
|
|
978
|
+
var tmp3_filter = tmp$ret$2;
|
|
979
|
+
var tmp$ret$4;
|
|
980
|
+
// Inline function 'kotlin.collections.filterTo' call
|
|
981
|
+
var tmp2_filterTo = ArrayList_init_$Create$();
|
|
982
|
+
var tmp0_iterator = tmp3_filter.c();
|
|
983
|
+
while (tmp0_iterator.d()) {
|
|
984
|
+
var element = tmp0_iterator.e();
|
|
985
|
+
var tmp$ret$3;
|
|
986
|
+
// Inline function 'community.flock.wirespec.openapi.v2.toOperationList.<anonymous>' call
|
|
987
|
+
var value = element.j3();
|
|
988
|
+
tmp$ret$3 = !(value == null);
|
|
989
|
+
if (tmp$ret$3) {
|
|
990
|
+
tmp2_filterTo.a(element);
|
|
991
|
+
}
|
|
992
|
+
}
|
|
993
|
+
tmp$ret$4 = tmp2_filterTo;
|
|
994
|
+
tmp$ret$5 = tmp$ret$4;
|
|
995
|
+
return tmp$ret$5;
|
|
996
|
+
}
|
|
997
|
+
function SimpleSchema(name, properties) {
|
|
998
|
+
this.t1s_1 = name;
|
|
999
|
+
this.u1s_1 = properties;
|
|
1000
|
+
}
|
|
1001
|
+
protoOf(SimpleSchema).toString = function () {
|
|
1002
|
+
return 'SimpleSchema(name=' + this.t1s_1 + ', properties=' + this.u1s_1 + ')';
|
|
1003
|
+
};
|
|
1004
|
+
protoOf(SimpleSchema).hashCode = function () {
|
|
1005
|
+
var result = getStringHashCode(this.t1s_1);
|
|
1006
|
+
result = imul(result, 31) + hashCode(this.u1s_1) | 0;
|
|
1007
|
+
return result;
|
|
1008
|
+
};
|
|
1009
|
+
protoOf(SimpleSchema).equals = function (other) {
|
|
1010
|
+
if (this === other)
|
|
1011
|
+
return true;
|
|
1012
|
+
if (!(other instanceof SimpleSchema))
|
|
1013
|
+
return false;
|
|
1014
|
+
var tmp0_other_with_cast = other instanceof SimpleSchema ? other : THROW_CCE();
|
|
1015
|
+
if (!(this.t1s_1 === tmp0_other_with_cast.t1s_1))
|
|
1016
|
+
return false;
|
|
1017
|
+
if (!equals(this.u1s_1, tmp0_other_with_cast.u1s_1))
|
|
1018
|
+
return false;
|
|
1019
|
+
return true;
|
|
1020
|
+
};
|
|
1021
|
+
function flatten(_this__u8e3s4, name, openApi) {
|
|
1022
|
+
var tmp0_subject = _this__u8e3s4.k1e_1;
|
|
1023
|
+
var tmp0 = tmp0_subject == null ? -1 : tmp0_subject.q4_1;
|
|
1024
|
+
var tmp;
|
|
1025
|
+
switch (tmp0) {
|
|
1026
|
+
case -1:
|
|
1027
|
+
case 5:
|
|
1028
|
+
var tmp1_safe_receiver = _this__u8e3s4.n1e_1;
|
|
1029
|
+
var tmp_0;
|
|
1030
|
+
if (tmp1_safe_receiver == null) {
|
|
1031
|
+
tmp_0 = null;
|
|
1032
|
+
} else {
|
|
1033
|
+
var tmp$ret$5;
|
|
1034
|
+
// Inline function 'kotlin.collections.flatMap' call
|
|
1035
|
+
var tmp$ret$4;
|
|
1036
|
+
// Inline function 'kotlin.collections.flatMapTo' call
|
|
1037
|
+
var tmp0_flatMapTo = ArrayList_init_$Create$();
|
|
1038
|
+
var tmp$ret$0;
|
|
1039
|
+
// Inline function 'kotlin.collections.iterator' call
|
|
1040
|
+
tmp$ret$0 = tmp1_safe_receiver.u().c();
|
|
1041
|
+
var tmp0_iterator = tmp$ret$0;
|
|
1042
|
+
while (tmp0_iterator.d()) {
|
|
1043
|
+
var element = tmp0_iterator.e();
|
|
1044
|
+
var tmp$ret$3;
|
|
1045
|
+
// Inline function 'community.flock.wirespec.openapi.v2.flatten.<anonymous>' call
|
|
1046
|
+
var tmp$ret$1;
|
|
1047
|
+
// Inline function 'kotlin.collections.component1' call
|
|
1048
|
+
tmp$ret$1 = element.v();
|
|
1049
|
+
var key = tmp$ret$1;
|
|
1050
|
+
var tmp$ret$2;
|
|
1051
|
+
// Inline function 'kotlin.collections.component2' call
|
|
1052
|
+
tmp$ret$2 = element.w();
|
|
1053
|
+
var value = tmp$ret$2;
|
|
1054
|
+
var tmp0_subject_0 = value;
|
|
1055
|
+
var tmp_1;
|
|
1056
|
+
if (tmp0_subject_0 instanceof SchemaObject) {
|
|
1057
|
+
var tmp1_subject = value.k1e_1;
|
|
1058
|
+
var tmp0_0 = tmp1_subject == null ? -1 : tmp1_subject.q4_1;
|
|
1059
|
+
tmp_1 = tmp0_0 === 4 ? emptyList() : flatten(value, Common_getInstance().q1s([name, key]), openApi);
|
|
1060
|
+
} else {
|
|
1061
|
+
if (tmp0_subject_0 instanceof ReferenceObject) {
|
|
1062
|
+
tmp_1 = emptyList();
|
|
1063
|
+
} else {
|
|
1064
|
+
noWhenBranchMatchedException();
|
|
1065
|
+
}
|
|
1066
|
+
}
|
|
1067
|
+
tmp$ret$3 = tmp_1;
|
|
1068
|
+
var list = tmp$ret$3;
|
|
1069
|
+
addAll(tmp0_flatMapTo, list);
|
|
1070
|
+
}
|
|
1071
|
+
tmp$ret$4 = tmp0_flatMapTo;
|
|
1072
|
+
tmp$ret$5 = tmp$ret$4;
|
|
1073
|
+
tmp_0 = tmp$ret$5;
|
|
1074
|
+
}
|
|
1075
|
+
|
|
1076
|
+
var tmp2_elvis_lhs = tmp_0;
|
|
1077
|
+
var fields = tmp2_elvis_lhs == null ? emptyList() : tmp2_elvis_lhs;
|
|
1078
|
+
var tmp3_safe_receiver = _this__u8e3s4.n1e_1;
|
|
1079
|
+
var tmp_2;
|
|
1080
|
+
if (tmp3_safe_receiver == null) {
|
|
1081
|
+
tmp_2 = null;
|
|
1082
|
+
} else {
|
|
1083
|
+
var tmp$ret$11;
|
|
1084
|
+
// Inline function 'kotlin.collections.map' call
|
|
1085
|
+
var tmp$ret$10;
|
|
1086
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
1087
|
+
var tmp1_mapTo = ArrayList_init_$Create$_0(tmp3_safe_receiver.f());
|
|
1088
|
+
var tmp$ret$6;
|
|
1089
|
+
// Inline function 'kotlin.collections.iterator' call
|
|
1090
|
+
tmp$ret$6 = tmp3_safe_receiver.u().c();
|
|
1091
|
+
var tmp0_iterator_0 = tmp$ret$6;
|
|
1092
|
+
while (tmp0_iterator_0.d()) {
|
|
1093
|
+
var item = tmp0_iterator_0.e();
|
|
1094
|
+
var tmp$ret$9;
|
|
1095
|
+
// Inline function 'community.flock.wirespec.openapi.v2.flatten.<anonymous>' call
|
|
1096
|
+
var tmp$ret$7;
|
|
1097
|
+
// Inline function 'kotlin.collections.component1' call
|
|
1098
|
+
tmp$ret$7 = item.v();
|
|
1099
|
+
var key_0 = tmp$ret$7;
|
|
1100
|
+
var tmp$ret$8;
|
|
1101
|
+
// Inline function 'kotlin.collections.component2' call
|
|
1102
|
+
tmp$ret$8 = item.w();
|
|
1103
|
+
var value_0 = tmp$ret$8;
|
|
1104
|
+
var tmp0_subject_1 = value_0;
|
|
1105
|
+
var tmp_3;
|
|
1106
|
+
if (tmp0_subject_1 instanceof SchemaObject) {
|
|
1107
|
+
var tmp1_subject_0 = value_0.k1e_1;
|
|
1108
|
+
var tmp0_1 = tmp1_subject_0 == null ? -1 : tmp1_subject_0.q4_1;
|
|
1109
|
+
var tmp_4;
|
|
1110
|
+
switch (tmp0_1) {
|
|
1111
|
+
case 0:
|
|
1112
|
+
case 1:
|
|
1113
|
+
case 2:
|
|
1114
|
+
case 3:
|
|
1115
|
+
var tmp_5 = value_0.k1e_1;
|
|
1116
|
+
tmp_4 = new Primitive(toPrimitive(tmp_5 instanceof Type_0 ? tmp_5 : THROW_CCE()), false);
|
|
1117
|
+
break;
|
|
1118
|
+
case 4:
|
|
1119
|
+
var tmp2_safe_receiver = value_0.l1e_1;
|
|
1120
|
+
var resolve = tmp2_safe_receiver == null ? null : resolve_1(tmp2_safe_receiver, openApi);
|
|
1121
|
+
var tmp3_safe_receiver_0 = resolve;
|
|
1122
|
+
var tmp4_subject = tmp3_safe_receiver_0 == null ? null : tmp3_safe_receiver_0.k1e_1;
|
|
1123
|
+
var tmp0_2 = tmp4_subject == null ? -1 : tmp4_subject.q4_1;
|
|
1124
|
+
var tmp_6;
|
|
1125
|
+
switch (tmp0_2) {
|
|
1126
|
+
case 0:
|
|
1127
|
+
case 1:
|
|
1128
|
+
case 2:
|
|
1129
|
+
case 3:
|
|
1130
|
+
var tmp_7 = resolve.k1e_1;
|
|
1131
|
+
tmp_6 = new Primitive(toPrimitive(tmp_7 instanceof Type_0 ? tmp_7 : THROW_CCE()), true);
|
|
1132
|
+
break;
|
|
1133
|
+
default:
|
|
1134
|
+
var tmp5_subject = value_0.l1e_1;
|
|
1135
|
+
var tmp_8;
|
|
1136
|
+
if (tmp5_subject instanceof ReferenceObject) {
|
|
1137
|
+
var tmp_9 = value_0.l1e_1;
|
|
1138
|
+
tmp_8 = new Custom(getReference(tmp_9 instanceof ReferenceObject ? tmp_9 : THROW_CCE()), true);
|
|
1139
|
+
} else {
|
|
1140
|
+
throw new NotImplementedError();
|
|
1141
|
+
}
|
|
1142
|
+
|
|
1143
|
+
tmp_6 = tmp_8;
|
|
1144
|
+
break;
|
|
1145
|
+
}
|
|
1146
|
+
|
|
1147
|
+
tmp_4 = tmp_6;
|
|
1148
|
+
break;
|
|
1149
|
+
case 5:
|
|
1150
|
+
tmp_4 = new Custom(Common_getInstance().q1s([name, key_0]), false);
|
|
1151
|
+
break;
|
|
1152
|
+
case 6:
|
|
1153
|
+
throw new NotImplementedError();
|
|
1154
|
+
case -1:
|
|
1155
|
+
throw new NotImplementedError();
|
|
1156
|
+
default:
|
|
1157
|
+
noWhenBranchMatchedException();
|
|
1158
|
+
break;
|
|
1159
|
+
}
|
|
1160
|
+
var reference = tmp_4;
|
|
1161
|
+
var tmp_10 = new Identifier(key_0);
|
|
1162
|
+
var tmp6_safe_receiver = _this__u8e3s4.i1e_1;
|
|
1163
|
+
var tmp7_elvis_lhs = tmp6_safe_receiver == null ? null : contains(tmp6_safe_receiver, key_0);
|
|
1164
|
+
tmp_3 = new SimpleProp(key_0, new Field(tmp_10, reference, !(tmp7_elvis_lhs == null ? false : tmp7_elvis_lhs)));
|
|
1165
|
+
} else {
|
|
1166
|
+
if (tmp0_subject_1 instanceof ReferenceObject) {
|
|
1167
|
+
var tmp_11 = new Identifier(key_0);
|
|
1168
|
+
var tmp_12 = new Custom(getReference(value_0), false);
|
|
1169
|
+
var tmp8_safe_receiver = _this__u8e3s4.i1e_1;
|
|
1170
|
+
var tmp9_elvis_lhs = tmp8_safe_receiver == null ? null : contains(tmp8_safe_receiver, key_0);
|
|
1171
|
+
tmp_3 = new SimpleProp(key_0, new Field(tmp_11, tmp_12, !(tmp9_elvis_lhs == null ? false : tmp9_elvis_lhs)));
|
|
1172
|
+
} else {
|
|
1173
|
+
noWhenBranchMatchedException();
|
|
1174
|
+
}
|
|
1175
|
+
}
|
|
1176
|
+
tmp$ret$9 = tmp_3;
|
|
1177
|
+
tmp1_mapTo.a(tmp$ret$9);
|
|
1178
|
+
}
|
|
1179
|
+
tmp$ret$10 = tmp1_mapTo;
|
|
1180
|
+
tmp$ret$11 = tmp$ret$10;
|
|
1181
|
+
tmp_2 = tmp$ret$11;
|
|
1182
|
+
}
|
|
1183
|
+
|
|
1184
|
+
var tmp4_elvis_lhs = tmp_2;
|
|
1185
|
+
tmp = plus(listOf(new SimpleSchema(name, tmp4_elvis_lhs == null ? emptyList() : tmp4_elvis_lhs)), fields);
|
|
1186
|
+
break;
|
|
1187
|
+
case 4:
|
|
1188
|
+
var tmp5_safe_receiver = _this__u8e3s4.l1e_1;
|
|
1189
|
+
var tmp_13;
|
|
1190
|
+
if (tmp5_safe_receiver == null) {
|
|
1191
|
+
tmp_13 = null;
|
|
1192
|
+
} else {
|
|
1193
|
+
var tmp$ret$13;
|
|
1194
|
+
// Inline function 'kotlin.let' call
|
|
1195
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
1196
|
+
var tmp$ret$12;
|
|
1197
|
+
// Inline function 'community.flock.wirespec.openapi.v2.flatten.<anonymous>' call
|
|
1198
|
+
var tmp0_subject_2 = tmp5_safe_receiver;
|
|
1199
|
+
var tmp_14;
|
|
1200
|
+
if (tmp0_subject_2 instanceof ReferenceObject) {
|
|
1201
|
+
tmp_14 = emptyList();
|
|
1202
|
+
} else {
|
|
1203
|
+
if (tmp0_subject_2 instanceof SchemaObject) {
|
|
1204
|
+
var tmp1_safe_receiver_0 = tmp5_safe_receiver.l1e_1;
|
|
1205
|
+
tmp_14 = tmp1_safe_receiver_0 == null ? null : flatten_0(tmp1_safe_receiver_0, Common_getInstance().q1s([name, 'array']), openApi);
|
|
1206
|
+
} else {
|
|
1207
|
+
noWhenBranchMatchedException();
|
|
1208
|
+
}
|
|
1209
|
+
}
|
|
1210
|
+
tmp$ret$12 = tmp_14;
|
|
1211
|
+
tmp$ret$13 = tmp$ret$12;
|
|
1212
|
+
tmp_13 = tmp$ret$13;
|
|
1213
|
+
}
|
|
1214
|
+
|
|
1215
|
+
var tmp6_elvis_lhs = tmp_13;
|
|
1216
|
+
tmp = tmp6_elvis_lhs == null ? emptyList() : tmp6_elvis_lhs;
|
|
1217
|
+
break;
|
|
1218
|
+
default:
|
|
1219
|
+
tmp = emptyList();
|
|
1220
|
+
break;
|
|
1221
|
+
}
|
|
1222
|
+
return tmp;
|
|
1223
|
+
}
|
|
1224
|
+
function SimpleProp(key, field) {
|
|
1225
|
+
this.v1s_1 = key;
|
|
1226
|
+
this.w1s_1 = field;
|
|
1227
|
+
}
|
|
1228
|
+
protoOf(SimpleProp).toString = function () {
|
|
1229
|
+
return 'SimpleProp(key=' + this.v1s_1 + ', field=' + this.w1s_1 + ')';
|
|
1230
|
+
};
|
|
1231
|
+
protoOf(SimpleProp).hashCode = function () {
|
|
1232
|
+
var result = getStringHashCode(this.v1s_1);
|
|
1233
|
+
result = imul(result, 31) + this.w1s_1.hashCode() | 0;
|
|
1234
|
+
return result;
|
|
1235
|
+
};
|
|
1236
|
+
protoOf(SimpleProp).equals = function (other) {
|
|
1237
|
+
if (this === other)
|
|
1238
|
+
return true;
|
|
1239
|
+
if (!(other instanceof SimpleProp))
|
|
1240
|
+
return false;
|
|
1241
|
+
var tmp0_other_with_cast = other instanceof SimpleProp ? other : THROW_CCE();
|
|
1242
|
+
if (!(this.v1s_1 === tmp0_other_with_cast.v1s_1))
|
|
1243
|
+
return false;
|
|
1244
|
+
if (!this.w1s_1.equals(tmp0_other_with_cast.w1s_1))
|
|
1245
|
+
return false;
|
|
1246
|
+
return true;
|
|
1247
|
+
};
|
|
1248
|
+
function resolveParameterObject(_this__u8e3s4, openApi) {
|
|
1249
|
+
var tmp0_safe_receiver = openApi.j1a_1;
|
|
1250
|
+
return tmp0_safe_receiver == null ? null : tmp0_safe_receiver.m2(getReference(_this__u8e3s4));
|
|
1251
|
+
}
|
|
1252
|
+
function resolve_0(_this__u8e3s4, openApi) {
|
|
1253
|
+
var tmp0_subject = _this__u8e3s4;
|
|
1254
|
+
var tmp;
|
|
1255
|
+
if (tmp0_subject instanceof ParameterObject) {
|
|
1256
|
+
tmp = _this__u8e3s4;
|
|
1257
|
+
} else {
|
|
1258
|
+
if (tmp0_subject instanceof ReferenceObject) {
|
|
1259
|
+
tmp = resolveParameterObject(_this__u8e3s4, openApi);
|
|
1260
|
+
} else {
|
|
1261
|
+
noWhenBranchMatchedException();
|
|
1262
|
+
}
|
|
1263
|
+
}
|
|
1264
|
+
return tmp;
|
|
1265
|
+
}
|
|
1266
|
+
function resolve_1(_this__u8e3s4, openApi) {
|
|
1267
|
+
var tmp0_subject = _this__u8e3s4;
|
|
1268
|
+
var tmp;
|
|
1269
|
+
if (tmp0_subject instanceof SchemaObject) {
|
|
1270
|
+
tmp = _this__u8e3s4;
|
|
1271
|
+
} else {
|
|
1272
|
+
if (tmp0_subject instanceof ReferenceObject) {
|
|
1273
|
+
var tmp1_safe_receiver = resolveSchemaObject(_this__u8e3s4, openApi);
|
|
1274
|
+
tmp = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.h3_1;
|
|
1275
|
+
} else {
|
|
1276
|
+
noWhenBranchMatchedException();
|
|
1277
|
+
}
|
|
1278
|
+
}
|
|
1279
|
+
return tmp;
|
|
1280
|
+
}
|
|
1281
|
+
function resolveSchemaObject(_this__u8e3s4, openApi) {
|
|
1282
|
+
var tmp0_safe_receiver = openApi.i1a_1;
|
|
1283
|
+
var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.m2(getReference(_this__u8e3s4));
|
|
1284
|
+
var tmp;
|
|
1285
|
+
if (tmp1_safe_receiver == null) {
|
|
1286
|
+
tmp = null;
|
|
1287
|
+
} else {
|
|
1288
|
+
var tmp$ret$1;
|
|
1289
|
+
// Inline function 'kotlin.let' call
|
|
1290
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
1291
|
+
var tmp$ret$0;
|
|
1292
|
+
// Inline function 'community.flock.wirespec.openapi.v2.resolveSchemaObject.<anonymous>' call
|
|
1293
|
+
tmp$ret$0 = to(_this__u8e3s4, tmp1_safe_receiver);
|
|
1294
|
+
tmp$ret$1 = tmp$ret$0;
|
|
1295
|
+
tmp = tmp$ret$1;
|
|
1296
|
+
}
|
|
1297
|
+
return tmp;
|
|
1298
|
+
}
|
|
1299
|
+
function getReference(_this__u8e3s4) {
|
|
1300
|
+
return split(_Ref___get_value__impl__kxavfe(_this__u8e3s4.s1e_1), ['/']).h(2);
|
|
1301
|
+
}
|
|
1302
|
+
function resolveResponseObject(_this__u8e3s4, openApi) {
|
|
1303
|
+
var tmp0_safe_receiver = openApi.k1a_1;
|
|
1304
|
+
var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.m2(getReference(_this__u8e3s4));
|
|
1305
|
+
var tmp;
|
|
1306
|
+
if (tmp1_safe_receiver == null) {
|
|
1307
|
+
tmp = null;
|
|
1308
|
+
} else {
|
|
1309
|
+
var tmp$ret$1;
|
|
1310
|
+
// Inline function 'kotlin.let' call
|
|
1311
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
1312
|
+
var tmp$ret$0;
|
|
1313
|
+
// Inline function 'community.flock.wirespec.openapi.v2.resolveResponseObject.<anonymous>' call
|
|
1314
|
+
tmp$ret$0 = to(_this__u8e3s4, tmp1_safe_receiver);
|
|
1315
|
+
tmp$ret$1 = tmp$ret$0;
|
|
1316
|
+
tmp = tmp$ret$1;
|
|
1317
|
+
}
|
|
1318
|
+
return tmp;
|
|
1319
|
+
}
|
|
1320
|
+
function flatten_0(_this__u8e3s4, name, openApi) {
|
|
1321
|
+
var tmp0_subject = _this__u8e3s4;
|
|
1322
|
+
var tmp;
|
|
1323
|
+
if (tmp0_subject instanceof SchemaObject) {
|
|
1324
|
+
tmp = flatten(_this__u8e3s4, name, openApi);
|
|
1325
|
+
} else {
|
|
1326
|
+
if (tmp0_subject instanceof ReferenceObject) {
|
|
1327
|
+
var tmp1_safe_receiver = resolveSchemaObject(_this__u8e3s4, openApi);
|
|
1328
|
+
var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.h3_1;
|
|
1329
|
+
var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : flatten(tmp2_safe_receiver, name, openApi);
|
|
1330
|
+
var tmp_0;
|
|
1331
|
+
if (tmp3_elvis_lhs == null) {
|
|
1332
|
+
throw IllegalStateException_init_$Create$('Reference not found');
|
|
1333
|
+
} else {
|
|
1334
|
+
tmp_0 = tmp3_elvis_lhs;
|
|
1335
|
+
}
|
|
1336
|
+
tmp = tmp_0;
|
|
1337
|
+
} else {
|
|
1338
|
+
noWhenBranchMatchedException();
|
|
1339
|
+
}
|
|
1340
|
+
}
|
|
1341
|
+
return tmp;
|
|
1342
|
+
}
|
|
1343
|
+
function OpenApiParser$parse$lambda_0(it) {
|
|
1344
|
+
var tmp0_subject = it;
|
|
1345
|
+
var tmp;
|
|
1346
|
+
if (tmp0_subject instanceof Literal) {
|
|
1347
|
+
tmp = Common_getInstance().q1s([it.pj_1]);
|
|
1348
|
+
} else {
|
|
1349
|
+
if (tmp0_subject instanceof Param) {
|
|
1350
|
+
tmp = Common_getInstance().q1s([it.si_1.dj_1]);
|
|
1351
|
+
} else {
|
|
1352
|
+
noWhenBranchMatchedException();
|
|
1353
|
+
}
|
|
1354
|
+
}
|
|
1355
|
+
return tmp;
|
|
1356
|
+
}
|
|
1357
|
+
function OpenApiParser_0() {
|
|
1358
|
+
OpenApiParser_instance_0 = this;
|
|
1359
|
+
}
|
|
1360
|
+
protoOf(OpenApiParser_0).r1s = function (json) {
|
|
1361
|
+
var tmp$ret$1;
|
|
1362
|
+
// Inline function 'kotlin.let' call
|
|
1363
|
+
var tmp0_let = Default_getInstance_0().x19(json);
|
|
1364
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
1365
|
+
var tmp$ret$0;
|
|
1366
|
+
// Inline function 'community.flock.wirespec.openapi.v3.OpenApiParser.parse.<anonymous>' call
|
|
1367
|
+
tmp$ret$0 = OpenApiParser_getInstance_0().x1s(tmp0_let);
|
|
1368
|
+
tmp$ret$1 = tmp$ret$0;
|
|
1369
|
+
return tmp$ret$1;
|
|
1370
|
+
};
|
|
1371
|
+
protoOf(OpenApiParser_0).x1s = function (openApi) {
|
|
1372
|
+
var tmp$ret$62;
|
|
1373
|
+
// Inline function 'kotlin.collections.flatMap' call
|
|
1374
|
+
var tmp1_flatMap = openApi.x1i_1;
|
|
1375
|
+
var tmp$ret$61;
|
|
1376
|
+
// Inline function 'kotlin.collections.flatMapTo' call
|
|
1377
|
+
var tmp0_flatMapTo = ArrayList_init_$Create$();
|
|
1378
|
+
var tmp$ret$0;
|
|
1379
|
+
// Inline function 'kotlin.collections.iterator' call
|
|
1380
|
+
tmp$ret$0 = tmp1_flatMap.u().c();
|
|
1381
|
+
var tmp0_iterator = tmp$ret$0;
|
|
1382
|
+
while (tmp0_iterator.d()) {
|
|
1383
|
+
var element = tmp0_iterator.e();
|
|
1384
|
+
var tmp$ret$60;
|
|
1385
|
+
// Inline function 'community.flock.wirespec.openapi.v3.OpenApiParser.parse.<anonymous>' call
|
|
1386
|
+
var tmp$ret$1;
|
|
1387
|
+
// Inline function 'kotlin.collections.component1' call
|
|
1388
|
+
tmp$ret$1 = element.v().f1j_1;
|
|
1389
|
+
var key = tmp$ret$1;
|
|
1390
|
+
var tmp$ret$2;
|
|
1391
|
+
// Inline function 'kotlin.collections.component2' call
|
|
1392
|
+
tmp$ret$2 = element.w();
|
|
1393
|
+
var path = tmp$ret$2;
|
|
1394
|
+
var tmp$ret$59;
|
|
1395
|
+
// Inline function 'kotlin.collections.map' call
|
|
1396
|
+
var tmp1_map = toOperationList_0(path);
|
|
1397
|
+
var tmp$ret$58;
|
|
1398
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
1399
|
+
var tmp0_mapTo = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp1_map, 10));
|
|
1400
|
+
var tmp0_iterator_0 = tmp1_map.c();
|
|
1401
|
+
while (tmp0_iterator_0.d()) {
|
|
1402
|
+
var item = tmp0_iterator_0.e();
|
|
1403
|
+
var tmp$ret$57;
|
|
1404
|
+
// Inline function 'community.flock.wirespec.openapi.v3.OpenApiParser.parse.<anonymous>.<anonymous>' call
|
|
1405
|
+
var method = item.i3();
|
|
1406
|
+
var operation = item.j3();
|
|
1407
|
+
var tmp = resolveParameters_2(path, openApi);
|
|
1408
|
+
var tmp0_safe_receiver = operation;
|
|
1409
|
+
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : resolveParameters_1(tmp0_safe_receiver, openApi);
|
|
1410
|
+
var parameters = plus(tmp, tmp1_elvis_lhs == null ? emptyList() : tmp1_elvis_lhs);
|
|
1411
|
+
var tmp$ret$14;
|
|
1412
|
+
// Inline function 'kotlin.collections.map' call
|
|
1413
|
+
var tmp1_map_0 = drop(split(_Path___get_value__impl__thmflc_0(key), ['/']), 1);
|
|
1414
|
+
var tmp$ret$13;
|
|
1415
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
1416
|
+
var tmp0_mapTo_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp1_map_0, 10));
|
|
1417
|
+
var tmp0_iterator_1 = tmp1_map_0.c();
|
|
1418
|
+
while (tmp0_iterator_1.d()) {
|
|
1419
|
+
var item_0 = tmp0_iterator_1.e();
|
|
1420
|
+
var tmp$ret$12;
|
|
1421
|
+
// Inline function 'community.flock.wirespec.openapi.v3.OpenApiParser.parse.<anonymous>.<anonymous>.<anonymous>' call
|
|
1422
|
+
var isParam = equals(new Char(charSequenceGet(item_0, 0)), new Char(_Char___init__impl__6a9atx(123))) ? equals(new Char(charSequenceGet(item_0, item_0.length - 1 | 0)), new Char(_Char___init__impl__6a9atx(125))) : false;
|
|
1423
|
+
var tmp_0;
|
|
1424
|
+
if (isParam) {
|
|
1425
|
+
var tmp$ret$4;
|
|
1426
|
+
// Inline function 'kotlin.text.substring' call
|
|
1427
|
+
var tmp0_substring = item_0.length - 1 | 0;
|
|
1428
|
+
var tmp$ret$3;
|
|
1429
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
1430
|
+
tmp$ret$3 = item_0;
|
|
1431
|
+
tmp$ret$4 = tmp$ret$3.substring(1, tmp0_substring);
|
|
1432
|
+
var param = tmp$ret$4;
|
|
1433
|
+
var tmp$ret$7;
|
|
1434
|
+
// Inline function 'kotlin.collections.find' call
|
|
1435
|
+
var tmp$ret$6;
|
|
1436
|
+
$l$block: {
|
|
1437
|
+
// Inline function 'kotlin.collections.firstOrNull' call
|
|
1438
|
+
var tmp0_iterator_2 = parameters.c();
|
|
1439
|
+
while (tmp0_iterator_2.d()) {
|
|
1440
|
+
var element_0 = tmp0_iterator_2.e();
|
|
1441
|
+
var tmp$ret$5;
|
|
1442
|
+
// Inline function 'community.flock.wirespec.openapi.v3.OpenApiParser.parse.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
|
|
1443
|
+
tmp$ret$5 = element_0.y1k_1 === param;
|
|
1444
|
+
if (tmp$ret$5) {
|
|
1445
|
+
tmp$ret$6 = element_0;
|
|
1446
|
+
break $l$block;
|
|
1447
|
+
}
|
|
1448
|
+
}
|
|
1449
|
+
tmp$ret$6 = null;
|
|
1450
|
+
}
|
|
1451
|
+
tmp$ret$7 = tmp$ret$6;
|
|
1452
|
+
var tmp0_safe_receiver_0 = tmp$ret$7;
|
|
1453
|
+
var tmp1_safe_receiver = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.u1k_1;
|
|
1454
|
+
var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : resolve_2(tmp1_safe_receiver, openApi);
|
|
1455
|
+
var tmp_1;
|
|
1456
|
+
if (tmp2_safe_receiver == null) {
|
|
1457
|
+
tmp_1 = null;
|
|
1458
|
+
} else {
|
|
1459
|
+
var tmp$ret$9;
|
|
1460
|
+
// Inline function 'kotlin.let' call
|
|
1461
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
1462
|
+
var tmp$ret$8;
|
|
1463
|
+
// Inline function 'community.flock.wirespec.openapi.v3.OpenApiParser.parse.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
|
|
1464
|
+
var tmp0_safe_receiver_1 = tmp2_safe_receiver.m1l_1;
|
|
1465
|
+
tmp$ret$8 = tmp0_safe_receiver_1 == null ? null : toPrimitive_0(tmp0_safe_receiver_1);
|
|
1466
|
+
tmp$ret$9 = tmp$ret$8;
|
|
1467
|
+
tmp_1 = tmp$ret$9;
|
|
1468
|
+
}
|
|
1469
|
+
var tmp3_safe_receiver = tmp_1;
|
|
1470
|
+
var tmp_2;
|
|
1471
|
+
if (tmp3_safe_receiver == null) {
|
|
1472
|
+
tmp_2 = null;
|
|
1473
|
+
} else {
|
|
1474
|
+
var tmp$ret$11;
|
|
1475
|
+
// Inline function 'kotlin.let' call
|
|
1476
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
1477
|
+
var tmp$ret$10;
|
|
1478
|
+
// Inline function 'community.flock.wirespec.openapi.v3.OpenApiParser.parse.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
|
|
1479
|
+
tmp$ret$10 = new Param(new Identifier(param), new Primitive(tmp3_safe_receiver, false));
|
|
1480
|
+
tmp$ret$11 = tmp$ret$10;
|
|
1481
|
+
tmp_2 = tmp$ret$11;
|
|
1482
|
+
}
|
|
1483
|
+
var tmp4_elvis_lhs = tmp_2;
|
|
1484
|
+
var tmp_3;
|
|
1485
|
+
if (tmp4_elvis_lhs == null) {
|
|
1486
|
+
var tmp1_error = ' Declared path parameter ' + param + ' needs to be defined as a path parameter in path or operation level';
|
|
1487
|
+
throw IllegalStateException_init_$Create$(toString_0(tmp1_error));
|
|
1488
|
+
} else {
|
|
1489
|
+
tmp_3 = tmp4_elvis_lhs;
|
|
1490
|
+
}
|
|
1491
|
+
tmp_0 = tmp_3;
|
|
1492
|
+
} else {
|
|
1493
|
+
tmp_0 = new Literal(item_0);
|
|
1494
|
+
}
|
|
1495
|
+
tmp$ret$12 = tmp_0;
|
|
1496
|
+
tmp0_mapTo_0.a(tmp$ret$12);
|
|
1497
|
+
}
|
|
1498
|
+
tmp$ret$13 = tmp0_mapTo_0;
|
|
1499
|
+
tmp$ret$14 = tmp$ret$13;
|
|
1500
|
+
var segments = tmp$ret$14;
|
|
1501
|
+
var tmp2_safe_receiver_0 = operation;
|
|
1502
|
+
var tmp3_safe_receiver_0 = tmp2_safe_receiver_0 == null ? null : tmp2_safe_receiver_0.c1k_1;
|
|
1503
|
+
var tmp_4;
|
|
1504
|
+
if (tmp3_safe_receiver_0 == null) {
|
|
1505
|
+
tmp_4 = null;
|
|
1506
|
+
} else {
|
|
1507
|
+
var tmp$ret$16;
|
|
1508
|
+
// Inline function 'kotlin.let' call
|
|
1509
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
1510
|
+
var tmp$ret$15;
|
|
1511
|
+
// Inline function 'community.flock.wirespec.openapi.v3.OpenApiParser.parse.<anonymous>.<anonymous>.<anonymous>' call
|
|
1512
|
+
tmp$ret$15 = Common_getInstance().q1s([tmp3_safe_receiver_0]);
|
|
1513
|
+
tmp$ret$16 = tmp$ret$15;
|
|
1514
|
+
tmp_4 = tmp$ret$16;
|
|
1515
|
+
}
|
|
1516
|
+
var tmp4_elvis_lhs_0 = tmp_4;
|
|
1517
|
+
var tmp_5;
|
|
1518
|
+
if (tmp4_elvis_lhs_0 == null) {
|
|
1519
|
+
var tmp$ret$18;
|
|
1520
|
+
// Inline function 'kotlin.let' call
|
|
1521
|
+
var tmp2_let = joinToString_0(segments, '', VOID, VOID, VOID, VOID, OpenApiParser$parse$lambda_0);
|
|
1522
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
1523
|
+
var tmp$ret$17;
|
|
1524
|
+
// Inline function 'community.flock.wirespec.openapi.v3.OpenApiParser.parse.<anonymous>.<anonymous>.<anonymous>' call
|
|
1525
|
+
tmp$ret$17 = tmp2_let + method.p4_1;
|
|
1526
|
+
tmp$ret$18 = tmp$ret$17;
|
|
1527
|
+
tmp_5 = tmp$ret$18;
|
|
1528
|
+
} else {
|
|
1529
|
+
tmp_5 = tmp4_elvis_lhs_0;
|
|
1530
|
+
}
|
|
1531
|
+
var name = tmp_5;
|
|
1532
|
+
var tmp$ret$24;
|
|
1533
|
+
// Inline function 'kotlin.collections.map' call
|
|
1534
|
+
var tmp$ret$21;
|
|
1535
|
+
// Inline function 'kotlin.collections.filter' call
|
|
1536
|
+
var tmp$ret$20;
|
|
1537
|
+
// Inline function 'kotlin.collections.filterTo' call
|
|
1538
|
+
var tmp3_filterTo = ArrayList_init_$Create$();
|
|
1539
|
+
var tmp0_iterator_3 = parameters.c();
|
|
1540
|
+
while (tmp0_iterator_3.d()) {
|
|
1541
|
+
var element_1 = tmp0_iterator_3.e();
|
|
1542
|
+
var tmp$ret$19;
|
|
1543
|
+
// Inline function 'community.flock.wirespec.openapi.v3.OpenApiParser.parse.<anonymous>.<anonymous>.<anonymous>' call
|
|
1544
|
+
tmp$ret$19 = element_1.z1k_1.equals(ParameterLocation_QUERY_getInstance_0());
|
|
1545
|
+
if (tmp$ret$19) {
|
|
1546
|
+
tmp3_filterTo.a(element_1);
|
|
1547
|
+
}
|
|
1548
|
+
}
|
|
1549
|
+
tmp$ret$20 = tmp3_filterTo;
|
|
1550
|
+
tmp$ret$21 = tmp$ret$20;
|
|
1551
|
+
var tmp5_map = tmp$ret$21;
|
|
1552
|
+
var tmp$ret$23;
|
|
1553
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
1554
|
+
var tmp4_mapTo = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp5_map, 10));
|
|
1555
|
+
var tmp0_iterator_4 = tmp5_map.c();
|
|
1556
|
+
while (tmp0_iterator_4.d()) {
|
|
1557
|
+
var item_1 = tmp0_iterator_4.e();
|
|
1558
|
+
var tmp$ret$22;
|
|
1559
|
+
// Inline function 'community.flock.wirespec.openapi.v3.OpenApiParser.parse.<anonymous>.<anonymous>.<anonymous>' call
|
|
1560
|
+
tmp$ret$22 = toField_0(item_1);
|
|
1561
|
+
tmp4_mapTo.a(tmp$ret$22);
|
|
1562
|
+
}
|
|
1563
|
+
tmp$ret$23 = tmp4_mapTo;
|
|
1564
|
+
tmp$ret$24 = tmp$ret$23;
|
|
1565
|
+
var query = tmp$ret$24;
|
|
1566
|
+
var tmp$ret$30;
|
|
1567
|
+
// Inline function 'kotlin.collections.map' call
|
|
1568
|
+
var tmp$ret$27;
|
|
1569
|
+
// Inline function 'kotlin.collections.filter' call
|
|
1570
|
+
var tmp$ret$26;
|
|
1571
|
+
// Inline function 'kotlin.collections.filterTo' call
|
|
1572
|
+
var tmp6_filterTo = ArrayList_init_$Create$();
|
|
1573
|
+
var tmp0_iterator_5 = parameters.c();
|
|
1574
|
+
while (tmp0_iterator_5.d()) {
|
|
1575
|
+
var element_2 = tmp0_iterator_5.e();
|
|
1576
|
+
var tmp$ret$25;
|
|
1577
|
+
// Inline function 'community.flock.wirespec.openapi.v3.OpenApiParser.parse.<anonymous>.<anonymous>.<anonymous>' call
|
|
1578
|
+
tmp$ret$25 = element_2.z1k_1.equals(ParameterLocation_HEADER_getInstance_0());
|
|
1579
|
+
if (tmp$ret$25) {
|
|
1580
|
+
tmp6_filterTo.a(element_2);
|
|
1581
|
+
}
|
|
1582
|
+
}
|
|
1583
|
+
tmp$ret$26 = tmp6_filterTo;
|
|
1584
|
+
tmp$ret$27 = tmp$ret$26;
|
|
1585
|
+
var tmp8_map = tmp$ret$27;
|
|
1586
|
+
var tmp$ret$29;
|
|
1587
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
1588
|
+
var tmp7_mapTo = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp8_map, 10));
|
|
1589
|
+
var tmp0_iterator_6 = tmp8_map.c();
|
|
1590
|
+
while (tmp0_iterator_6.d()) {
|
|
1591
|
+
var item_2 = tmp0_iterator_6.e();
|
|
1592
|
+
var tmp$ret$28;
|
|
1593
|
+
// Inline function 'community.flock.wirespec.openapi.v3.OpenApiParser.parse.<anonymous>.<anonymous>.<anonymous>' call
|
|
1594
|
+
tmp$ret$28 = toField_0(item_2);
|
|
1595
|
+
tmp7_mapTo.a(tmp$ret$28);
|
|
1596
|
+
}
|
|
1597
|
+
tmp$ret$29 = tmp7_mapTo;
|
|
1598
|
+
tmp$ret$30 = tmp$ret$29;
|
|
1599
|
+
var headers = tmp$ret$30;
|
|
1600
|
+
var tmp$ret$36;
|
|
1601
|
+
// Inline function 'kotlin.collections.map' call
|
|
1602
|
+
var tmp$ret$33;
|
|
1603
|
+
// Inline function 'kotlin.collections.filter' call
|
|
1604
|
+
var tmp$ret$32;
|
|
1605
|
+
// Inline function 'kotlin.collections.filterTo' call
|
|
1606
|
+
var tmp9_filterTo = ArrayList_init_$Create$();
|
|
1607
|
+
var tmp0_iterator_7 = parameters.c();
|
|
1608
|
+
while (tmp0_iterator_7.d()) {
|
|
1609
|
+
var element_3 = tmp0_iterator_7.e();
|
|
1610
|
+
var tmp$ret$31;
|
|
1611
|
+
// Inline function 'community.flock.wirespec.openapi.v3.OpenApiParser.parse.<anonymous>.<anonymous>.<anonymous>' call
|
|
1612
|
+
tmp$ret$31 = element_3.z1k_1.equals(ParameterLocation_COOKIE_getInstance());
|
|
1613
|
+
if (tmp$ret$31) {
|
|
1614
|
+
tmp9_filterTo.a(element_3);
|
|
1615
|
+
}
|
|
1616
|
+
}
|
|
1617
|
+
tmp$ret$32 = tmp9_filterTo;
|
|
1618
|
+
tmp$ret$33 = tmp$ret$32;
|
|
1619
|
+
var tmp11_map = tmp$ret$33;
|
|
1620
|
+
var tmp$ret$35;
|
|
1621
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
1622
|
+
var tmp10_mapTo = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp11_map, 10));
|
|
1623
|
+
var tmp0_iterator_8 = tmp11_map.c();
|
|
1624
|
+
while (tmp0_iterator_8.d()) {
|
|
1625
|
+
var item_3 = tmp0_iterator_8.e();
|
|
1626
|
+
var tmp$ret$34;
|
|
1627
|
+
// Inline function 'community.flock.wirespec.openapi.v3.OpenApiParser.parse.<anonymous>.<anonymous>.<anonymous>' call
|
|
1628
|
+
tmp$ret$34 = toField_0(item_3);
|
|
1629
|
+
tmp10_mapTo.a(tmp$ret$34);
|
|
1630
|
+
}
|
|
1631
|
+
tmp$ret$35 = tmp10_mapTo;
|
|
1632
|
+
tmp$ret$36 = tmp$ret$35;
|
|
1633
|
+
var cookies = tmp$ret$36;
|
|
1634
|
+
var tmp5_safe_receiver = operation;
|
|
1635
|
+
var tmp6_safe_receiver = tmp5_safe_receiver == null ? null : tmp5_safe_receiver.e1k_1;
|
|
1636
|
+
var tmp7_safe_receiver = tmp6_safe_receiver == null ? null : resolve_3(tmp6_safe_receiver, openApi);
|
|
1637
|
+
var tmp_6;
|
|
1638
|
+
if (tmp7_safe_receiver == null) {
|
|
1639
|
+
tmp_6 = null;
|
|
1640
|
+
} else {
|
|
1641
|
+
var tmp$ret$44;
|
|
1642
|
+
// Inline function 'kotlin.let' call
|
|
1643
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
1644
|
+
var tmp$ret$43;
|
|
1645
|
+
// Inline function 'community.flock.wirespec.openapi.v3.OpenApiParser.parse.<anonymous>.<anonymous>.<anonymous>' call
|
|
1646
|
+
var tmp0_safe_receiver_2 = tmp7_safe_receiver.r1m_1;
|
|
1647
|
+
var tmp_7;
|
|
1648
|
+
if (tmp0_safe_receiver_2 == null) {
|
|
1649
|
+
tmp_7 = null;
|
|
1650
|
+
} else {
|
|
1651
|
+
var tmp$ret$42;
|
|
1652
|
+
// Inline function 'kotlin.collections.map' call
|
|
1653
|
+
var tmp$ret$41;
|
|
1654
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
1655
|
+
var tmp0_mapTo_1 = ArrayList_init_$Create$_0(tmp0_safe_receiver_2.f());
|
|
1656
|
+
var tmp$ret$37;
|
|
1657
|
+
// Inline function 'kotlin.collections.iterator' call
|
|
1658
|
+
tmp$ret$37 = tmp0_safe_receiver_2.u().c();
|
|
1659
|
+
var tmp0_iterator_9 = tmp$ret$37;
|
|
1660
|
+
while (tmp0_iterator_9.d()) {
|
|
1661
|
+
var item_4 = tmp0_iterator_9.e();
|
|
1662
|
+
var tmp$ret$40;
|
|
1663
|
+
// Inline function 'community.flock.wirespec.openapi.v3.OpenApiParser.parse.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
|
|
1664
|
+
var tmp$ret$38;
|
|
1665
|
+
// Inline function 'kotlin.collections.component1' call
|
|
1666
|
+
tmp$ret$38 = item_4.v().v1m_1;
|
|
1667
|
+
var mediaType = tmp$ret$38;
|
|
1668
|
+
var tmp$ret$39;
|
|
1669
|
+
// Inline function 'kotlin.collections.component2' call
|
|
1670
|
+
tmp$ret$39 = item_4.w();
|
|
1671
|
+
var mediaObject = tmp$ret$39;
|
|
1672
|
+
var tmp_8 = _MediaType___get_value__impl__wy58mp(mediaType);
|
|
1673
|
+
var tmp0_safe_receiver_3 = mediaObject.y1m_1;
|
|
1674
|
+
var tmp1_elvis_lhs_0 = tmp0_safe_receiver_3 == null ? null : toReference_0(tmp0_safe_receiver_3, openApi);
|
|
1675
|
+
var tmp_9;
|
|
1676
|
+
if (tmp1_elvis_lhs_0 == null) {
|
|
1677
|
+
throw new NotImplementedError();
|
|
1678
|
+
} else {
|
|
1679
|
+
tmp_9 = tmp1_elvis_lhs_0;
|
|
1680
|
+
}
|
|
1681
|
+
var tmp_10 = tmp_9;
|
|
1682
|
+
var tmp2_elvis_lhs = tmp7_safe_receiver.s1m_1;
|
|
1683
|
+
tmp$ret$40 = new Request(new Content(tmp_8, tmp_10, tmp2_elvis_lhs == null ? false : tmp2_elvis_lhs));
|
|
1684
|
+
tmp0_mapTo_1.a(tmp$ret$40);
|
|
1685
|
+
}
|
|
1686
|
+
tmp$ret$41 = tmp0_mapTo_1;
|
|
1687
|
+
tmp$ret$42 = tmp$ret$41;
|
|
1688
|
+
tmp_7 = tmp$ret$42;
|
|
1689
|
+
}
|
|
1690
|
+
tmp$ret$43 = tmp_7;
|
|
1691
|
+
tmp$ret$44 = tmp$ret$43;
|
|
1692
|
+
tmp_6 = tmp$ret$44;
|
|
1693
|
+
}
|
|
1694
|
+
var tmp8_elvis_lhs = tmp_6;
|
|
1695
|
+
var requests = tmp8_elvis_lhs == null ? listOf(new Request(null)) : tmp8_elvis_lhs;
|
|
1696
|
+
var tmp9_safe_receiver = operation;
|
|
1697
|
+
var tmp10_safe_receiver = tmp9_safe_receiver == null ? null : tmp9_safe_receiver.f1k_1;
|
|
1698
|
+
var tmp_11;
|
|
1699
|
+
if (tmp10_safe_receiver == null) {
|
|
1700
|
+
tmp_11 = null;
|
|
1701
|
+
} else {
|
|
1702
|
+
var tmp$ret$56;
|
|
1703
|
+
// Inline function 'kotlin.collections.flatMap' call
|
|
1704
|
+
var tmp$ret$55;
|
|
1705
|
+
// Inline function 'kotlin.collections.flatMapTo' call
|
|
1706
|
+
var tmp12_flatMapTo = ArrayList_init_$Create$();
|
|
1707
|
+
var tmp$ret$45;
|
|
1708
|
+
// Inline function 'kotlin.collections.iterator' call
|
|
1709
|
+
tmp$ret$45 = tmp10_safe_receiver.u().c();
|
|
1710
|
+
var tmp0_iterator_10 = tmp$ret$45;
|
|
1711
|
+
while (tmp0_iterator_10.d()) {
|
|
1712
|
+
var element_4 = tmp0_iterator_10.e();
|
|
1713
|
+
var tmp$ret$54;
|
|
1714
|
+
// Inline function 'community.flock.wirespec.openapi.v3.OpenApiParser.parse.<anonymous>.<anonymous>.<anonymous>' call
|
|
1715
|
+
var tmp$ret$46;
|
|
1716
|
+
// Inline function 'kotlin.collections.component1' call
|
|
1717
|
+
tmp$ret$46 = element_4.v().e1n_1;
|
|
1718
|
+
var status = tmp$ret$46;
|
|
1719
|
+
var tmp$ret$47;
|
|
1720
|
+
// Inline function 'kotlin.collections.component2' call
|
|
1721
|
+
tmp$ret$47 = element_4.w();
|
|
1722
|
+
var res = tmp$ret$47;
|
|
1723
|
+
var tmp0_safe_receiver_4 = resolve_4(res, openApi);
|
|
1724
|
+
var tmp1_safe_receiver_0 = tmp0_safe_receiver_4 == null ? null : tmp0_safe_receiver_4.j1n_1;
|
|
1725
|
+
var tmp_12;
|
|
1726
|
+
if (tmp1_safe_receiver_0 == null) {
|
|
1727
|
+
tmp_12 = null;
|
|
1728
|
+
} else {
|
|
1729
|
+
var tmp$ret$53;
|
|
1730
|
+
// Inline function 'kotlin.collections.map' call
|
|
1731
|
+
var tmp$ret$52;
|
|
1732
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
1733
|
+
var tmp0_mapTo_2 = ArrayList_init_$Create$_0(tmp1_safe_receiver_0.f());
|
|
1734
|
+
var tmp$ret$48;
|
|
1735
|
+
// Inline function 'kotlin.collections.iterator' call
|
|
1736
|
+
tmp$ret$48 = tmp1_safe_receiver_0.u().c();
|
|
1737
|
+
var tmp0_iterator_11 = tmp$ret$48;
|
|
1738
|
+
while (tmp0_iterator_11.d()) {
|
|
1739
|
+
var item_5 = tmp0_iterator_11.e();
|
|
1740
|
+
var tmp$ret$51;
|
|
1741
|
+
// Inline function 'community.flock.wirespec.openapi.v3.OpenApiParser.parse.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
|
|
1742
|
+
var tmp$ret$49;
|
|
1743
|
+
// Inline function 'kotlin.collections.component1' call
|
|
1744
|
+
tmp$ret$49 = item_5.v().v1m_1;
|
|
1745
|
+
var contentType = tmp$ret$49;
|
|
1746
|
+
var tmp$ret$50;
|
|
1747
|
+
// Inline function 'kotlin.collections.component2' call
|
|
1748
|
+
tmp$ret$50 = item_5.w();
|
|
1749
|
+
var media = tmp$ret$50;
|
|
1750
|
+
var tmp_13 = _StatusCode___get_value__impl__we50mu_0(status);
|
|
1751
|
+
var tmp_14 = _MediaType___get_value__impl__wy58mp(contentType);
|
|
1752
|
+
var tmp0_safe_receiver_5 = media.y1m_1;
|
|
1753
|
+
var tmp1_elvis_lhs_1 = tmp0_safe_receiver_5 == null ? null : toReference_0(tmp0_safe_receiver_5, openApi);
|
|
1754
|
+
var tmp_15;
|
|
1755
|
+
if (tmp1_elvis_lhs_1 == null) {
|
|
1756
|
+
throw new NotImplementedError();
|
|
1757
|
+
} else {
|
|
1758
|
+
tmp_15 = tmp1_elvis_lhs_1;
|
|
1759
|
+
}
|
|
1760
|
+
var tmp_16 = tmp_15;
|
|
1761
|
+
var tmp2_safe_receiver_1 = media.y1m_1;
|
|
1762
|
+
var tmp3_safe_receiver_1 = tmp2_safe_receiver_1 == null ? null : resolve_2(tmp2_safe_receiver_1, openApi);
|
|
1763
|
+
var tmp4_elvis_lhs_1 = tmp3_safe_receiver_1 == null ? null : tmp3_safe_receiver_1.d1l_1;
|
|
1764
|
+
tmp$ret$51 = new Response(tmp_13, new Content(tmp_14, tmp_16, tmp4_elvis_lhs_1 == null ? false : tmp4_elvis_lhs_1));
|
|
1765
|
+
tmp0_mapTo_2.a(tmp$ret$51);
|
|
1766
|
+
}
|
|
1767
|
+
tmp$ret$52 = tmp0_mapTo_2;
|
|
1768
|
+
tmp$ret$53 = tmp$ret$52;
|
|
1769
|
+
tmp_12 = tmp$ret$53;
|
|
1770
|
+
}
|
|
1771
|
+
var tmp2_elvis_lhs_0 = tmp_12;
|
|
1772
|
+
tmp$ret$54 = tmp2_elvis_lhs_0 == null ? listOf(new Response(_StatusCode___get_value__impl__we50mu_0(status), null)) : tmp2_elvis_lhs_0;
|
|
1773
|
+
var list = tmp$ret$54;
|
|
1774
|
+
addAll(tmp12_flatMapTo, list);
|
|
1775
|
+
}
|
|
1776
|
+
tmp$ret$55 = tmp12_flatMapTo;
|
|
1777
|
+
tmp$ret$56 = tmp$ret$55;
|
|
1778
|
+
tmp_11 = tmp$ret$56;
|
|
1779
|
+
}
|
|
1780
|
+
var tmp11_elvis_lhs = tmp_11;
|
|
1781
|
+
var responses = tmp11_elvis_lhs == null ? emptyList() : tmp11_elvis_lhs;
|
|
1782
|
+
tmp$ret$57 = new Endpoint(name, method, segments, query, headers, cookies, requests, responses);
|
|
1783
|
+
tmp0_mapTo.a(tmp$ret$57);
|
|
1784
|
+
}
|
|
1785
|
+
tmp$ret$58 = tmp0_mapTo;
|
|
1786
|
+
tmp$ret$59 = tmp$ret$58;
|
|
1787
|
+
tmp$ret$60 = tmp$ret$59;
|
|
1788
|
+
var list_0 = tmp$ret$60;
|
|
1789
|
+
addAll(tmp0_flatMapTo, list_0);
|
|
1790
|
+
}
|
|
1791
|
+
tmp$ret$61 = tmp0_flatMapTo;
|
|
1792
|
+
tmp$ret$62 = tmp$ret$61;
|
|
1793
|
+
var endpointAst = tmp$ret$62;
|
|
1794
|
+
var tmp0_safe_receiver_6 = openApi.y1i_1;
|
|
1795
|
+
var tmp1_safe_receiver_1 = tmp0_safe_receiver_6 == null ? null : tmp0_safe_receiver_6.o1n_1;
|
|
1796
|
+
var tmp_17;
|
|
1797
|
+
if (tmp1_safe_receiver_1 == null) {
|
|
1798
|
+
tmp_17 = null;
|
|
1799
|
+
} else {
|
|
1800
|
+
var tmp$ret$66;
|
|
1801
|
+
// Inline function 'kotlin.collections.flatMap' call
|
|
1802
|
+
var tmp$ret$65;
|
|
1803
|
+
// Inline function 'kotlin.collections.flatMapTo' call
|
|
1804
|
+
var tmp2_flatMapTo = ArrayList_init_$Create$();
|
|
1805
|
+
var tmp$ret$63;
|
|
1806
|
+
// Inline function 'kotlin.collections.iterator' call
|
|
1807
|
+
tmp$ret$63 = tmp1_safe_receiver_1.u().c();
|
|
1808
|
+
var tmp0_iterator_12 = tmp$ret$63;
|
|
1809
|
+
while (tmp0_iterator_12.d()) {
|
|
1810
|
+
var element_5 = tmp0_iterator_12.e();
|
|
1811
|
+
var tmp$ret$64;
|
|
1812
|
+
// Inline function 'community.flock.wirespec.openapi.v3.OpenApiParser.parse.<anonymous>' call
|
|
1813
|
+
tmp$ret$64 = flatten_1(element_5.w(), Common_getInstance().q1s([element_5.v()]), openApi);
|
|
1814
|
+
var list_1 = tmp$ret$64;
|
|
1815
|
+
addAll(tmp2_flatMapTo, list_1);
|
|
1816
|
+
}
|
|
1817
|
+
tmp$ret$65 = tmp2_flatMapTo;
|
|
1818
|
+
tmp$ret$66 = tmp$ret$65;
|
|
1819
|
+
tmp_17 = tmp$ret$66;
|
|
1820
|
+
}
|
|
1821
|
+
var tmp2_safe_receiver_2 = tmp_17;
|
|
1822
|
+
var tmp_18;
|
|
1823
|
+
if (tmp2_safe_receiver_2 == null) {
|
|
1824
|
+
tmp_18 = null;
|
|
1825
|
+
} else {
|
|
1826
|
+
var tmp$ret$72;
|
|
1827
|
+
// Inline function 'kotlin.collections.map' call
|
|
1828
|
+
var tmp$ret$71;
|
|
1829
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
1830
|
+
var tmp3_mapTo = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp2_safe_receiver_2, 10));
|
|
1831
|
+
var tmp0_iterator_13 = tmp2_safe_receiver_2.c();
|
|
1832
|
+
while (tmp0_iterator_13.d()) {
|
|
1833
|
+
var item_6 = tmp0_iterator_13.e();
|
|
1834
|
+
var tmp$ret$70;
|
|
1835
|
+
// Inline function 'community.flock.wirespec.openapi.v3.OpenApiParser.parse.<anonymous>' call
|
|
1836
|
+
var tmp$ret$69;
|
|
1837
|
+
// Inline function 'kotlin.collections.map' call
|
|
1838
|
+
var tmp1_map_1 = item_6.z1s_1;
|
|
1839
|
+
var tmp$ret$68;
|
|
1840
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
1841
|
+
var tmp0_mapTo_3 = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp1_map_1, 10));
|
|
1842
|
+
var tmp0_iterator_14 = tmp1_map_1.c();
|
|
1843
|
+
while (tmp0_iterator_14.d()) {
|
|
1844
|
+
var item_7 = tmp0_iterator_14.e();
|
|
1845
|
+
var tmp$ret$67;
|
|
1846
|
+
// Inline function 'community.flock.wirespec.openapi.v3.OpenApiParser.parse.<anonymous>.<anonymous>' call
|
|
1847
|
+
tmp$ret$67 = item_7.b1t_1;
|
|
1848
|
+
tmp0_mapTo_3.a(tmp$ret$67);
|
|
1849
|
+
}
|
|
1850
|
+
tmp$ret$68 = tmp0_mapTo_3;
|
|
1851
|
+
tmp$ret$69 = tmp$ret$68;
|
|
1852
|
+
tmp$ret$70 = new Type(item_6.y1s_1, new Shape(tmp$ret$69));
|
|
1853
|
+
tmp3_mapTo.a(tmp$ret$70);
|
|
1854
|
+
}
|
|
1855
|
+
tmp$ret$71 = tmp3_mapTo;
|
|
1856
|
+
tmp$ret$72 = tmp$ret$71;
|
|
1857
|
+
tmp_18 = tmp$ret$72;
|
|
1858
|
+
}
|
|
1859
|
+
var tmp3_elvis_lhs = tmp_18;
|
|
1860
|
+
var componentsAst = tmp3_elvis_lhs == null ? emptyList() : tmp3_elvis_lhs;
|
|
1861
|
+
return plus(endpointAst, componentsAst);
|
|
1862
|
+
};
|
|
1863
|
+
var OpenApiParser_instance_0;
|
|
1864
|
+
function OpenApiParser_getInstance_0() {
|
|
1865
|
+
if (OpenApiParser_instance_0 == null)
|
|
1866
|
+
new OpenApiParser_0();
|
|
1867
|
+
return OpenApiParser_instance_0;
|
|
1868
|
+
}
|
|
1869
|
+
function resolveParameters_1(_this__u8e3s4, openApi) {
|
|
1870
|
+
var tmp0_safe_receiver = _this__u8e3s4.d1k_1;
|
|
1871
|
+
var tmp;
|
|
1872
|
+
if (tmp0_safe_receiver == null) {
|
|
1873
|
+
tmp = null;
|
|
1874
|
+
} else {
|
|
1875
|
+
var tmp$ret$3;
|
|
1876
|
+
// Inline function 'kotlin.collections.mapNotNull' call
|
|
1877
|
+
var tmp$ret$2;
|
|
1878
|
+
// Inline function 'kotlin.collections.mapNotNullTo' call
|
|
1879
|
+
var tmp0_mapNotNullTo = ArrayList_init_$Create$();
|
|
1880
|
+
// Inline function 'kotlin.collections.forEach' call
|
|
1881
|
+
var tmp0_iterator = tmp0_safe_receiver.c();
|
|
1882
|
+
while (tmp0_iterator.d()) {
|
|
1883
|
+
var element = tmp0_iterator.e();
|
|
1884
|
+
// Inline function 'kotlin.collections.mapNotNullTo.<anonymous>' call
|
|
1885
|
+
var tmp$ret$0;
|
|
1886
|
+
// Inline function 'community.flock.wirespec.openapi.v3.resolveParameters.<anonymous>' call
|
|
1887
|
+
var tmp0_subject = element;
|
|
1888
|
+
var tmp_0;
|
|
1889
|
+
if (tmp0_subject instanceof ParameterObject_0) {
|
|
1890
|
+
tmp_0 = element;
|
|
1891
|
+
} else {
|
|
1892
|
+
if (tmp0_subject instanceof ReferenceObject_0) {
|
|
1893
|
+
tmp_0 = resolveParameterObject_0(element, openApi);
|
|
1894
|
+
} else {
|
|
1895
|
+
noWhenBranchMatchedException();
|
|
1896
|
+
}
|
|
1897
|
+
}
|
|
1898
|
+
tmp$ret$0 = tmp_0;
|
|
1899
|
+
var tmp0_safe_receiver_0 = tmp$ret$0;
|
|
1900
|
+
if (tmp0_safe_receiver_0 == null)
|
|
1901
|
+
null;
|
|
1902
|
+
else {
|
|
1903
|
+
var tmp$ret$1;
|
|
1904
|
+
// Inline function 'kotlin.let' call
|
|
1905
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
1906
|
+
tmp0_mapNotNullTo.a(tmp0_safe_receiver_0);
|
|
1907
|
+
tmp$ret$1 = Unit_getInstance();
|
|
1908
|
+
}
|
|
1909
|
+
}
|
|
1910
|
+
tmp$ret$2 = tmp0_mapNotNullTo;
|
|
1911
|
+
tmp$ret$3 = tmp$ret$2;
|
|
1912
|
+
tmp = tmp$ret$3;
|
|
1913
|
+
}
|
|
1914
|
+
var tmp1_elvis_lhs = tmp;
|
|
1915
|
+
return tmp1_elvis_lhs == null ? emptyList() : tmp1_elvis_lhs;
|
|
1916
|
+
}
|
|
1917
|
+
function resolveParameters_2(_this__u8e3s4, openApi) {
|
|
1918
|
+
var tmp0_safe_receiver = _this__u8e3s4.u1j_1;
|
|
1919
|
+
var tmp;
|
|
1920
|
+
if (tmp0_safe_receiver == null) {
|
|
1921
|
+
tmp = null;
|
|
1922
|
+
} else {
|
|
1923
|
+
var tmp$ret$3;
|
|
1924
|
+
// Inline function 'kotlin.collections.mapNotNull' call
|
|
1925
|
+
var tmp$ret$2;
|
|
1926
|
+
// Inline function 'kotlin.collections.mapNotNullTo' call
|
|
1927
|
+
var tmp0_mapNotNullTo = ArrayList_init_$Create$();
|
|
1928
|
+
// Inline function 'kotlin.collections.forEach' call
|
|
1929
|
+
var tmp0_iterator = tmp0_safe_receiver.c();
|
|
1930
|
+
while (tmp0_iterator.d()) {
|
|
1931
|
+
var element = tmp0_iterator.e();
|
|
1932
|
+
// Inline function 'kotlin.collections.mapNotNullTo.<anonymous>' call
|
|
1933
|
+
var tmp$ret$0;
|
|
1934
|
+
// Inline function 'community.flock.wirespec.openapi.v3.resolveParameters.<anonymous>' call
|
|
1935
|
+
var tmp0_subject = element;
|
|
1936
|
+
var tmp_0;
|
|
1937
|
+
if (tmp0_subject instanceof ParameterObject_0) {
|
|
1938
|
+
tmp_0 = element;
|
|
1939
|
+
} else {
|
|
1940
|
+
if (tmp0_subject instanceof ReferenceObject_0) {
|
|
1941
|
+
tmp_0 = resolveParameterObject_0(element, openApi);
|
|
1942
|
+
} else {
|
|
1943
|
+
noWhenBranchMatchedException();
|
|
1944
|
+
}
|
|
1945
|
+
}
|
|
1946
|
+
tmp$ret$0 = tmp_0;
|
|
1947
|
+
var tmp0_safe_receiver_0 = tmp$ret$0;
|
|
1948
|
+
if (tmp0_safe_receiver_0 == null)
|
|
1949
|
+
null;
|
|
1950
|
+
else {
|
|
1951
|
+
var tmp$ret$1;
|
|
1952
|
+
// Inline function 'kotlin.let' call
|
|
1953
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
1954
|
+
tmp0_mapNotNullTo.a(tmp0_safe_receiver_0);
|
|
1955
|
+
tmp$ret$1 = Unit_getInstance();
|
|
1956
|
+
}
|
|
1957
|
+
}
|
|
1958
|
+
tmp$ret$2 = tmp0_mapNotNullTo;
|
|
1959
|
+
tmp$ret$3 = tmp$ret$2;
|
|
1960
|
+
tmp = tmp$ret$3;
|
|
1961
|
+
}
|
|
1962
|
+
var tmp1_elvis_lhs = tmp;
|
|
1963
|
+
return tmp1_elvis_lhs == null ? emptyList() : tmp1_elvis_lhs;
|
|
1964
|
+
}
|
|
1965
|
+
function resolve_2(_this__u8e3s4, openApi) {
|
|
1966
|
+
var tmp0_subject = _this__u8e3s4;
|
|
1967
|
+
var tmp;
|
|
1968
|
+
if (tmp0_subject instanceof SchemaObject_0) {
|
|
1969
|
+
tmp = _this__u8e3s4;
|
|
1970
|
+
} else {
|
|
1971
|
+
if (tmp0_subject instanceof ReferenceObject_0) {
|
|
1972
|
+
var tmp1_safe_receiver = resolveSchemaObject_0(_this__u8e3s4, openApi);
|
|
1973
|
+
tmp = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.h3_1;
|
|
1974
|
+
} else {
|
|
1975
|
+
noWhenBranchMatchedException();
|
|
1976
|
+
}
|
|
1977
|
+
}
|
|
1978
|
+
return tmp;
|
|
1979
|
+
}
|
|
1980
|
+
function toPrimitive_0(_this__u8e3s4) {
|
|
1981
|
+
var tmp0_subject = _this__u8e3s4;
|
|
1982
|
+
var tmp0 = tmp0_subject.q4_1;
|
|
1983
|
+
var tmp;
|
|
1984
|
+
switch (tmp0) {
|
|
1985
|
+
case 0:
|
|
1986
|
+
tmp = Type_String_getInstance();
|
|
1987
|
+
break;
|
|
1988
|
+
case 2:
|
|
1989
|
+
tmp = Type_Integer_getInstance();
|
|
1990
|
+
break;
|
|
1991
|
+
case 1:
|
|
1992
|
+
tmp = Type_Integer_getInstance();
|
|
1993
|
+
break;
|
|
1994
|
+
case 3:
|
|
1995
|
+
tmp = Type_Boolean_getInstance();
|
|
1996
|
+
break;
|
|
1997
|
+
default:
|
|
1998
|
+
throw IllegalStateException_init_$Create$('Type is not a primitive');
|
|
1999
|
+
}
|
|
2000
|
+
return tmp;
|
|
2001
|
+
}
|
|
2002
|
+
function toField_0(_this__u8e3s4) {
|
|
2003
|
+
var tmp$ret$1;
|
|
2004
|
+
// Inline function 'kotlin.let' call
|
|
2005
|
+
var tmp0_subject = _this__u8e3s4.u1k_1;
|
|
2006
|
+
var tmp;
|
|
2007
|
+
if (tmp0_subject instanceof ReferenceObject_0) {
|
|
2008
|
+
var tmp_0 = _this__u8e3s4.u1k_1;
|
|
2009
|
+
tmp = new Custom(getReference_0(tmp_0 instanceof ReferenceObject_0 ? tmp_0 : THROW_CCE()), false);
|
|
2010
|
+
} else {
|
|
2011
|
+
if (tmp0_subject instanceof SchemaObject_0) {
|
|
2012
|
+
var tmp_1 = _this__u8e3s4.u1k_1;
|
|
2013
|
+
var type = (tmp_1 instanceof SchemaObject_0 ? tmp_1 : THROW_CCE()).m1l_1;
|
|
2014
|
+
var tmp0 = type == null ? -1 : type.q4_1;
|
|
2015
|
+
var tmp_2;
|
|
2016
|
+
switch (tmp0) {
|
|
2017
|
+
case 0:
|
|
2018
|
+
case 2:
|
|
2019
|
+
case 1:
|
|
2020
|
+
case 3:
|
|
2021
|
+
tmp_2 = new Primitive(toPrimitive_0(type), false);
|
|
2022
|
+
break;
|
|
2023
|
+
case 4:
|
|
2024
|
+
throw new NotImplementedError();
|
|
2025
|
+
case 5:
|
|
2026
|
+
throw new NotImplementedError();
|
|
2027
|
+
case -1:
|
|
2028
|
+
throw new NotImplementedError();
|
|
2029
|
+
default:
|
|
2030
|
+
noWhenBranchMatchedException();
|
|
2031
|
+
break;
|
|
2032
|
+
}
|
|
2033
|
+
tmp = tmp_2;
|
|
2034
|
+
} else {
|
|
2035
|
+
if (tmp0_subject == null) {
|
|
2036
|
+
throw new NotImplementedError();
|
|
2037
|
+
} else {
|
|
2038
|
+
noWhenBranchMatchedException();
|
|
2039
|
+
}
|
|
2040
|
+
}
|
|
2041
|
+
}
|
|
2042
|
+
var tmp0_let = tmp;
|
|
2043
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
2044
|
+
var tmp$ret$0;
|
|
2045
|
+
// Inline function 'community.flock.wirespec.openapi.v3.toField.<anonymous>' call
|
|
2046
|
+
var tmp_3 = new Identifier(_this__u8e3s4.y1k_1);
|
|
2047
|
+
var tmp0_elvis_lhs = _this__u8e3s4.o1k_1;
|
|
2048
|
+
tmp$ret$0 = new Field(tmp_3, tmp0_let, !(tmp0_elvis_lhs == null ? false : tmp0_elvis_lhs));
|
|
2049
|
+
tmp$ret$1 = tmp$ret$0;
|
|
2050
|
+
return tmp$ret$1;
|
|
2051
|
+
}
|
|
2052
|
+
function resolve_3(_this__u8e3s4, openApi) {
|
|
2053
|
+
var tmp0_subject = _this__u8e3s4;
|
|
2054
|
+
var tmp;
|
|
2055
|
+
if (tmp0_subject instanceof RequestBodyObject) {
|
|
2056
|
+
tmp = _this__u8e3s4;
|
|
2057
|
+
} else {
|
|
2058
|
+
if (tmp0_subject instanceof ReferenceObject_0) {
|
|
2059
|
+
var tmp1_safe_receiver = resolveRequestBodyObject(_this__u8e3s4, openApi);
|
|
2060
|
+
tmp = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.h3_1;
|
|
2061
|
+
} else {
|
|
2062
|
+
noWhenBranchMatchedException();
|
|
2063
|
+
}
|
|
2064
|
+
}
|
|
2065
|
+
return tmp;
|
|
2066
|
+
}
|
|
2067
|
+
function toReference_0(_this__u8e3s4, openApi) {
|
|
2068
|
+
var tmp0_subject = _this__u8e3s4;
|
|
2069
|
+
var tmp;
|
|
2070
|
+
if (tmp0_subject instanceof ReferenceObject_0) {
|
|
2071
|
+
var tmp1_elvis_lhs = resolveSchemaObject_0(_this__u8e3s4, openApi);
|
|
2072
|
+
var tmp_0;
|
|
2073
|
+
if (tmp1_elvis_lhs == null) {
|
|
2074
|
+
throw new NotImplementedError();
|
|
2075
|
+
} else {
|
|
2076
|
+
tmp_0 = tmp1_elvis_lhs;
|
|
2077
|
+
}
|
|
2078
|
+
var resolved = tmp_0;
|
|
2079
|
+
var tmp2_subject = resolved.h3_1.m1l_1;
|
|
2080
|
+
var tmp0 = tmp2_subject == null ? -1 : tmp2_subject.q4_1;
|
|
2081
|
+
var tmp_1;
|
|
2082
|
+
if (tmp0 === 4) {
|
|
2083
|
+
var tmp3_subject = resolved.h3_1.r1l_1;
|
|
2084
|
+
var tmp_2;
|
|
2085
|
+
if (tmp3_subject instanceof ReferenceObject_0) {
|
|
2086
|
+
var tmp_3 = Common_getInstance();
|
|
2087
|
+
var tmp_4 = resolved.h3_1.r1l_1;
|
|
2088
|
+
tmp_2 = new Custom(tmp_3.q1s([getReference_0(tmp_4 instanceof ReferenceObject_0 ? tmp_4 : THROW_CCE())]), true);
|
|
2089
|
+
} else {
|
|
2090
|
+
if (tmp3_subject instanceof SchemaObject_0) {
|
|
2091
|
+
tmp_2 = new Custom(Common_getInstance().q1s([getReference_0(resolved.g3_1), 'Array']), true);
|
|
2092
|
+
} else {
|
|
2093
|
+
throw new NotImplementedError();
|
|
2094
|
+
}
|
|
2095
|
+
}
|
|
2096
|
+
tmp_1 = tmp_2;
|
|
2097
|
+
} else {
|
|
2098
|
+
tmp_1 = new Custom(Common_getInstance().q1s([getReference_0(resolved.g3_1)]), false);
|
|
2099
|
+
}
|
|
2100
|
+
tmp = tmp_1;
|
|
2101
|
+
} else {
|
|
2102
|
+
if (tmp0_subject instanceof SchemaObject_0) {
|
|
2103
|
+
var tmp4_subject = _this__u8e3s4.m1l_1;
|
|
2104
|
+
var tmp0_0 = tmp4_subject == null ? -1 : tmp4_subject.q4_1;
|
|
2105
|
+
var tmp_5;
|
|
2106
|
+
if (tmp0_0 === 4) {
|
|
2107
|
+
var tmp5_subject = _this__u8e3s4.r1l_1;
|
|
2108
|
+
var tmp_6;
|
|
2109
|
+
if (tmp5_subject instanceof ReferenceObject_0) {
|
|
2110
|
+
var tmp_7 = Common_getInstance();
|
|
2111
|
+
var tmp_8 = _this__u8e3s4.r1l_1;
|
|
2112
|
+
tmp_6 = new Custom(tmp_7.q1s([getReference_0(tmp_8 instanceof ReferenceObject_0 ? tmp_8 : THROW_CCE())]), true);
|
|
2113
|
+
} else {
|
|
2114
|
+
throw new NotImplementedError();
|
|
2115
|
+
}
|
|
2116
|
+
tmp_5 = tmp_6;
|
|
2117
|
+
} else {
|
|
2118
|
+
throw new NotImplementedError();
|
|
2119
|
+
}
|
|
2120
|
+
tmp = tmp_5;
|
|
2121
|
+
} else {
|
|
2122
|
+
noWhenBranchMatchedException();
|
|
2123
|
+
}
|
|
2124
|
+
}
|
|
2125
|
+
return tmp;
|
|
2126
|
+
}
|
|
2127
|
+
function resolve_4(_this__u8e3s4, openApi) {
|
|
2128
|
+
var tmp0_subject = _this__u8e3s4;
|
|
2129
|
+
var tmp;
|
|
2130
|
+
if (tmp0_subject instanceof ResponseObject_0) {
|
|
2131
|
+
tmp = _this__u8e3s4;
|
|
2132
|
+
} else {
|
|
2133
|
+
if (tmp0_subject instanceof ReferenceObject_0) {
|
|
2134
|
+
var tmp1_safe_receiver = resolveResponseObject_0(_this__u8e3s4, openApi);
|
|
2135
|
+
tmp = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.h3_1;
|
|
2136
|
+
} else {
|
|
2137
|
+
noWhenBranchMatchedException();
|
|
2138
|
+
}
|
|
2139
|
+
}
|
|
2140
|
+
return tmp;
|
|
2141
|
+
}
|
|
2142
|
+
function toOperationList_0(_this__u8e3s4) {
|
|
2143
|
+
var tmp$ret$5;
|
|
2144
|
+
// Inline function 'kotlin.collections.filter' call
|
|
2145
|
+
var tmp$ret$2;
|
|
2146
|
+
// Inline function 'kotlin.collections.map' call
|
|
2147
|
+
var tmp1_map = values();
|
|
2148
|
+
var tmp$ret$1;
|
|
2149
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
2150
|
+
var tmp0_mapTo = ArrayList_init_$Create$_0(tmp1_map.length);
|
|
2151
|
+
var indexedObject = tmp1_map;
|
|
2152
|
+
var inductionVariable = 0;
|
|
2153
|
+
var last = indexedObject.length;
|
|
2154
|
+
while (inductionVariable < last) {
|
|
2155
|
+
var item = indexedObject[inductionVariable];
|
|
2156
|
+
inductionVariable = inductionVariable + 1 | 0;
|
|
2157
|
+
var tmp$ret$0;
|
|
2158
|
+
// Inline function 'community.flock.wirespec.openapi.v3.toOperationList.<anonymous>' call
|
|
2159
|
+
var tmp0_subject = item;
|
|
2160
|
+
var tmp0 = tmp0_subject.q4_1;
|
|
2161
|
+
var tmp;
|
|
2162
|
+
switch (tmp0) {
|
|
2163
|
+
case 0:
|
|
2164
|
+
tmp = _this__u8e3s4.l1j_1;
|
|
2165
|
+
break;
|
|
2166
|
+
case 1:
|
|
2167
|
+
tmp = _this__u8e3s4.n1j_1;
|
|
2168
|
+
break;
|
|
2169
|
+
case 2:
|
|
2170
|
+
tmp = _this__u8e3s4.m1j_1;
|
|
2171
|
+
break;
|
|
2172
|
+
case 3:
|
|
2173
|
+
tmp = _this__u8e3s4.o1j_1;
|
|
2174
|
+
break;
|
|
2175
|
+
case 4:
|
|
2176
|
+
tmp = _this__u8e3s4.p1j_1;
|
|
2177
|
+
break;
|
|
2178
|
+
case 5:
|
|
2179
|
+
tmp = _this__u8e3s4.q1j_1;
|
|
2180
|
+
break;
|
|
2181
|
+
case 6:
|
|
2182
|
+
tmp = _this__u8e3s4.r1j_1;
|
|
2183
|
+
break;
|
|
2184
|
+
case 7:
|
|
2185
|
+
tmp = _this__u8e3s4.s1j_1;
|
|
2186
|
+
break;
|
|
2187
|
+
default:
|
|
2188
|
+
noWhenBranchMatchedException();
|
|
2189
|
+
break;
|
|
2190
|
+
}
|
|
2191
|
+
tmp$ret$0 = to(item, tmp);
|
|
2192
|
+
tmp0_mapTo.a(tmp$ret$0);
|
|
2193
|
+
}
|
|
2194
|
+
tmp$ret$1 = tmp0_mapTo;
|
|
2195
|
+
tmp$ret$2 = tmp$ret$1;
|
|
2196
|
+
var tmp3_filter = tmp$ret$2;
|
|
2197
|
+
var tmp$ret$4;
|
|
2198
|
+
// Inline function 'kotlin.collections.filterTo' call
|
|
2199
|
+
var tmp2_filterTo = ArrayList_init_$Create$();
|
|
2200
|
+
var tmp0_iterator = tmp3_filter.c();
|
|
2201
|
+
while (tmp0_iterator.d()) {
|
|
2202
|
+
var element = tmp0_iterator.e();
|
|
2203
|
+
var tmp$ret$3;
|
|
2204
|
+
// Inline function 'community.flock.wirespec.openapi.v3.toOperationList.<anonymous>' call
|
|
2205
|
+
var value = element.j3();
|
|
2206
|
+
tmp$ret$3 = !(value == null);
|
|
2207
|
+
if (tmp$ret$3) {
|
|
2208
|
+
tmp2_filterTo.a(element);
|
|
2209
|
+
}
|
|
2210
|
+
}
|
|
2211
|
+
tmp$ret$4 = tmp2_filterTo;
|
|
2212
|
+
tmp$ret$5 = tmp$ret$4;
|
|
2213
|
+
return tmp$ret$5;
|
|
2214
|
+
}
|
|
2215
|
+
function SimpleSchema_0(name, properties) {
|
|
2216
|
+
this.y1s_1 = name;
|
|
2217
|
+
this.z1s_1 = properties;
|
|
2218
|
+
}
|
|
2219
|
+
protoOf(SimpleSchema_0).toString = function () {
|
|
2220
|
+
return 'SimpleSchema(name=' + this.y1s_1 + ', properties=' + this.z1s_1 + ')';
|
|
2221
|
+
};
|
|
2222
|
+
protoOf(SimpleSchema_0).hashCode = function () {
|
|
2223
|
+
var result = getStringHashCode(this.y1s_1);
|
|
2224
|
+
result = imul(result, 31) + hashCode(this.z1s_1) | 0;
|
|
2225
|
+
return result;
|
|
2226
|
+
};
|
|
2227
|
+
protoOf(SimpleSchema_0).equals = function (other) {
|
|
2228
|
+
if (this === other)
|
|
2229
|
+
return true;
|
|
2230
|
+
if (!(other instanceof SimpleSchema_0))
|
|
2231
|
+
return false;
|
|
2232
|
+
var tmp0_other_with_cast = other instanceof SimpleSchema_0 ? other : THROW_CCE();
|
|
2233
|
+
if (!(this.y1s_1 === tmp0_other_with_cast.y1s_1))
|
|
2234
|
+
return false;
|
|
2235
|
+
if (!equals(this.z1s_1, tmp0_other_with_cast.z1s_1))
|
|
2236
|
+
return false;
|
|
2237
|
+
return true;
|
|
2238
|
+
};
|
|
2239
|
+
function flatten_1(_this__u8e3s4, name, openApi) {
|
|
2240
|
+
var tmp0_subject = _this__u8e3s4;
|
|
2241
|
+
var tmp;
|
|
2242
|
+
if (tmp0_subject instanceof SchemaObject_0) {
|
|
2243
|
+
tmp = flatten_2(_this__u8e3s4, name, openApi);
|
|
2244
|
+
} else {
|
|
2245
|
+
if (tmp0_subject instanceof ReferenceObject_0) {
|
|
2246
|
+
var tmp1_safe_receiver = resolveSchemaObject_0(_this__u8e3s4, openApi);
|
|
2247
|
+
var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.h3_1;
|
|
2248
|
+
var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : flatten_2(tmp2_safe_receiver, name, openApi);
|
|
2249
|
+
var tmp_0;
|
|
2250
|
+
if (tmp3_elvis_lhs == null) {
|
|
2251
|
+
throw IllegalStateException_init_$Create$('Reference not found');
|
|
2252
|
+
} else {
|
|
2253
|
+
tmp_0 = tmp3_elvis_lhs;
|
|
2254
|
+
}
|
|
2255
|
+
tmp = tmp_0;
|
|
2256
|
+
} else {
|
|
2257
|
+
noWhenBranchMatchedException();
|
|
2258
|
+
}
|
|
2259
|
+
}
|
|
2260
|
+
return tmp;
|
|
2261
|
+
}
|
|
2262
|
+
function SimpleProp_0(key, field) {
|
|
2263
|
+
this.a1t_1 = key;
|
|
2264
|
+
this.b1t_1 = field;
|
|
2265
|
+
}
|
|
2266
|
+
protoOf(SimpleProp_0).toString = function () {
|
|
2267
|
+
return 'SimpleProp(key=' + this.a1t_1 + ', field=' + this.b1t_1 + ')';
|
|
2268
|
+
};
|
|
2269
|
+
protoOf(SimpleProp_0).hashCode = function () {
|
|
2270
|
+
var result = getStringHashCode(this.a1t_1);
|
|
2271
|
+
result = imul(result, 31) + this.b1t_1.hashCode() | 0;
|
|
2272
|
+
return result;
|
|
2273
|
+
};
|
|
2274
|
+
protoOf(SimpleProp_0).equals = function (other) {
|
|
2275
|
+
if (this === other)
|
|
2276
|
+
return true;
|
|
2277
|
+
if (!(other instanceof SimpleProp_0))
|
|
2278
|
+
return false;
|
|
2279
|
+
var tmp0_other_with_cast = other instanceof SimpleProp_0 ? other : THROW_CCE();
|
|
2280
|
+
if (!(this.a1t_1 === tmp0_other_with_cast.a1t_1))
|
|
2281
|
+
return false;
|
|
2282
|
+
if (!this.b1t_1.equals(tmp0_other_with_cast.b1t_1))
|
|
2283
|
+
return false;
|
|
2284
|
+
return true;
|
|
2285
|
+
};
|
|
2286
|
+
function resolveParameterObject_0(_this__u8e3s4, openApi) {
|
|
2287
|
+
var tmp0_safe_receiver = openApi.y1i_1;
|
|
2288
|
+
var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.q1n_1;
|
|
2289
|
+
var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.m2(getReference_0(_this__u8e3s4));
|
|
2290
|
+
var tmp;
|
|
2291
|
+
if (tmp2_safe_receiver == null) {
|
|
2292
|
+
tmp = null;
|
|
2293
|
+
} else {
|
|
2294
|
+
var tmp$ret$1;
|
|
2295
|
+
// Inline function 'kotlin.let' call
|
|
2296
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
2297
|
+
var tmp$ret$0;
|
|
2298
|
+
// Inline function 'community.flock.wirespec.openapi.v3.resolveParameterObject.<anonymous>' call
|
|
2299
|
+
var tmp0_subject = tmp2_safe_receiver;
|
|
2300
|
+
var tmp_0;
|
|
2301
|
+
if (tmp0_subject instanceof ParameterObject_0) {
|
|
2302
|
+
tmp_0 = tmp2_safe_receiver;
|
|
2303
|
+
} else {
|
|
2304
|
+
if (tmp0_subject instanceof ReferenceObject_0) {
|
|
2305
|
+
tmp_0 = resolveParameterObject_0(tmp2_safe_receiver, openApi);
|
|
2306
|
+
} else {
|
|
2307
|
+
noWhenBranchMatchedException();
|
|
2308
|
+
}
|
|
2309
|
+
}
|
|
2310
|
+
tmp$ret$0 = tmp_0;
|
|
2311
|
+
tmp$ret$1 = tmp$ret$0;
|
|
2312
|
+
tmp = tmp$ret$1;
|
|
2313
|
+
}
|
|
2314
|
+
return tmp;
|
|
2315
|
+
}
|
|
2316
|
+
function resolveSchemaObject_0(_this__u8e3s4, openApi) {
|
|
2317
|
+
var tmp0_safe_receiver = openApi.y1i_1;
|
|
2318
|
+
var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.o1n_1;
|
|
2319
|
+
var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.m2(getReference_0(_this__u8e3s4));
|
|
2320
|
+
var tmp;
|
|
2321
|
+
if (tmp2_safe_receiver == null) {
|
|
2322
|
+
tmp = null;
|
|
2323
|
+
} else {
|
|
2324
|
+
var tmp$ret$1;
|
|
2325
|
+
// Inline function 'kotlin.let' call
|
|
2326
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
2327
|
+
var tmp$ret$0;
|
|
2328
|
+
// Inline function 'community.flock.wirespec.openapi.v3.resolveSchemaObject.<anonymous>' call
|
|
2329
|
+
var tmp0_subject = tmp2_safe_receiver;
|
|
2330
|
+
var tmp_0;
|
|
2331
|
+
if (tmp0_subject instanceof SchemaObject_0) {
|
|
2332
|
+
tmp_0 = to(_this__u8e3s4, tmp2_safe_receiver);
|
|
2333
|
+
} else {
|
|
2334
|
+
if (tmp0_subject instanceof ReferenceObject_0) {
|
|
2335
|
+
tmp_0 = resolveSchemaObject_0(tmp2_safe_receiver, openApi);
|
|
2336
|
+
} else {
|
|
2337
|
+
noWhenBranchMatchedException();
|
|
2338
|
+
}
|
|
2339
|
+
}
|
|
2340
|
+
tmp$ret$0 = tmp_0;
|
|
2341
|
+
tmp$ret$1 = tmp$ret$0;
|
|
2342
|
+
tmp = tmp$ret$1;
|
|
2343
|
+
}
|
|
2344
|
+
return tmp;
|
|
2345
|
+
}
|
|
2346
|
+
function getReference_0(_this__u8e3s4) {
|
|
2347
|
+
return split(_Ref___get_value__impl__kxavfe_0(_this__u8e3s4.z1n_1), ['/']).h(3);
|
|
2348
|
+
}
|
|
2349
|
+
function resolveRequestBodyObject(_this__u8e3s4, openApi) {
|
|
2350
|
+
var tmp0_safe_receiver = openApi.y1i_1;
|
|
2351
|
+
var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.s1n_1;
|
|
2352
|
+
var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.m2(getReference_0(_this__u8e3s4));
|
|
2353
|
+
var tmp;
|
|
2354
|
+
if (tmp2_safe_receiver == null) {
|
|
2355
|
+
tmp = null;
|
|
2356
|
+
} else {
|
|
2357
|
+
var tmp$ret$1;
|
|
2358
|
+
// Inline function 'kotlin.let' call
|
|
2359
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
2360
|
+
var tmp$ret$0;
|
|
2361
|
+
// Inline function 'community.flock.wirespec.openapi.v3.resolveRequestBodyObject.<anonymous>' call
|
|
2362
|
+
var tmp0_subject = tmp2_safe_receiver;
|
|
2363
|
+
var tmp_0;
|
|
2364
|
+
if (tmp0_subject instanceof RequestBodyObject) {
|
|
2365
|
+
tmp_0 = to(_this__u8e3s4, tmp2_safe_receiver);
|
|
2366
|
+
} else {
|
|
2367
|
+
if (tmp0_subject instanceof ReferenceObject_0) {
|
|
2368
|
+
tmp_0 = resolveRequestBodyObject(tmp2_safe_receiver, openApi);
|
|
2369
|
+
} else {
|
|
2370
|
+
noWhenBranchMatchedException();
|
|
2371
|
+
}
|
|
2372
|
+
}
|
|
2373
|
+
tmp$ret$0 = tmp_0;
|
|
2374
|
+
tmp$ret$1 = tmp$ret$0;
|
|
2375
|
+
tmp = tmp$ret$1;
|
|
2376
|
+
}
|
|
2377
|
+
return tmp;
|
|
2378
|
+
}
|
|
2379
|
+
function resolveResponseObject_0(_this__u8e3s4, openApi) {
|
|
2380
|
+
var tmp0_safe_receiver = openApi.y1i_1;
|
|
2381
|
+
var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.p1n_1;
|
|
2382
|
+
var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.m2(getReference_0(_this__u8e3s4));
|
|
2383
|
+
var tmp;
|
|
2384
|
+
if (tmp2_safe_receiver == null) {
|
|
2385
|
+
tmp = null;
|
|
2386
|
+
} else {
|
|
2387
|
+
var tmp$ret$1;
|
|
2388
|
+
// Inline function 'kotlin.let' call
|
|
2389
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
2390
|
+
var tmp$ret$0;
|
|
2391
|
+
// Inline function 'community.flock.wirespec.openapi.v3.resolveResponseObject.<anonymous>' call
|
|
2392
|
+
var tmp0_subject = tmp2_safe_receiver;
|
|
2393
|
+
var tmp_0;
|
|
2394
|
+
if (tmp0_subject instanceof ResponseObject_0) {
|
|
2395
|
+
tmp_0 = to(_this__u8e3s4, tmp2_safe_receiver);
|
|
2396
|
+
} else {
|
|
2397
|
+
if (tmp0_subject instanceof ReferenceObject_0) {
|
|
2398
|
+
tmp_0 = resolveResponseObject_0(tmp2_safe_receiver, openApi);
|
|
2399
|
+
} else {
|
|
2400
|
+
noWhenBranchMatchedException();
|
|
2401
|
+
}
|
|
2402
|
+
}
|
|
2403
|
+
tmp$ret$0 = tmp_0;
|
|
2404
|
+
tmp$ret$1 = tmp$ret$0;
|
|
2405
|
+
tmp = tmp$ret$1;
|
|
2406
|
+
}
|
|
2407
|
+
return tmp;
|
|
2408
|
+
}
|
|
2409
|
+
function flatten_2(_this__u8e3s4, name, openApi) {
|
|
2410
|
+
var tmp0_subject = _this__u8e3s4.m1l_1;
|
|
2411
|
+
var tmp0 = tmp0_subject == null ? -1 : tmp0_subject.q4_1;
|
|
2412
|
+
var tmp;
|
|
2413
|
+
switch (tmp0) {
|
|
2414
|
+
case 5:
|
|
2415
|
+
var tmp1_safe_receiver = _this__u8e3s4.s1l_1;
|
|
2416
|
+
var tmp_0;
|
|
2417
|
+
if (tmp1_safe_receiver == null) {
|
|
2418
|
+
tmp_0 = null;
|
|
2419
|
+
} else {
|
|
2420
|
+
var tmp$ret$5;
|
|
2421
|
+
// Inline function 'kotlin.collections.flatMap' call
|
|
2422
|
+
var tmp$ret$4;
|
|
2423
|
+
// Inline function 'kotlin.collections.flatMapTo' call
|
|
2424
|
+
var tmp0_flatMapTo = ArrayList_init_$Create$();
|
|
2425
|
+
var tmp$ret$0;
|
|
2426
|
+
// Inline function 'kotlin.collections.iterator' call
|
|
2427
|
+
tmp$ret$0 = tmp1_safe_receiver.u().c();
|
|
2428
|
+
var tmp0_iterator = tmp$ret$0;
|
|
2429
|
+
while (tmp0_iterator.d()) {
|
|
2430
|
+
var element = tmp0_iterator.e();
|
|
2431
|
+
var tmp$ret$3;
|
|
2432
|
+
// Inline function 'community.flock.wirespec.openapi.v3.flatten.<anonymous>' call
|
|
2433
|
+
var tmp$ret$1;
|
|
2434
|
+
// Inline function 'kotlin.collections.component1' call
|
|
2435
|
+
tmp$ret$1 = element.v();
|
|
2436
|
+
var key = tmp$ret$1;
|
|
2437
|
+
var tmp$ret$2;
|
|
2438
|
+
// Inline function 'kotlin.collections.component2' call
|
|
2439
|
+
tmp$ret$2 = element.w();
|
|
2440
|
+
var value = tmp$ret$2;
|
|
2441
|
+
var tmp0_subject_0 = value;
|
|
2442
|
+
var tmp_1;
|
|
2443
|
+
if (tmp0_subject_0 instanceof SchemaObject_0) {
|
|
2444
|
+
tmp_1 = flatten_2(value, Common_getInstance().q1s([name, key]), openApi);
|
|
2445
|
+
} else {
|
|
2446
|
+
if (tmp0_subject_0 instanceof ReferenceObject_0) {
|
|
2447
|
+
tmp_1 = emptyList();
|
|
2448
|
+
} else {
|
|
2449
|
+
noWhenBranchMatchedException();
|
|
2450
|
+
}
|
|
2451
|
+
}
|
|
2452
|
+
tmp$ret$3 = tmp_1;
|
|
2453
|
+
var list = tmp$ret$3;
|
|
2454
|
+
addAll(tmp0_flatMapTo, list);
|
|
2455
|
+
}
|
|
2456
|
+
tmp$ret$4 = tmp0_flatMapTo;
|
|
2457
|
+
tmp$ret$5 = tmp$ret$4;
|
|
2458
|
+
tmp_0 = tmp$ret$5;
|
|
2459
|
+
}
|
|
2460
|
+
|
|
2461
|
+
var tmp2_elvis_lhs = tmp_0;
|
|
2462
|
+
var fields = tmp2_elvis_lhs == null ? emptyList() : tmp2_elvis_lhs;
|
|
2463
|
+
var tmp3_safe_receiver = _this__u8e3s4.s1l_1;
|
|
2464
|
+
var tmp_2;
|
|
2465
|
+
if (tmp3_safe_receiver == null) {
|
|
2466
|
+
tmp_2 = null;
|
|
2467
|
+
} else {
|
|
2468
|
+
var tmp$ret$11;
|
|
2469
|
+
// Inline function 'kotlin.collections.map' call
|
|
2470
|
+
var tmp$ret$10;
|
|
2471
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
2472
|
+
var tmp1_mapTo = ArrayList_init_$Create$_0(tmp3_safe_receiver.f());
|
|
2473
|
+
var tmp$ret$6;
|
|
2474
|
+
// Inline function 'kotlin.collections.iterator' call
|
|
2475
|
+
tmp$ret$6 = tmp3_safe_receiver.u().c();
|
|
2476
|
+
var tmp0_iterator_0 = tmp$ret$6;
|
|
2477
|
+
while (tmp0_iterator_0.d()) {
|
|
2478
|
+
var item = tmp0_iterator_0.e();
|
|
2479
|
+
var tmp$ret$9;
|
|
2480
|
+
// Inline function 'community.flock.wirespec.openapi.v3.flatten.<anonymous>' call
|
|
2481
|
+
var tmp$ret$7;
|
|
2482
|
+
// Inline function 'kotlin.collections.component1' call
|
|
2483
|
+
tmp$ret$7 = item.v();
|
|
2484
|
+
var key_0 = tmp$ret$7;
|
|
2485
|
+
var tmp$ret$8;
|
|
2486
|
+
// Inline function 'kotlin.collections.component2' call
|
|
2487
|
+
tmp$ret$8 = item.w();
|
|
2488
|
+
var value_0 = tmp$ret$8;
|
|
2489
|
+
var tmp0_subject_1 = value_0;
|
|
2490
|
+
var tmp_3;
|
|
2491
|
+
if (tmp0_subject_1 instanceof SchemaObject_0) {
|
|
2492
|
+
var tmp1_subject = value_0.m1l_1;
|
|
2493
|
+
var tmp0_0 = tmp1_subject == null ? -1 : tmp1_subject.q4_1;
|
|
2494
|
+
var tmp_4;
|
|
2495
|
+
switch (tmp0_0) {
|
|
2496
|
+
case 0:
|
|
2497
|
+
case 1:
|
|
2498
|
+
case 2:
|
|
2499
|
+
case 3:
|
|
2500
|
+
var tmp_5 = value_0.m1l_1;
|
|
2501
|
+
tmp_4 = new Primitive(toPrimitive_0(tmp_5 instanceof Type_1 ? tmp_5 : THROW_CCE()), false);
|
|
2502
|
+
break;
|
|
2503
|
+
case 4:
|
|
2504
|
+
var tmp2_safe_receiver = value_0.r1l_1;
|
|
2505
|
+
var resolve = tmp2_safe_receiver == null ? null : resolve_2(tmp2_safe_receiver, openApi);
|
|
2506
|
+
var tmp3_safe_receiver_0 = resolve;
|
|
2507
|
+
var tmp4_subject = tmp3_safe_receiver_0 == null ? null : tmp3_safe_receiver_0.m1l_1;
|
|
2508
|
+
var tmp0_1 = tmp4_subject == null ? -1 : tmp4_subject.q4_1;
|
|
2509
|
+
var tmp_6;
|
|
2510
|
+
switch (tmp0_1) {
|
|
2511
|
+
case 0:
|
|
2512
|
+
case 1:
|
|
2513
|
+
case 2:
|
|
2514
|
+
case 3:
|
|
2515
|
+
var tmp_7 = resolve.m1l_1;
|
|
2516
|
+
tmp_6 = new Primitive(toPrimitive_0(tmp_7 instanceof Type_1 ? tmp_7 : THROW_CCE()), true);
|
|
2517
|
+
break;
|
|
2518
|
+
default:
|
|
2519
|
+
var tmp5_subject = value_0.r1l_1;
|
|
2520
|
+
var tmp_8;
|
|
2521
|
+
if (tmp5_subject instanceof ReferenceObject_0) {
|
|
2522
|
+
var tmp_9 = value_0.r1l_1;
|
|
2523
|
+
tmp_8 = new Custom(getReference_0(tmp_9 instanceof ReferenceObject_0 ? tmp_9 : THROW_CCE()), true);
|
|
2524
|
+
} else {
|
|
2525
|
+
throw new NotImplementedError();
|
|
2526
|
+
}
|
|
2527
|
+
|
|
2528
|
+
tmp_6 = tmp_8;
|
|
2529
|
+
break;
|
|
2530
|
+
}
|
|
2531
|
+
|
|
2532
|
+
tmp_4 = tmp_6;
|
|
2533
|
+
break;
|
|
2534
|
+
case 5:
|
|
2535
|
+
tmp_4 = new Custom(Common_getInstance().q1s([name, key_0]), false);
|
|
2536
|
+
break;
|
|
2537
|
+
case -1:
|
|
2538
|
+
throw new NotImplementedError();
|
|
2539
|
+
default:
|
|
2540
|
+
noWhenBranchMatchedException();
|
|
2541
|
+
break;
|
|
2542
|
+
}
|
|
2543
|
+
var reference = tmp_4;
|
|
2544
|
+
var tmp_10 = new Identifier(key_0);
|
|
2545
|
+
var tmp6_safe_receiver = _this__u8e3s4.l1m_1;
|
|
2546
|
+
var tmp7_elvis_lhs = tmp6_safe_receiver == null ? null : contains(tmp6_safe_receiver, key_0);
|
|
2547
|
+
tmp_3 = new SimpleProp_0(key_0, new Field(tmp_10, reference, !(tmp7_elvis_lhs == null ? false : tmp7_elvis_lhs)));
|
|
2548
|
+
} else {
|
|
2549
|
+
if (tmp0_subject_1 instanceof ReferenceObject_0) {
|
|
2550
|
+
var tmp_11 = new Identifier(key_0);
|
|
2551
|
+
var tmp_12 = new Custom(getReference_0(value_0), false);
|
|
2552
|
+
var tmp8_safe_receiver = _this__u8e3s4.l1m_1;
|
|
2553
|
+
var tmp9_elvis_lhs = tmp8_safe_receiver == null ? null : contains(tmp8_safe_receiver, key_0);
|
|
2554
|
+
tmp_3 = new SimpleProp_0(key_0, new Field(tmp_11, tmp_12, !(tmp9_elvis_lhs == null ? false : tmp9_elvis_lhs)));
|
|
2555
|
+
} else {
|
|
2556
|
+
noWhenBranchMatchedException();
|
|
2557
|
+
}
|
|
2558
|
+
}
|
|
2559
|
+
tmp$ret$9 = tmp_3;
|
|
2560
|
+
tmp1_mapTo.a(tmp$ret$9);
|
|
2561
|
+
}
|
|
2562
|
+
tmp$ret$10 = tmp1_mapTo;
|
|
2563
|
+
tmp$ret$11 = tmp$ret$10;
|
|
2564
|
+
tmp_2 = tmp$ret$11;
|
|
2565
|
+
}
|
|
2566
|
+
|
|
2567
|
+
var tmp4_elvis_lhs = tmp_2;
|
|
2568
|
+
tmp = plus(listOf(new SimpleSchema_0(name, tmp4_elvis_lhs == null ? emptyList() : tmp4_elvis_lhs)), fields);
|
|
2569
|
+
break;
|
|
2570
|
+
case 4:
|
|
2571
|
+
var tmp5_safe_receiver = _this__u8e3s4.r1l_1;
|
|
2572
|
+
var tmp_13;
|
|
2573
|
+
if (tmp5_safe_receiver == null) {
|
|
2574
|
+
tmp_13 = null;
|
|
2575
|
+
} else {
|
|
2576
|
+
var tmp$ret$13;
|
|
2577
|
+
// Inline function 'kotlin.let' call
|
|
2578
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
2579
|
+
var tmp$ret$12;
|
|
2580
|
+
// Inline function 'community.flock.wirespec.openapi.v3.flatten.<anonymous>' call
|
|
2581
|
+
var tmp0_subject_2 = tmp5_safe_receiver;
|
|
2582
|
+
var tmp_14;
|
|
2583
|
+
if (tmp0_subject_2 instanceof ReferenceObject_0) {
|
|
2584
|
+
tmp_14 = emptyList();
|
|
2585
|
+
} else {
|
|
2586
|
+
if (tmp0_subject_2 instanceof SchemaObject_0) {
|
|
2587
|
+
tmp_14 = flatten_2(tmp5_safe_receiver, Common_getInstance().q1s([name, 'array']), openApi);
|
|
2588
|
+
} else {
|
|
2589
|
+
noWhenBranchMatchedException();
|
|
2590
|
+
}
|
|
2591
|
+
}
|
|
2592
|
+
tmp$ret$12 = tmp_14;
|
|
2593
|
+
tmp$ret$13 = tmp$ret$12;
|
|
2594
|
+
tmp_13 = tmp$ret$13;
|
|
2595
|
+
}
|
|
2596
|
+
|
|
2597
|
+
var tmp6_elvis_lhs = tmp_13;
|
|
2598
|
+
tmp = tmp6_elvis_lhs == null ? emptyList() : tmp6_elvis_lhs;
|
|
2599
|
+
break;
|
|
2600
|
+
default:
|
|
2601
|
+
tmp = emptyList();
|
|
2602
|
+
break;
|
|
2603
|
+
}
|
|
2604
|
+
return tmp;
|
|
2605
|
+
}
|
|
2606
|
+
//region block: exports
|
|
2607
|
+
_.$_$ = _.$_$ || {};
|
|
2608
|
+
_.$_$.a = OpenApiParser_getInstance;
|
|
2609
|
+
_.$_$.b = OpenApiParser_getInstance_0;
|
|
2610
|
+
//endregion
|
|
2611
|
+
return _;
|
|
2612
|
+
}));
|
|
2613
|
+
|
|
2614
|
+
//# sourceMappingURL=wirespec-openapi.js.map
|