@flock/wirespec 0.0.1 → 0.4.4
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 +294 -294
- package/kotlin/Kotlinx-Cli-Library-kotlinx-cli-js-ir.js.map +1 -1
- package/kotlin/arrow-arrow-atomic.js.map +1 -1
- package/kotlin/arrow-arrow-core.js.map +1 -1
- package/kotlin/kotlin-openapi-bindings.js +1678 -1673
- package/kotlin/kotlin-openapi-bindings.js.map +1 -1
- package/kotlin/kotlinx-serialization-kotlinx-serialization-core-js-ir.js.map +1 -1
- package/kotlin/kotlinx-serialization-kotlinx-serialization-json-js-ir.js.map +1 -1
- package/kotlin/wirespec-bin.js +0 -0
- package/kotlin/wirespec-cli.js +86 -86
- package/kotlin/wirespec-cli.js.map +1 -1
- package/kotlin/wirespec-core.js +2 -1
- package/kotlin/wirespec-core.js.map +1 -1
- package/kotlin/wirespec-lib.js +33 -33
- package/kotlin/wirespec-lib.js.map +1 -1
- package/kotlin/wirespec-openapi.js +1644 -1145
- package/kotlin/wirespec-openapi.js.map +1 -1
- package/package.json +2 -3
- package/sync-hashes/Kotlinx-Cli-Library-kotlinx-cli-js-ir.js.hash +1 -1
- package/sync-hashes/Kotlinx-Cli-Library-kotlinx-cli-js-ir.js.map.hash +1 -1
- package/sync-hashes/arrow-arrow-atomic.js.map.hash +1 -1
- package/sync-hashes/arrow-arrow-core.js.map.hash +1 -1
- package/sync-hashes/kotlin-openapi-bindings.js.hash +1 -1
- package/sync-hashes/kotlin-openapi-bindings.js.map.hash +1 -1
- package/sync-hashes/kotlinx-serialization-kotlinx-serialization-json-js-ir.js.map.hash +1 -1
- package/sync-hashes/wirespec-cli.js.hash +1 -1
- package/sync-hashes/wirespec-cli.js.map.hash +1 -1
- package/sync-hashes/wirespec-core.js.hash +1 -1
- package/sync-hashes/wirespec-core.js.map.hash +1 -1
- package/sync-hashes/wirespec-lib.js.hash +1 -1
- package/sync-hashes/wirespec-lib.js.map.hash +1 -1
- package/sync-hashes/wirespec-openapi.js.hash +1 -1
- package/sync-hashes/wirespec-openapi.js.map.hash +1 -1
|
@@ -1,144 +1,119 @@
|
|
|
1
1
|
(function (root, factory) {
|
|
2
2
|
if (typeof define === 'function' && define.amd)
|
|
3
|
-
define(['exports', './kotlin-kotlin-stdlib-js-ir.js', './
|
|
3
|
+
define(['exports', './wirespec-core.js', './kotlin-kotlin-stdlib-js-ir.js', './kotlin-openapi-bindings.js'], factory);
|
|
4
4
|
else if (typeof exports === 'object')
|
|
5
|
-
factory(module.exports, require('./
|
|
5
|
+
factory(module.exports, require('./wirespec-core.js'), require('./kotlin-kotlin-stdlib-js-ir.js'), require('./kotlin-openapi-bindings.js'));
|
|
6
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
7
|
if (typeof this['wirespec-core'] === 'undefined') {
|
|
11
8
|
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
9
|
}
|
|
10
|
+
if (typeof this['kotlin-kotlin-stdlib-js-ir'] === 'undefined') {
|
|
11
|
+
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'.");
|
|
12
|
+
}
|
|
13
13
|
if (typeof this['kotlin-openapi-bindings'] === 'undefined') {
|
|
14
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
15
|
}
|
|
16
|
-
root['wirespec-openapi'] = factory(typeof this['wirespec-openapi'] === 'undefined' ? {} : this['wirespec-openapi'], this['kotlin-kotlin-stdlib-js-ir'], this['
|
|
16
|
+
root['wirespec-openapi'] = factory(typeof this['wirespec-openapi'] === 'undefined' ? {} : this['wirespec-openapi'], this['wirespec-core'], this['kotlin-kotlin-stdlib-js-ir'], this['kotlin-openapi-bindings']);
|
|
17
17
|
}
|
|
18
|
-
}(this, function (_,
|
|
18
|
+
}(this, function (_, kotlin_community_flock_wirespec_compiler_core, kotlin_kotlin, kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings) {
|
|
19
19
|
'use strict';
|
|
20
20
|
//region block: imports
|
|
21
21
|
var imul = Math.imul;
|
|
22
|
-
var
|
|
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;
|
|
22
|
+
var Companion_getInstance = kotlin_community_flock_wirespec_compiler_core.$_$.a1;
|
|
27
23
|
var VOID = kotlin_kotlin.$_$.ya;
|
|
28
24
|
var joinToString = kotlin_kotlin.$_$.b5;
|
|
29
25
|
var protoOf = kotlin_kotlin.$_$.t7;
|
|
30
26
|
var objectMeta = kotlin_kotlin.$_$.s7;
|
|
31
27
|
var setMetadataFor = kotlin_kotlin.$_$.u7;
|
|
32
|
-
var
|
|
33
|
-
var
|
|
34
|
-
var
|
|
35
|
-
var Default_getInstance = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.y;
|
|
28
|
+
var Default_getInstance = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.d1;
|
|
29
|
+
var Unit_getInstance = kotlin_kotlin.$_$.i3;
|
|
30
|
+
var emptyList = kotlin_kotlin.$_$.r4;
|
|
36
31
|
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.g;
|
|
37
|
-
var
|
|
32
|
+
var noWhenBranchMatchedException = kotlin_kotlin.$_$.ta;
|
|
33
|
+
var ReferenceObject = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.c;
|
|
34
|
+
var ParameterObject = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.a;
|
|
35
|
+
var to = kotlin_kotlin.$_$.xa;
|
|
36
|
+
var Ref = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.d;
|
|
37
|
+
var toString = kotlin_kotlin.$_$.y7;
|
|
38
|
+
var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.e1;
|
|
39
|
+
var SchemaObject = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.f;
|
|
40
|
+
var ResponseObject = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.e;
|
|
41
|
+
var addAll = kotlin_kotlin.$_$.z3;
|
|
38
42
|
var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.f;
|
|
39
|
-
var
|
|
43
|
+
var Identifier = kotlin_community_flock_wirespec_compiler_core.$_$.o;
|
|
44
|
+
var Custom = kotlin_community_flock_wirespec_compiler_core.$_$.p;
|
|
45
|
+
var contains = kotlin_kotlin.$_$.d4;
|
|
46
|
+
var Field = kotlin_community_flock_wirespec_compiler_core.$_$.r;
|
|
47
|
+
var THROW_CCE = kotlin_kotlin.$_$.y9;
|
|
48
|
+
var Type = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.h;
|
|
49
|
+
var Primitive = kotlin_community_flock_wirespec_compiler_core.$_$.q;
|
|
50
|
+
var NotImplementedError = kotlin_kotlin.$_$.u9;
|
|
51
|
+
var listOf = kotlin_kotlin.$_$.i5;
|
|
40
52
|
var plus = kotlin_kotlin.$_$.p5;
|
|
41
|
-
var
|
|
53
|
+
var getStringHashCode = kotlin_kotlin.$_$.x6;
|
|
54
|
+
var classMeta = kotlin_kotlin.$_$.q6;
|
|
55
|
+
var hashCode = kotlin_kotlin.$_$.y6;
|
|
56
|
+
var equals = kotlin_kotlin.$_$.s6;
|
|
57
|
+
var values = kotlin_community_flock_wirespec_compiler_core.$_$.h;
|
|
58
|
+
var _Ref___get_value__impl__kxavfe = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.w;
|
|
42
59
|
var split = kotlin_kotlin.$_$.w8;
|
|
60
|
+
var Type_String_getInstance = kotlin_community_flock_wirespec_compiler_core.$_$.z;
|
|
61
|
+
var Type_Integer_getInstance = kotlin_community_flock_wirespec_compiler_core.$_$.y;
|
|
62
|
+
var Type_Boolean_getInstance = kotlin_community_flock_wirespec_compiler_core.$_$.x;
|
|
63
|
+
var _Path___get_value__impl__thmflc = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.v;
|
|
43
64
|
var drop = kotlin_kotlin.$_$.q4;
|
|
65
|
+
var collectionSizeOrDefault = kotlin_kotlin.$_$.c4;
|
|
66
|
+
var charSequenceLength = kotlin_kotlin.$_$.o6;
|
|
67
|
+
var charSequenceGet = kotlin_kotlin.$_$.n6;
|
|
44
68
|
var Char = kotlin_kotlin.$_$.m9;
|
|
45
69
|
var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.i1;
|
|
46
|
-
var
|
|
47
|
-
var
|
|
48
|
-
var Primitive = kotlin_community_flock_wirespec_compiler_core.$_$.q;
|
|
49
|
-
var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.e1;
|
|
70
|
+
var Literal = kotlin_community_flock_wirespec_compiler_core.$_$.k;
|
|
71
|
+
var Param = kotlin_community_flock_wirespec_compiler_core.$_$.l;
|
|
50
72
|
var joinToString_0 = kotlin_kotlin.$_$.a5;
|
|
51
|
-
var
|
|
52
|
-
var
|
|
53
|
-
var
|
|
54
|
-
var
|
|
73
|
+
var Path = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.b;
|
|
74
|
+
var Path__hashCode_impl_go73kd = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.u;
|
|
75
|
+
var StatusCode = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.g;
|
|
76
|
+
var StatusCode__hashCode_impl_fevhvx = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.x;
|
|
77
|
+
var ParameterLocation_QUERY_getInstance = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.q;
|
|
78
|
+
var ParameterLocation_HEADER_getInstance = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.p;
|
|
79
|
+
var ParameterLocation_BODY_getInstance = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.o;
|
|
55
80
|
var Content = kotlin_community_flock_wirespec_compiler_core.$_$.g;
|
|
56
81
|
var Request = kotlin_community_flock_wirespec_compiler_core.$_$.i;
|
|
57
|
-
var
|
|
58
|
-
var _StatusCode___get_value__impl__we50mu = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.
|
|
82
|
+
var emptyMap = kotlin_kotlin.$_$.s4;
|
|
83
|
+
var _StatusCode___get_value__impl__we50mu = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.y;
|
|
59
84
|
var Response = kotlin_community_flock_wirespec_compiler_core.$_$.j;
|
|
60
|
-
var addAll = kotlin_kotlin.$_$.z3;
|
|
61
85
|
var Endpoint = kotlin_community_flock_wirespec_compiler_core.$_$.m;
|
|
62
86
|
var Shape = kotlin_community_flock_wirespec_compiler_core.$_$.s;
|
|
63
|
-
var
|
|
64
|
-
var
|
|
65
|
-
var
|
|
66
|
-
var
|
|
67
|
-
var
|
|
68
|
-
var
|
|
69
|
-
var
|
|
70
|
-
var
|
|
71
|
-
var
|
|
72
|
-
var
|
|
73
|
-
var
|
|
74
|
-
var
|
|
75
|
-
var
|
|
76
|
-
var
|
|
77
|
-
var
|
|
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;
|
|
87
|
+
var Type_0 = kotlin_community_flock_wirespec_compiler_core.$_$.t;
|
|
88
|
+
var Default_getInstance_0 = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.e1;
|
|
89
|
+
var _Path___get_value__impl__thmflc_0 = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.a1;
|
|
90
|
+
var ParameterLocation_QUERY_getInstance_0 = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.t;
|
|
91
|
+
var ParameterLocation_HEADER_getInstance_0 = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.s;
|
|
92
|
+
var ParameterLocation_COOKIE_getInstance = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.r;
|
|
93
|
+
var _MediaType___get_value__impl__wy58mp = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.z;
|
|
94
|
+
var _StatusCode___get_value__impl__we50mu_0 = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.c1;
|
|
95
|
+
var ReferenceObject_0 = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.j;
|
|
96
|
+
var ParameterObject_0 = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.i;
|
|
97
|
+
var SchemaObject_0 = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.m;
|
|
98
|
+
var RequestBodyObject = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.k;
|
|
99
|
+
var ResponseObject_0 = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.l;
|
|
100
|
+
var _Ref___get_value__impl__kxavfe_0 = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.b1;
|
|
101
|
+
var Type_1 = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.n;
|
|
96
102
|
//endregion
|
|
97
103
|
//region block: pre-declaration
|
|
98
104
|
setMetadataFor(Common, 'Common', objectMeta);
|
|
99
|
-
setMetadataFor(
|
|
100
|
-
setMetadataFor(SimpleSchema, 'SimpleSchema', classMeta);
|
|
105
|
+
setMetadataFor(Companion, 'Companion', objectMeta);
|
|
101
106
|
setMetadataFor(SimpleProp, 'SimpleProp', classMeta);
|
|
107
|
+
setMetadataFor(SimpleSchema, 'SimpleSchema', classMeta);
|
|
108
|
+
setMetadataFor(FlattenRequest, 'FlattenRequest', classMeta);
|
|
109
|
+
setMetadataFor(FlattenResponse, 'FlattenResponse', classMeta);
|
|
110
|
+
setMetadataFor(OpenApiParser, 'OpenApiParser', classMeta);
|
|
102
111
|
setMetadataFor(OpenApiParser_0, 'OpenApiParser', objectMeta);
|
|
103
112
|
setMetadataFor(SimpleSchema_0, 'SimpleSchema', classMeta);
|
|
104
113
|
setMetadataFor(SimpleProp_0, 'SimpleProp', classMeta);
|
|
105
114
|
//endregion
|
|
106
115
|
function Common$className$lambda(it) {
|
|
107
|
-
|
|
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;
|
|
116
|
+
return Companion_getInstance().pi(it);
|
|
142
117
|
}
|
|
143
118
|
function Common() {
|
|
144
119
|
Common_instance = this;
|
|
@@ -152,776 +127,544 @@
|
|
|
152
127
|
new Common();
|
|
153
128
|
return Common_instance;
|
|
154
129
|
}
|
|
155
|
-
function
|
|
156
|
-
|
|
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;
|
|
130
|
+
function Companion() {
|
|
131
|
+
Companion_instance = this;
|
|
171
132
|
}
|
|
172
|
-
protoOf(
|
|
133
|
+
protoOf(Companion).r1s = function (json) {
|
|
173
134
|
var tmp$ret$1;
|
|
174
135
|
// Inline function 'kotlin.let' call
|
|
175
136
|
var tmp0_let = Default_getInstance().x19(json);
|
|
176
137
|
// Inline function 'kotlin.contracts.contract' call
|
|
177
138
|
var tmp$ret$0;
|
|
178
|
-
// Inline function 'community.flock.wirespec.openapi.v2.
|
|
179
|
-
tmp$ret$0 =
|
|
139
|
+
// Inline function 'community.flock.wirespec.openapi.v2.Companion.parse.<anonymous>' call
|
|
140
|
+
tmp$ret$0 = (new OpenApiParser(tmp0_let)).t1s();
|
|
180
141
|
tmp$ret$1 = tmp$ret$0;
|
|
181
142
|
return tmp$ret$1;
|
|
182
143
|
};
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
144
|
+
var Companion_instance;
|
|
145
|
+
function Companion_getInstance_0() {
|
|
146
|
+
if (Companion_instance == null)
|
|
147
|
+
new Companion();
|
|
148
|
+
return Companion_instance;
|
|
149
|
+
}
|
|
150
|
+
function resolveParameters(_this__u8e3s4, $this) {
|
|
151
|
+
var tmp$ret$4;
|
|
152
|
+
// Inline function 'kotlin.collections.mapNotNull' call
|
|
190
153
|
var tmp$ret$0;
|
|
191
|
-
// Inline function 'kotlin.collections.
|
|
192
|
-
|
|
193
|
-
var
|
|
154
|
+
// Inline function 'kotlin.collections.orEmpty' call
|
|
155
|
+
var tmp0_orEmpty = _this__u8e3s4.z1b_1;
|
|
156
|
+
var tmp0_elvis_lhs = tmp0_orEmpty;
|
|
157
|
+
tmp$ret$0 = tmp0_elvis_lhs == null ? emptyList() : tmp0_elvis_lhs;
|
|
158
|
+
var tmp2_mapNotNull = tmp$ret$0;
|
|
159
|
+
var tmp$ret$3;
|
|
160
|
+
// Inline function 'kotlin.collections.mapNotNullTo' call
|
|
161
|
+
var tmp1_mapNotNullTo = ArrayList_init_$Create$();
|
|
162
|
+
// Inline function 'kotlin.collections.forEach' call
|
|
163
|
+
var tmp0_iterator = tmp2_mapNotNull.c();
|
|
194
164
|
while (tmp0_iterator.d()) {
|
|
195
165
|
var element = tmp0_iterator.e();
|
|
196
|
-
|
|
197
|
-
// Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.parse.<anonymous>' call
|
|
166
|
+
// Inline function 'kotlin.collections.mapNotNullTo.<anonymous>' call
|
|
198
167
|
var tmp$ret$1;
|
|
199
|
-
// Inline function '
|
|
200
|
-
|
|
201
|
-
var
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
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);
|
|
168
|
+
// Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.resolveParameters.<anonymous>' call
|
|
169
|
+
var tmp0_subject = element;
|
|
170
|
+
var tmp;
|
|
171
|
+
if (tmp0_subject instanceof ParameterObject) {
|
|
172
|
+
tmp = element;
|
|
173
|
+
} else {
|
|
174
|
+
if (tmp0_subject instanceof ReferenceObject) {
|
|
175
|
+
tmp = resolveParameterObject(element, $this);
|
|
176
|
+
} else {
|
|
177
|
+
noWhenBranchMatchedException();
|
|
307
178
|
}
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
179
|
+
}
|
|
180
|
+
tmp$ret$1 = tmp;
|
|
181
|
+
var tmp0_safe_receiver = tmp$ret$1;
|
|
182
|
+
if (tmp0_safe_receiver == null)
|
|
183
|
+
null;
|
|
184
|
+
else {
|
|
185
|
+
var tmp$ret$2;
|
|
186
|
+
// Inline function 'kotlin.let' call
|
|
187
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
188
|
+
tmp1_mapNotNullTo.a(tmp0_safe_receiver);
|
|
189
|
+
tmp$ret$2 = Unit_getInstance();
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
tmp$ret$3 = tmp1_mapNotNullTo;
|
|
193
|
+
tmp$ret$4 = tmp$ret$3;
|
|
194
|
+
return tmp$ret$4;
|
|
195
|
+
}
|
|
196
|
+
function resolveParameters_0(_this__u8e3s4, $this) {
|
|
197
|
+
var tmp$ret$4;
|
|
198
|
+
// Inline function 'kotlin.collections.mapNotNull' call
|
|
199
|
+
var tmp$ret$0;
|
|
200
|
+
// Inline function 'kotlin.collections.orEmpty' call
|
|
201
|
+
var tmp0_orEmpty = _this__u8e3s4.u1c_1;
|
|
202
|
+
var tmp0_elvis_lhs = tmp0_orEmpty;
|
|
203
|
+
tmp$ret$0 = tmp0_elvis_lhs == null ? emptyList() : tmp0_elvis_lhs;
|
|
204
|
+
var tmp2_mapNotNull = tmp$ret$0;
|
|
205
|
+
var tmp$ret$3;
|
|
206
|
+
// Inline function 'kotlin.collections.mapNotNullTo' call
|
|
207
|
+
var tmp1_mapNotNullTo = ArrayList_init_$Create$();
|
|
208
|
+
// Inline function 'kotlin.collections.forEach' call
|
|
209
|
+
var tmp0_iterator = tmp2_mapNotNull.c();
|
|
210
|
+
while (tmp0_iterator.d()) {
|
|
211
|
+
var element = tmp0_iterator.e();
|
|
212
|
+
// Inline function 'kotlin.collections.mapNotNullTo.<anonymous>' call
|
|
213
|
+
var tmp$ret$1;
|
|
214
|
+
// Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.resolveParameters.<anonymous>' call
|
|
215
|
+
var tmp0_subject = element;
|
|
216
|
+
var tmp;
|
|
217
|
+
if (tmp0_subject instanceof ParameterObject) {
|
|
218
|
+
tmp = element;
|
|
219
|
+
} else {
|
|
220
|
+
if (tmp0_subject instanceof ReferenceObject) {
|
|
221
|
+
tmp = resolveParameterObject(element, $this);
|
|
316
222
|
} else {
|
|
317
|
-
|
|
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;
|
|
223
|
+
noWhenBranchMatchedException();
|
|
325
224
|
}
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
225
|
+
}
|
|
226
|
+
tmp$ret$1 = tmp;
|
|
227
|
+
var tmp0_safe_receiver = tmp$ret$1;
|
|
228
|
+
if (tmp0_safe_receiver == null)
|
|
229
|
+
null;
|
|
230
|
+
else {
|
|
231
|
+
var tmp$ret$2;
|
|
232
|
+
// Inline function 'kotlin.let' call
|
|
233
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
234
|
+
tmp1_mapNotNullTo.a(tmp0_safe_receiver);
|
|
235
|
+
tmp$ret$2 = Unit_getInstance();
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
tmp$ret$3 = tmp1_mapNotNullTo;
|
|
239
|
+
tmp$ret$4 = tmp$ret$3;
|
|
240
|
+
return tmp$ret$4;
|
|
241
|
+
}
|
|
242
|
+
function resolveParameterObject(_this__u8e3s4, $this) {
|
|
243
|
+
var tmp0_safe_receiver = $this.s1s_1.j1a_1;
|
|
244
|
+
return tmp0_safe_receiver == null ? null : tmp0_safe_receiver.m2(getReference(_this__u8e3s4, $this));
|
|
245
|
+
}
|
|
246
|
+
function resolveResponseObject(_this__u8e3s4, $this) {
|
|
247
|
+
var tmp0_safe_receiver = $this.s1s_1.k1a_1;
|
|
248
|
+
return tmp0_safe_receiver == null ? null : tmp0_safe_receiver.m2(getReference(_this__u8e3s4, $this));
|
|
249
|
+
}
|
|
250
|
+
function resolveSchemaObject(_this__u8e3s4, $this) {
|
|
251
|
+
var tmp0_safe_receiver = $this.s1s_1.i1a_1;
|
|
252
|
+
var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.m2(getReference(_this__u8e3s4, $this));
|
|
253
|
+
var tmp;
|
|
254
|
+
if (tmp1_safe_receiver == null) {
|
|
255
|
+
tmp = null;
|
|
256
|
+
} else {
|
|
257
|
+
var tmp$ret$1;
|
|
258
|
+
// Inline function 'kotlin.let' call
|
|
259
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
260
|
+
var tmp$ret$0;
|
|
261
|
+
// Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.resolveSchemaObject.<anonymous>' call
|
|
262
|
+
tmp$ret$0 = to(_this__u8e3s4, tmp1_safe_receiver);
|
|
263
|
+
tmp$ret$1 = tmp$ret$0;
|
|
264
|
+
tmp = tmp$ret$1;
|
|
265
|
+
}
|
|
266
|
+
return tmp;
|
|
267
|
+
}
|
|
268
|
+
function resolve(_this__u8e3s4, $this) {
|
|
269
|
+
var tmp0_subject = _this__u8e3s4;
|
|
270
|
+
var tmp;
|
|
271
|
+
if (tmp0_subject instanceof SchemaObject) {
|
|
272
|
+
tmp = _this__u8e3s4;
|
|
273
|
+
} else {
|
|
274
|
+
if (tmp0_subject instanceof ReferenceObject) {
|
|
275
|
+
var tmp1_safe_receiver = resolveSchemaObject(_this__u8e3s4, $this);
|
|
276
|
+
var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.h3_1;
|
|
277
|
+
var tmp_0;
|
|
278
|
+
if (tmp2_elvis_lhs == null) {
|
|
279
|
+
var tmp0_error = 'Cannot resolve reference: ' + new Ref(_this__u8e3s4.b1d_1);
|
|
280
|
+
throw IllegalStateException_init_$Create$(toString(tmp0_error));
|
|
338
281
|
} else {
|
|
339
|
-
|
|
282
|
+
tmp_0 = tmp2_elvis_lhs;
|
|
340
283
|
}
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
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;
|
|
284
|
+
tmp = tmp_0;
|
|
285
|
+
} else {
|
|
286
|
+
noWhenBranchMatchedException();
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
return tmp;
|
|
290
|
+
}
|
|
291
|
+
function resolve_0(_this__u8e3s4, $this) {
|
|
292
|
+
var tmp0_subject = _this__u8e3s4;
|
|
293
|
+
var tmp;
|
|
294
|
+
if (tmp0_subject instanceof ResponseObject) {
|
|
295
|
+
tmp = _this__u8e3s4;
|
|
296
|
+
} else {
|
|
297
|
+
if (tmp0_subject instanceof ReferenceObject) {
|
|
298
|
+
var tmp1_elvis_lhs = resolveResponseObject(_this__u8e3s4, $this);
|
|
299
|
+
var tmp_0;
|
|
300
|
+
if (tmp1_elvis_lhs == null) {
|
|
301
|
+
var tmp0_error = 'Cannot resolve reference: ' + new Ref(_this__u8e3s4.b1d_1);
|
|
302
|
+
throw IllegalStateException_init_$Create$(toString(tmp0_error));
|
|
303
|
+
} else {
|
|
304
|
+
tmp_0 = tmp1_elvis_lhs;
|
|
449
305
|
}
|
|
450
|
-
tmp
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
306
|
+
tmp = tmp_0;
|
|
307
|
+
} else {
|
|
308
|
+
noWhenBranchMatchedException();
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
return tmp;
|
|
312
|
+
}
|
|
313
|
+
function resolve_1(_this__u8e3s4, $this) {
|
|
314
|
+
var tmp0_subject = _this__u8e3s4;
|
|
315
|
+
var tmp;
|
|
316
|
+
if (tmp0_subject instanceof ParameterObject) {
|
|
317
|
+
tmp = _this__u8e3s4;
|
|
318
|
+
} else {
|
|
319
|
+
if (tmp0_subject instanceof ReferenceObject) {
|
|
320
|
+
var tmp1_elvis_lhs = resolveParameterObject(_this__u8e3s4, $this);
|
|
321
|
+
var tmp_0;
|
|
322
|
+
if (tmp1_elvis_lhs == null) {
|
|
323
|
+
var tmp0_error = 'Cannot resolve reference: ' + new Ref(_this__u8e3s4.b1d_1);
|
|
324
|
+
throw IllegalStateException_init_$Create$(toString(tmp0_error));
|
|
455
325
|
} else {
|
|
456
|
-
|
|
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;
|
|
326
|
+
tmp_0 = tmp1_elvis_lhs;
|
|
474
327
|
}
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
328
|
+
tmp = tmp_0;
|
|
329
|
+
} else {
|
|
330
|
+
noWhenBranchMatchedException();
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
return tmp;
|
|
334
|
+
}
|
|
335
|
+
function flatten(_this__u8e3s4, $this, name) {
|
|
336
|
+
var tmp0_subject = _this__u8e3s4.d1e_1;
|
|
337
|
+
var tmp0 = tmp0_subject == null ? -1 : tmp0_subject.q4_1;
|
|
338
|
+
var tmp;
|
|
339
|
+
switch (tmp0) {
|
|
340
|
+
case -1:
|
|
341
|
+
case 5:
|
|
342
|
+
var tmp1_safe_receiver = _this__u8e3s4.g1e_1;
|
|
343
|
+
var tmp_0;
|
|
344
|
+
if (tmp1_safe_receiver == null) {
|
|
345
|
+
tmp_0 = null;
|
|
482
346
|
} else {
|
|
483
|
-
var tmp$ret$
|
|
347
|
+
var tmp$ret$5;
|
|
484
348
|
// Inline function 'kotlin.collections.flatMap' call
|
|
485
|
-
var tmp$ret$
|
|
349
|
+
var tmp$ret$4;
|
|
486
350
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
487
|
-
var
|
|
488
|
-
var tmp$ret$
|
|
351
|
+
var tmp0_flatMapTo = ArrayList_init_$Create$();
|
|
352
|
+
var tmp$ret$0;
|
|
489
353
|
// Inline function 'kotlin.collections.iterator' call
|
|
490
|
-
tmp$ret$
|
|
491
|
-
var
|
|
492
|
-
while (
|
|
493
|
-
var
|
|
494
|
-
var tmp$ret$
|
|
495
|
-
// Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.
|
|
496
|
-
var tmp$ret$
|
|
354
|
+
tmp$ret$0 = tmp1_safe_receiver.u().c();
|
|
355
|
+
var tmp0_iterator = tmp$ret$0;
|
|
356
|
+
while (tmp0_iterator.d()) {
|
|
357
|
+
var element = tmp0_iterator.e();
|
|
358
|
+
var tmp$ret$3;
|
|
359
|
+
// Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.flatten.<anonymous>' call
|
|
360
|
+
var tmp$ret$1;
|
|
497
361
|
// Inline function 'kotlin.collections.component1' call
|
|
498
|
-
tmp$ret$
|
|
499
|
-
var
|
|
500
|
-
var tmp$ret$
|
|
362
|
+
tmp$ret$1 = element.v();
|
|
363
|
+
var key = tmp$ret$1;
|
|
364
|
+
var tmp$ret$2;
|
|
501
365
|
// Inline function 'kotlin.collections.component2' call
|
|
502
|
-
tmp$ret$
|
|
503
|
-
var
|
|
504
|
-
var
|
|
505
|
-
var
|
|
506
|
-
if (
|
|
507
|
-
|
|
366
|
+
tmp$ret$2 = element.w();
|
|
367
|
+
var value = tmp$ret$2;
|
|
368
|
+
var tmp0_subject_0 = value;
|
|
369
|
+
var tmp_1;
|
|
370
|
+
if (tmp0_subject_0 instanceof SchemaObject) {
|
|
371
|
+
var tmp1_subject = value.d1e_1;
|
|
372
|
+
var tmp0_0 = tmp1_subject == null ? -1 : tmp1_subject.q4_1;
|
|
373
|
+
tmp_1 = tmp0_0 === 4 ? emptyList() : flatten(value, $this, Common_getInstance().q1s([name, key]));
|
|
508
374
|
} else {
|
|
509
|
-
|
|
510
|
-
|
|
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)));
|
|
375
|
+
if (tmp0_subject_0 instanceof ReferenceObject) {
|
|
376
|
+
tmp_1 = emptyList();
|
|
526
377
|
} else {
|
|
527
|
-
|
|
378
|
+
noWhenBranchMatchedException();
|
|
528
379
|
}
|
|
529
|
-
tmp$ret$41 = tmp_11;
|
|
530
|
-
tmp$ret$42 = tmp$ret$41;
|
|
531
|
-
tmp_10 = tmp$ret$42;
|
|
532
380
|
}
|
|
533
|
-
|
|
534
|
-
tmp$ret$
|
|
535
|
-
|
|
536
|
-
addAll(tmp9_flatMapTo, list);
|
|
381
|
+
tmp$ret$3 = tmp_1;
|
|
382
|
+
var list = tmp$ret$3;
|
|
383
|
+
addAll(tmp0_flatMapTo, list);
|
|
537
384
|
}
|
|
538
|
-
tmp$ret$
|
|
539
|
-
tmp$ret$
|
|
540
|
-
|
|
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);
|
|
385
|
+
tmp$ret$4 = tmp0_flatMapTo;
|
|
386
|
+
tmp$ret$5 = tmp$ret$4;
|
|
387
|
+
tmp_0 = tmp$ret$5;
|
|
610
388
|
}
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
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;
|
|
389
|
+
|
|
390
|
+
var tmp2_elvis_lhs = tmp_0;
|
|
391
|
+
var fields = tmp2_elvis_lhs == null ? emptyList() : tmp2_elvis_lhs;
|
|
392
|
+
var tmp3_safe_receiver = _this__u8e3s4.g1e_1;
|
|
393
|
+
var tmp_2;
|
|
394
|
+
if (tmp3_safe_receiver == null) {
|
|
395
|
+
tmp_2 = null;
|
|
652
396
|
} else {
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
397
|
+
var tmp$ret$11;
|
|
398
|
+
// Inline function 'kotlin.collections.map' call
|
|
399
|
+
var tmp$ret$10;
|
|
400
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
401
|
+
var tmp1_mapTo = ArrayList_init_$Create$_0(tmp3_safe_receiver.f());
|
|
402
|
+
var tmp$ret$6;
|
|
403
|
+
// Inline function 'kotlin.collections.iterator' call
|
|
404
|
+
tmp$ret$6 = tmp3_safe_receiver.u().c();
|
|
405
|
+
var tmp0_iterator_0 = tmp$ret$6;
|
|
406
|
+
while (tmp0_iterator_0.d()) {
|
|
407
|
+
var item = tmp0_iterator_0.e();
|
|
408
|
+
var tmp$ret$9;
|
|
409
|
+
// Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.flatten.<anonymous>' call
|
|
410
|
+
var tmp$ret$7;
|
|
411
|
+
// Inline function 'kotlin.collections.component1' call
|
|
412
|
+
tmp$ret$7 = item.v();
|
|
413
|
+
var key_0 = tmp$ret$7;
|
|
414
|
+
var tmp$ret$8;
|
|
415
|
+
// Inline function 'kotlin.collections.component2' call
|
|
416
|
+
tmp$ret$8 = item.w();
|
|
417
|
+
var value_0 = tmp$ret$8;
|
|
418
|
+
var tmp0_subject_1 = value_0;
|
|
419
|
+
var tmp_3;
|
|
420
|
+
if (tmp0_subject_1 instanceof SchemaObject) {
|
|
421
|
+
var tmp1_subject_0 = value_0.d1e_1;
|
|
422
|
+
var tmp0_1 = tmp1_subject_0 == null ? -1 : tmp1_subject_0.q4_1;
|
|
423
|
+
var tmp_4;
|
|
424
|
+
switch (tmp0_1) {
|
|
425
|
+
case 0:
|
|
426
|
+
case 1:
|
|
427
|
+
case 2:
|
|
428
|
+
case 3:
|
|
429
|
+
var tmp_5 = value_0.d1e_1;
|
|
430
|
+
tmp_4 = new Primitive(toPrimitive(tmp_5 instanceof Type ? tmp_5 : THROW_CCE(), $this), false);
|
|
431
|
+
break;
|
|
432
|
+
case 4:
|
|
433
|
+
var tmp2_safe_receiver = value_0.e1e_1;
|
|
434
|
+
var resolve_0 = tmp2_safe_receiver == null ? null : resolve(tmp2_safe_receiver, $this);
|
|
435
|
+
var tmp3_safe_receiver_0 = resolve_0;
|
|
436
|
+
var type = tmp3_safe_receiver_0 == null ? null : tmp3_safe_receiver_0.d1e_1;
|
|
437
|
+
var tmp0_2 = type == null ? -1 : type.q4_1;
|
|
438
|
+
var tmp_6;
|
|
439
|
+
switch (tmp0_2) {
|
|
440
|
+
case 0:
|
|
441
|
+
case 1:
|
|
442
|
+
case 2:
|
|
443
|
+
case 3:
|
|
444
|
+
tmp_6 = new Primitive(toPrimitive(type, $this), true);
|
|
445
|
+
break;
|
|
446
|
+
default:
|
|
447
|
+
var items = value_0.e1e_1;
|
|
448
|
+
var tmp_7;
|
|
449
|
+
if (items instanceof ReferenceObject) {
|
|
450
|
+
tmp_7 = new Custom(getReference(items, $this), true);
|
|
451
|
+
} else {
|
|
452
|
+
tmp_7 = new Custom(name, true);
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
tmp_6 = tmp_7;
|
|
456
|
+
break;
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
tmp_4 = tmp_6;
|
|
460
|
+
break;
|
|
461
|
+
case 5:
|
|
462
|
+
tmp_4 = new Custom(Common_getInstance().q1s([name, key_0]), false);
|
|
463
|
+
break;
|
|
464
|
+
case 6:
|
|
465
|
+
throw new NotImplementedError();
|
|
466
|
+
case -1:
|
|
467
|
+
throw new NotImplementedError();
|
|
468
|
+
default:
|
|
469
|
+
noWhenBranchMatchedException();
|
|
470
|
+
break;
|
|
471
|
+
}
|
|
472
|
+
var reference = tmp_4;
|
|
473
|
+
var tmp_8 = new Identifier(key_0);
|
|
474
|
+
var tmp4_safe_receiver = _this__u8e3s4.b1e_1;
|
|
475
|
+
var tmp5_elvis_lhs = tmp4_safe_receiver == null ? null : contains(tmp4_safe_receiver, key_0);
|
|
476
|
+
tmp_3 = new SimpleProp(key_0, new Field(tmp_8, reference, !(tmp5_elvis_lhs == null ? false : tmp5_elvis_lhs)));
|
|
477
|
+
} else {
|
|
478
|
+
if (tmp0_subject_1 instanceof ReferenceObject) {
|
|
479
|
+
var tmp_9 = new Identifier(key_0);
|
|
480
|
+
var tmp_10 = new Custom(getReference(value_0, $this), false);
|
|
481
|
+
var tmp6_safe_receiver = _this__u8e3s4.b1e_1;
|
|
482
|
+
var tmp7_elvis_lhs = tmp6_safe_receiver == null ? null : contains(tmp6_safe_receiver, key_0);
|
|
483
|
+
tmp_3 = new SimpleProp(key_0, new Field(tmp_9, tmp_10, !(tmp7_elvis_lhs == null ? false : tmp7_elvis_lhs)));
|
|
484
|
+
} else {
|
|
485
|
+
noWhenBranchMatchedException();
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
tmp$ret$9 = tmp_3;
|
|
489
|
+
tmp1_mapTo.a(tmp$ret$9);
|
|
657
490
|
}
|
|
491
|
+
tmp$ret$10 = tmp1_mapTo;
|
|
492
|
+
tmp$ret$11 = tmp$ret$10;
|
|
493
|
+
tmp_2 = tmp$ret$11;
|
|
658
494
|
}
|
|
659
|
-
|
|
660
|
-
var
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
495
|
+
|
|
496
|
+
var tmp4_elvis_lhs = tmp_2;
|
|
497
|
+
tmp = plus(listOf(new SimpleSchema(name, tmp4_elvis_lhs == null ? emptyList() : tmp4_elvis_lhs)), fields);
|
|
498
|
+
break;
|
|
499
|
+
case 4:
|
|
500
|
+
var tmp5_safe_receiver = _this__u8e3s4.e1e_1;
|
|
501
|
+
var tmp_11;
|
|
502
|
+
if (tmp5_safe_receiver == null) {
|
|
503
|
+
tmp_11 = null;
|
|
504
|
+
} else {
|
|
505
|
+
var tmp$ret$13;
|
|
665
506
|
// Inline function 'kotlin.let' call
|
|
666
507
|
// Inline function 'kotlin.contracts.contract' call
|
|
667
|
-
|
|
668
|
-
|
|
508
|
+
var tmp$ret$12;
|
|
509
|
+
// Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.flatten.<anonymous>' call
|
|
510
|
+
var tmp0_subject_2 = tmp5_safe_receiver;
|
|
511
|
+
var tmp_12;
|
|
512
|
+
if (tmp0_subject_2 instanceof ReferenceObject) {
|
|
513
|
+
tmp_12 = emptyList();
|
|
514
|
+
} else {
|
|
515
|
+
if (tmp0_subject_2 instanceof SchemaObject) {
|
|
516
|
+
var tmp1_safe_receiver_0 = tmp5_safe_receiver.e1e_1;
|
|
517
|
+
tmp_12 = tmp1_safe_receiver_0 == null ? null : flatten_0(tmp1_safe_receiver_0, $this, Common_getInstance().q1s([name, 'array']));
|
|
518
|
+
} else {
|
|
519
|
+
noWhenBranchMatchedException();
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
tmp$ret$12 = tmp_12;
|
|
523
|
+
tmp$ret$13 = tmp$ret$12;
|
|
524
|
+
tmp_11 = tmp$ret$13;
|
|
669
525
|
}
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
526
|
+
|
|
527
|
+
var tmp6_elvis_lhs = tmp_11;
|
|
528
|
+
tmp = tmp6_elvis_lhs == null ? emptyList() : tmp6_elvis_lhs;
|
|
529
|
+
break;
|
|
530
|
+
default:
|
|
531
|
+
tmp = emptyList();
|
|
532
|
+
break;
|
|
674
533
|
}
|
|
675
|
-
|
|
676
|
-
return tmp1_elvis_lhs == null ? emptyList() : tmp1_elvis_lhs;
|
|
534
|
+
return tmp;
|
|
677
535
|
}
|
|
678
|
-
function
|
|
679
|
-
var
|
|
536
|
+
function flatten_0(_this__u8e3s4, $this, name) {
|
|
537
|
+
var tmp0_subject = _this__u8e3s4;
|
|
680
538
|
var tmp;
|
|
681
|
-
if (
|
|
682
|
-
tmp =
|
|
539
|
+
if (tmp0_subject instanceof SchemaObject) {
|
|
540
|
+
tmp = flatten(_this__u8e3s4, $this, name);
|
|
683
541
|
} else {
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
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;
|
|
542
|
+
if (tmp0_subject instanceof ReferenceObject) {
|
|
543
|
+
var tmp1_safe_receiver = resolveSchemaObject(_this__u8e3s4, $this);
|
|
544
|
+
var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.h3_1;
|
|
545
|
+
var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : flatten(tmp2_safe_receiver, $this, name);
|
|
697
546
|
var tmp_0;
|
|
698
|
-
if (
|
|
699
|
-
|
|
547
|
+
if (tmp3_elvis_lhs == null) {
|
|
548
|
+
throw IllegalStateException_init_$Create$('Reference not found');
|
|
700
549
|
} else {
|
|
701
|
-
|
|
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();
|
|
550
|
+
tmp_0 = tmp3_elvis_lhs;
|
|
717
551
|
}
|
|
552
|
+
tmp = tmp_0;
|
|
553
|
+
} else {
|
|
554
|
+
noWhenBranchMatchedException();
|
|
718
555
|
}
|
|
719
|
-
tmp$ret$2 = tmp0_mapNotNullTo;
|
|
720
|
-
tmp$ret$3 = tmp$ret$2;
|
|
721
|
-
tmp = tmp$ret$3;
|
|
722
556
|
}
|
|
723
|
-
|
|
724
|
-
return tmp1_elvis_lhs == null ? emptyList() : tmp1_elvis_lhs;
|
|
557
|
+
return tmp;
|
|
725
558
|
}
|
|
726
|
-
function
|
|
727
|
-
|
|
728
|
-
|
|
559
|
+
function SimpleProp(key, field) {
|
|
560
|
+
this.u1s_1 = key;
|
|
561
|
+
this.v1s_1 = field;
|
|
562
|
+
}
|
|
563
|
+
protoOf(SimpleProp).toString = function () {
|
|
564
|
+
return 'SimpleProp(key=' + this.u1s_1 + ', field=' + this.v1s_1 + ')';
|
|
565
|
+
};
|
|
566
|
+
protoOf(SimpleProp).hashCode = function () {
|
|
567
|
+
var result = getStringHashCode(this.u1s_1);
|
|
568
|
+
result = imul(result, 31) + this.v1s_1.hashCode() | 0;
|
|
569
|
+
return result;
|
|
570
|
+
};
|
|
571
|
+
protoOf(SimpleProp).equals = function (other) {
|
|
572
|
+
if (this === other)
|
|
573
|
+
return true;
|
|
574
|
+
if (!(other instanceof SimpleProp))
|
|
575
|
+
return false;
|
|
576
|
+
var tmp0_other_with_cast = other instanceof SimpleProp ? other : THROW_CCE();
|
|
577
|
+
if (!(this.u1s_1 === tmp0_other_with_cast.u1s_1))
|
|
578
|
+
return false;
|
|
579
|
+
if (!this.v1s_1.equals(tmp0_other_with_cast.v1s_1))
|
|
580
|
+
return false;
|
|
581
|
+
return true;
|
|
582
|
+
};
|
|
583
|
+
function SimpleSchema(name, properties) {
|
|
584
|
+
this.w1s_1 = name;
|
|
585
|
+
this.x1s_1 = properties;
|
|
586
|
+
}
|
|
587
|
+
protoOf(SimpleSchema).toString = function () {
|
|
588
|
+
return 'SimpleSchema(name=' + this.w1s_1 + ', properties=' + this.x1s_1 + ')';
|
|
589
|
+
};
|
|
590
|
+
protoOf(SimpleSchema).hashCode = function () {
|
|
591
|
+
var result = getStringHashCode(this.w1s_1);
|
|
592
|
+
result = imul(result, 31) + hashCode(this.x1s_1) | 0;
|
|
593
|
+
return result;
|
|
594
|
+
};
|
|
595
|
+
protoOf(SimpleSchema).equals = function (other) {
|
|
596
|
+
if (this === other)
|
|
597
|
+
return true;
|
|
598
|
+
if (!(other instanceof SimpleSchema))
|
|
599
|
+
return false;
|
|
600
|
+
var tmp0_other_with_cast = other instanceof SimpleSchema ? other : THROW_CCE();
|
|
601
|
+
if (!(this.w1s_1 === tmp0_other_with_cast.w1s_1))
|
|
602
|
+
return false;
|
|
603
|
+
if (!equals(this.x1s_1, tmp0_other_with_cast.x1s_1))
|
|
604
|
+
return false;
|
|
605
|
+
return true;
|
|
606
|
+
};
|
|
607
|
+
function toReference(_this__u8e3s4, $this) {
|
|
608
|
+
var type = _this__u8e3s4.d1e_1;
|
|
609
|
+
var tmp0 = type == null ? -1 : type.q4_1;
|
|
729
610
|
var tmp;
|
|
730
611
|
switch (tmp0) {
|
|
731
612
|
case 0:
|
|
732
|
-
tmp = Type_String_getInstance();
|
|
733
|
-
break;
|
|
734
613
|
case 2:
|
|
735
|
-
tmp = Type_Integer_getInstance();
|
|
736
|
-
break;
|
|
737
614
|
case 1:
|
|
738
|
-
tmp = Type_Integer_getInstance();
|
|
739
|
-
break;
|
|
740
615
|
case 3:
|
|
741
|
-
tmp =
|
|
616
|
+
tmp = new Primitive(toPrimitive(type, $this), false);
|
|
617
|
+
break;
|
|
618
|
+
case 4:
|
|
619
|
+
var tmp0_subject = _this__u8e3s4.e1e_1;
|
|
620
|
+
var tmp_0;
|
|
621
|
+
if (tmp0_subject instanceof ReferenceObject) {
|
|
622
|
+
var tmp_1 = Common_getInstance();
|
|
623
|
+
var tmp_2 = _this__u8e3s4.e1e_1;
|
|
624
|
+
tmp_0 = new Custom(tmp_1.q1s([getReference(tmp_2 instanceof ReferenceObject ? tmp_2 : THROW_CCE(), $this)]), true);
|
|
625
|
+
} else {
|
|
626
|
+
throw new NotImplementedError();
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
tmp = tmp_0;
|
|
742
630
|
break;
|
|
743
631
|
default:
|
|
744
|
-
throw
|
|
632
|
+
throw new NotImplementedError();
|
|
745
633
|
}
|
|
746
634
|
return tmp;
|
|
747
635
|
}
|
|
748
|
-
function
|
|
749
|
-
var
|
|
636
|
+
function toReference_0(_this__u8e3s4, $this) {
|
|
637
|
+
var tmp0_elvis_lhs = resolveSchemaObject(_this__u8e3s4, $this);
|
|
750
638
|
var tmp;
|
|
751
|
-
if (
|
|
752
|
-
|
|
753
|
-
|
|
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;
|
|
639
|
+
if (tmp0_elvis_lhs == null) {
|
|
640
|
+
var tmp0_error = 'Cannot resolve ref: ' + new Ref(_this__u8e3s4.b1d_1);
|
|
641
|
+
throw IllegalStateException_init_$Create$(toString(tmp0_error));
|
|
825
642
|
} else {
|
|
826
|
-
|
|
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;
|
|
643
|
+
tmp = tmp0_elvis_lhs;
|
|
836
644
|
}
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
var
|
|
841
|
-
|
|
842
|
-
|
|
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;
|
|
645
|
+
var resolved = tmp;
|
|
646
|
+
var tmp1_subject = resolved.h3_1.d1e_1;
|
|
647
|
+
var tmp0 = tmp1_subject == null ? -1 : tmp1_subject.q4_1;
|
|
648
|
+
var tmp_0;
|
|
649
|
+
if (tmp0 === 4) {
|
|
650
|
+
var items = resolved.h3_1.e1e_1;
|
|
853
651
|
var tmp_1;
|
|
854
|
-
if (
|
|
855
|
-
|
|
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;
|
|
652
|
+
if (items instanceof ReferenceObject) {
|
|
653
|
+
tmp_1 = new Custom(Common_getInstance().q1s([getReference(items, $this)]), true);
|
|
869
654
|
} else {
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
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();
|
|
655
|
+
if (items instanceof SchemaObject) {
|
|
656
|
+
tmp_1 = new Custom(Common_getInstance().q1s([getReference(resolved.g3_1, $this), 'Array']), true);
|
|
657
|
+
} else {
|
|
658
|
+
throw new NotImplementedError();
|
|
901
659
|
}
|
|
902
|
-
tmp = tmp_5;
|
|
903
|
-
} else {
|
|
904
|
-
noWhenBranchMatchedException();
|
|
905
660
|
}
|
|
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;
|
|
661
|
+
tmp_0 = tmp_1;
|
|
914
662
|
} else {
|
|
915
|
-
|
|
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
|
-
}
|
|
663
|
+
tmp_0 = new Custom(Common_getInstance().q1s([getReference(resolved.g3_1, $this)]), false);
|
|
921
664
|
}
|
|
922
|
-
return
|
|
665
|
+
return tmp_0;
|
|
923
666
|
}
|
|
924
|
-
function toOperationList(_this__u8e3s4) {
|
|
667
|
+
function toOperationList(_this__u8e3s4, $this) {
|
|
925
668
|
var tmp$ret$5;
|
|
926
669
|
// Inline function 'kotlin.collections.filter' call
|
|
927
670
|
var tmp$ret$2;
|
|
@@ -937,410 +680,1166 @@
|
|
|
937
680
|
var item = indexedObject[inductionVariable];
|
|
938
681
|
inductionVariable = inductionVariable + 1 | 0;
|
|
939
682
|
var tmp$ret$0;
|
|
940
|
-
// Inline function 'community.flock.wirespec.openapi.v2.toOperationList.<anonymous>' call
|
|
683
|
+
// Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.toOperationList.<anonymous>' call
|
|
941
684
|
var tmp0_subject = item;
|
|
942
685
|
var tmp0 = tmp0_subject.q4_1;
|
|
943
686
|
var tmp;
|
|
944
687
|
switch (tmp0) {
|
|
945
688
|
case 0:
|
|
946
|
-
tmp = _this__u8e3s4.
|
|
689
|
+
tmp = _this__u8e3s4.l1c_1;
|
|
947
690
|
break;
|
|
948
691
|
case 1:
|
|
949
|
-
tmp = _this__u8e3s4.
|
|
692
|
+
tmp = _this__u8e3s4.n1c_1;
|
|
950
693
|
break;
|
|
951
694
|
case 2:
|
|
952
|
-
tmp = _this__u8e3s4.
|
|
695
|
+
tmp = _this__u8e3s4.m1c_1;
|
|
953
696
|
break;
|
|
954
697
|
case 3:
|
|
955
|
-
tmp = _this__u8e3s4.
|
|
698
|
+
tmp = _this__u8e3s4.o1c_1;
|
|
956
699
|
break;
|
|
957
700
|
case 4:
|
|
958
|
-
tmp = _this__u8e3s4.
|
|
701
|
+
tmp = _this__u8e3s4.p1c_1;
|
|
959
702
|
break;
|
|
960
703
|
case 5:
|
|
961
|
-
tmp = _this__u8e3s4.
|
|
704
|
+
tmp = _this__u8e3s4.q1c_1;
|
|
962
705
|
break;
|
|
963
706
|
case 6:
|
|
964
|
-
tmp = _this__u8e3s4.
|
|
707
|
+
tmp = _this__u8e3s4.r1c_1;
|
|
965
708
|
break;
|
|
966
709
|
case 7:
|
|
967
|
-
tmp = _this__u8e3s4.
|
|
710
|
+
tmp = _this__u8e3s4.s1c_1;
|
|
968
711
|
break;
|
|
969
712
|
default:
|
|
970
713
|
noWhenBranchMatchedException();
|
|
971
714
|
break;
|
|
972
715
|
}
|
|
973
|
-
tmp$ret$0 = to(item, tmp);
|
|
974
|
-
tmp0_mapTo.a(tmp$ret$0);
|
|
716
|
+
tmp$ret$0 = to(item, tmp);
|
|
717
|
+
tmp0_mapTo.a(tmp$ret$0);
|
|
718
|
+
}
|
|
719
|
+
tmp$ret$1 = tmp0_mapTo;
|
|
720
|
+
tmp$ret$2 = tmp$ret$1;
|
|
721
|
+
var tmp3_filter = tmp$ret$2;
|
|
722
|
+
var tmp$ret$4;
|
|
723
|
+
// Inline function 'kotlin.collections.filterTo' call
|
|
724
|
+
var tmp2_filterTo = ArrayList_init_$Create$();
|
|
725
|
+
var tmp0_iterator = tmp3_filter.c();
|
|
726
|
+
while (tmp0_iterator.d()) {
|
|
727
|
+
var element = tmp0_iterator.e();
|
|
728
|
+
var tmp$ret$3;
|
|
729
|
+
// Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.toOperationList.<anonymous>' call
|
|
730
|
+
var value = element.j3();
|
|
731
|
+
tmp$ret$3 = !(value == null);
|
|
732
|
+
if (tmp$ret$3) {
|
|
733
|
+
tmp2_filterTo.a(element);
|
|
734
|
+
}
|
|
735
|
+
}
|
|
736
|
+
tmp$ret$4 = tmp2_filterTo;
|
|
737
|
+
tmp$ret$5 = tmp$ret$4;
|
|
738
|
+
return tmp$ret$5;
|
|
739
|
+
}
|
|
740
|
+
function getReference(_this__u8e3s4, $this) {
|
|
741
|
+
return split(_Ref___get_value__impl__kxavfe(_this__u8e3s4.b1d_1), ['/']).h(2);
|
|
742
|
+
}
|
|
743
|
+
function toPrimitive(_this__u8e3s4, $this) {
|
|
744
|
+
var tmp0_subject = _this__u8e3s4;
|
|
745
|
+
var tmp0 = tmp0_subject.q4_1;
|
|
746
|
+
var tmp;
|
|
747
|
+
switch (tmp0) {
|
|
748
|
+
case 0:
|
|
749
|
+
tmp = Type_String_getInstance();
|
|
750
|
+
break;
|
|
751
|
+
case 2:
|
|
752
|
+
tmp = Type_Integer_getInstance();
|
|
753
|
+
break;
|
|
754
|
+
case 1:
|
|
755
|
+
tmp = Type_Integer_getInstance();
|
|
756
|
+
break;
|
|
757
|
+
case 3:
|
|
758
|
+
tmp = Type_Boolean_getInstance();
|
|
759
|
+
break;
|
|
760
|
+
default:
|
|
761
|
+
throw IllegalStateException_init_$Create$('Type is not a primitive');
|
|
762
|
+
}
|
|
763
|
+
return tmp;
|
|
764
|
+
}
|
|
765
|
+
function toField(_this__u8e3s4, $this) {
|
|
766
|
+
var tmp$ret$7;
|
|
767
|
+
// Inline function 'kotlin.let' call
|
|
768
|
+
var tmp$ret$5;
|
|
769
|
+
// Inline function 'kotlin.let' call
|
|
770
|
+
var tmp0_let = resolve_1(_this__u8e3s4, $this);
|
|
771
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
772
|
+
var tmp$ret$4;
|
|
773
|
+
// Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.toField.<anonymous>' call
|
|
774
|
+
var type = tmp0_let.x1a_1;
|
|
775
|
+
var tmp0 = type == null ? -1 : type.q4_1;
|
|
776
|
+
var tmp;
|
|
777
|
+
switch (tmp0) {
|
|
778
|
+
case 0:
|
|
779
|
+
case 1:
|
|
780
|
+
case 2:
|
|
781
|
+
case 3:
|
|
782
|
+
var tmp$ret$1;
|
|
783
|
+
// Inline function 'kotlin.let' call
|
|
784
|
+
var tmp0_let_0 = toPrimitive(type, $this);
|
|
785
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
786
|
+
var tmp$ret$0;
|
|
787
|
+
// Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.toField.<anonymous>.<anonymous>' call
|
|
788
|
+
tmp$ret$0 = new Primitive(tmp0_let_0, false);
|
|
789
|
+
tmp$ret$1 = tmp$ret$0;
|
|
790
|
+
|
|
791
|
+
tmp = tmp$ret$1;
|
|
792
|
+
break;
|
|
793
|
+
case 4:
|
|
794
|
+
var tmp0_safe_receiver = tmp0_let.y1a_1;
|
|
795
|
+
var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : resolve(tmp0_safe_receiver, $this);
|
|
796
|
+
var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.d1e_1;
|
|
797
|
+
var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : toPrimitive(tmp2_safe_receiver, $this);
|
|
798
|
+
var tmp_0;
|
|
799
|
+
if (tmp3_safe_receiver == null) {
|
|
800
|
+
tmp_0 = null;
|
|
801
|
+
} else {
|
|
802
|
+
var tmp$ret$3;
|
|
803
|
+
// Inline function 'kotlin.let' call
|
|
804
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
805
|
+
var tmp$ret$2;
|
|
806
|
+
// Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.toField.<anonymous>.<anonymous>' call
|
|
807
|
+
tmp$ret$2 = new Primitive(tmp3_safe_receiver, true);
|
|
808
|
+
tmp$ret$3 = tmp$ret$2;
|
|
809
|
+
tmp_0 = tmp$ret$3;
|
|
810
|
+
}
|
|
811
|
+
|
|
812
|
+
var tmp4_elvis_lhs = tmp_0;
|
|
813
|
+
var tmp_1;
|
|
814
|
+
if (tmp4_elvis_lhs == null) {
|
|
815
|
+
throw new NotImplementedError();
|
|
816
|
+
} else {
|
|
817
|
+
tmp_1 = tmp4_elvis_lhs;
|
|
818
|
+
}
|
|
819
|
+
|
|
820
|
+
tmp = tmp_1;
|
|
821
|
+
break;
|
|
822
|
+
case 5:
|
|
823
|
+
throw new NotImplementedError();
|
|
824
|
+
case 6:
|
|
825
|
+
throw new NotImplementedError();
|
|
826
|
+
case -1:
|
|
827
|
+
throw new NotImplementedError();
|
|
828
|
+
default:
|
|
829
|
+
noWhenBranchMatchedException();
|
|
830
|
+
break;
|
|
831
|
+
}
|
|
832
|
+
tmp$ret$4 = tmp;
|
|
833
|
+
tmp$ret$5 = tmp$ret$4;
|
|
834
|
+
var tmp1_let = tmp$ret$5;
|
|
835
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
836
|
+
var tmp$ret$6;
|
|
837
|
+
// Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.toField.<anonymous>' call
|
|
838
|
+
var tmp_2 = new Identifier(_this__u8e3s4.s1a_1);
|
|
839
|
+
var tmp0_elvis_lhs = _this__u8e3s4.v1a_1;
|
|
840
|
+
tmp$ret$6 = new Field(tmp_2, tmp1_let, !(tmp0_elvis_lhs == null ? false : tmp0_elvis_lhs));
|
|
841
|
+
tmp$ret$7 = tmp$ret$6;
|
|
842
|
+
return tmp$ret$7;
|
|
843
|
+
}
|
|
844
|
+
function toSegments(_this__u8e3s4, $this, parameters) {
|
|
845
|
+
var tmp$ret$12;
|
|
846
|
+
// Inline function 'kotlin.collections.map' call
|
|
847
|
+
var tmp1_map = drop(split(_Path___get_value__impl__thmflc(_this__u8e3s4), ['/']), 1);
|
|
848
|
+
var tmp$ret$11;
|
|
849
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
850
|
+
var tmp0_mapTo = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp1_map, 10));
|
|
851
|
+
var tmp0_iterator = tmp1_map.c();
|
|
852
|
+
while (tmp0_iterator.d()) {
|
|
853
|
+
var item = tmp0_iterator.e();
|
|
854
|
+
var tmp$ret$10;
|
|
855
|
+
// Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.toSegments.<anonymous>' call
|
|
856
|
+
var tmp;
|
|
857
|
+
var tmp_0;
|
|
858
|
+
var tmp$ret$0;
|
|
859
|
+
// Inline function 'kotlin.text.isNotEmpty' call
|
|
860
|
+
tmp$ret$0 = charSequenceLength(item) > 0;
|
|
861
|
+
if (tmp$ret$0) {
|
|
862
|
+
tmp_0 = equals(new Char(charSequenceGet(item, 0)), new Char(_Char___init__impl__6a9atx(123)));
|
|
863
|
+
} else {
|
|
864
|
+
tmp_0 = false;
|
|
865
|
+
}
|
|
866
|
+
if (tmp_0) {
|
|
867
|
+
tmp = equals(new Char(charSequenceGet(item, item.length - 1 | 0)), new Char(_Char___init__impl__6a9atx(125)));
|
|
868
|
+
} else {
|
|
869
|
+
tmp = false;
|
|
870
|
+
}
|
|
871
|
+
var isParam = tmp;
|
|
872
|
+
var tmp_1;
|
|
873
|
+
if (isParam) {
|
|
874
|
+
var tmp$ret$2;
|
|
875
|
+
// Inline function 'kotlin.text.substring' call
|
|
876
|
+
var tmp0_substring = item.length - 1 | 0;
|
|
877
|
+
var tmp$ret$1;
|
|
878
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
879
|
+
tmp$ret$1 = item;
|
|
880
|
+
tmp$ret$2 = tmp$ret$1.substring(1, tmp0_substring);
|
|
881
|
+
var param = tmp$ret$2;
|
|
882
|
+
var tmp$ret$5;
|
|
883
|
+
// Inline function 'kotlin.collections.find' call
|
|
884
|
+
var tmp$ret$4;
|
|
885
|
+
$l$block: {
|
|
886
|
+
// Inline function 'kotlin.collections.firstOrNull' call
|
|
887
|
+
var tmp0_iterator_0 = parameters.c();
|
|
888
|
+
while (tmp0_iterator_0.d()) {
|
|
889
|
+
var element = tmp0_iterator_0.e();
|
|
890
|
+
var tmp$ret$3;
|
|
891
|
+
// Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.toSegments.<anonymous>.<anonymous>' call
|
|
892
|
+
tmp$ret$3 = element.s1a_1 === param;
|
|
893
|
+
if (tmp$ret$3) {
|
|
894
|
+
tmp$ret$4 = element;
|
|
895
|
+
break $l$block;
|
|
896
|
+
}
|
|
897
|
+
}
|
|
898
|
+
tmp$ret$4 = null;
|
|
899
|
+
}
|
|
900
|
+
tmp$ret$5 = tmp$ret$4;
|
|
901
|
+
var tmp0_safe_receiver = tmp$ret$5;
|
|
902
|
+
var tmp_2;
|
|
903
|
+
if (tmp0_safe_receiver == null) {
|
|
904
|
+
tmp_2 = null;
|
|
905
|
+
} else {
|
|
906
|
+
var tmp$ret$7;
|
|
907
|
+
// Inline function 'kotlin.let' call
|
|
908
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
909
|
+
var tmp$ret$6;
|
|
910
|
+
// Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.toSegments.<anonymous>.<anonymous>' call
|
|
911
|
+
var tmp0_safe_receiver_0 = tmp0_safe_receiver.x1a_1;
|
|
912
|
+
tmp$ret$6 = tmp0_safe_receiver_0 == null ? null : toPrimitive(tmp0_safe_receiver_0, $this);
|
|
913
|
+
tmp$ret$7 = tmp$ret$6;
|
|
914
|
+
tmp_2 = tmp$ret$7;
|
|
915
|
+
}
|
|
916
|
+
var tmp1_safe_receiver = tmp_2;
|
|
917
|
+
var tmp_3;
|
|
918
|
+
if (tmp1_safe_receiver == null) {
|
|
919
|
+
tmp_3 = null;
|
|
920
|
+
} else {
|
|
921
|
+
var tmp$ret$9;
|
|
922
|
+
// Inline function 'kotlin.let' call
|
|
923
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
924
|
+
var tmp$ret$8;
|
|
925
|
+
// Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.toSegments.<anonymous>.<anonymous>' call
|
|
926
|
+
tmp$ret$8 = new Param(new Identifier(param), new Primitive(tmp1_safe_receiver, false));
|
|
927
|
+
tmp$ret$9 = tmp$ret$8;
|
|
928
|
+
tmp_3 = tmp$ret$9;
|
|
929
|
+
}
|
|
930
|
+
var tmp2_elvis_lhs = tmp_3;
|
|
931
|
+
var tmp_4;
|
|
932
|
+
if (tmp2_elvis_lhs == null) {
|
|
933
|
+
var tmp1_error = ' Declared path parameter ' + param + ' needs to be defined as a path parameter in path or operation level';
|
|
934
|
+
throw IllegalStateException_init_$Create$(toString(tmp1_error));
|
|
935
|
+
} else {
|
|
936
|
+
tmp_4 = tmp2_elvis_lhs;
|
|
937
|
+
}
|
|
938
|
+
tmp_1 = tmp_4;
|
|
939
|
+
} else {
|
|
940
|
+
tmp_1 = new Literal(item);
|
|
941
|
+
}
|
|
942
|
+
tmp$ret$10 = tmp_1;
|
|
943
|
+
tmp0_mapTo.a(tmp$ret$10);
|
|
975
944
|
}
|
|
976
|
-
tmp$ret$
|
|
977
|
-
tmp$ret$
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
var
|
|
982
|
-
var
|
|
945
|
+
tmp$ret$11 = tmp0_mapTo;
|
|
946
|
+
tmp$ret$12 = tmp$ret$11;
|
|
947
|
+
return tmp$ret$12;
|
|
948
|
+
}
|
|
949
|
+
function toName(_this__u8e3s4, $this, segments, method) {
|
|
950
|
+
var tmp0_safe_receiver = _this__u8e3s4;
|
|
951
|
+
var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.w1b_1;
|
|
952
|
+
var tmp;
|
|
953
|
+
if (tmp1_safe_receiver == null) {
|
|
954
|
+
tmp = null;
|
|
955
|
+
} else {
|
|
956
|
+
var tmp$ret$1;
|
|
957
|
+
// Inline function 'kotlin.let' call
|
|
958
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
959
|
+
var tmp$ret$0;
|
|
960
|
+
// Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.toName.<anonymous>' call
|
|
961
|
+
tmp$ret$0 = Common_getInstance().q1s([tmp1_safe_receiver]);
|
|
962
|
+
tmp$ret$1 = tmp$ret$0;
|
|
963
|
+
tmp = tmp$ret$1;
|
|
964
|
+
}
|
|
965
|
+
var tmp2_elvis_lhs = tmp;
|
|
966
|
+
var tmp_0;
|
|
967
|
+
if (tmp2_elvis_lhs == null) {
|
|
968
|
+
var tmp$ret$3;
|
|
969
|
+
// Inline function 'kotlin.let' call
|
|
970
|
+
var tmp0_let = joinToString_0(segments, '', VOID, VOID, VOID, VOID, OpenApiParser$toName$lambda);
|
|
971
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
972
|
+
var tmp$ret$2;
|
|
973
|
+
// Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.toName.<anonymous>' call
|
|
974
|
+
tmp$ret$2 = tmp0_let + method.p4_1;
|
|
975
|
+
tmp$ret$3 = tmp$ret$2;
|
|
976
|
+
tmp_0 = tmp$ret$3;
|
|
977
|
+
} else {
|
|
978
|
+
tmp_0 = tmp2_elvis_lhs;
|
|
979
|
+
}
|
|
980
|
+
return tmp_0;
|
|
981
|
+
}
|
|
982
|
+
function FlattenRequest(path, pathItem, method, operation, type) {
|
|
983
|
+
this.y1s_1 = path;
|
|
984
|
+
this.z1s_1 = pathItem;
|
|
985
|
+
this.a1t_1 = method;
|
|
986
|
+
this.b1t_1 = operation;
|
|
987
|
+
this.c1t_1 = type;
|
|
988
|
+
}
|
|
989
|
+
protoOf(FlattenRequest).toString = function () {
|
|
990
|
+
return 'FlattenRequest(path=' + new Path(this.y1s_1) + ', pathItem=' + this.z1s_1 + ', method=' + this.a1t_1 + ', operation=' + this.b1t_1 + ', type=' + this.c1t_1 + ')';
|
|
991
|
+
};
|
|
992
|
+
protoOf(FlattenRequest).hashCode = function () {
|
|
993
|
+
var result = Path__hashCode_impl_go73kd(this.y1s_1);
|
|
994
|
+
result = imul(result, 31) + this.z1s_1.hashCode() | 0;
|
|
995
|
+
result = imul(result, 31) + this.a1t_1.hashCode() | 0;
|
|
996
|
+
result = imul(result, 31) + this.b1t_1.hashCode() | 0;
|
|
997
|
+
result = imul(result, 31) + getStringHashCode(this.c1t_1) | 0;
|
|
998
|
+
return result;
|
|
999
|
+
};
|
|
1000
|
+
protoOf(FlattenRequest).equals = function (other) {
|
|
1001
|
+
if (this === other)
|
|
1002
|
+
return true;
|
|
1003
|
+
if (!(other instanceof FlattenRequest))
|
|
1004
|
+
return false;
|
|
1005
|
+
var tmp0_other_with_cast = other instanceof FlattenRequest ? other : THROW_CCE();
|
|
1006
|
+
if (!(this.y1s_1 === tmp0_other_with_cast.y1s_1))
|
|
1007
|
+
return false;
|
|
1008
|
+
if (!this.z1s_1.equals(tmp0_other_with_cast.z1s_1))
|
|
1009
|
+
return false;
|
|
1010
|
+
if (!this.a1t_1.equals(tmp0_other_with_cast.a1t_1))
|
|
1011
|
+
return false;
|
|
1012
|
+
if (!this.b1t_1.equals(tmp0_other_with_cast.b1t_1))
|
|
1013
|
+
return false;
|
|
1014
|
+
if (!(this.c1t_1 === tmp0_other_with_cast.c1t_1))
|
|
1015
|
+
return false;
|
|
1016
|
+
return true;
|
|
1017
|
+
};
|
|
1018
|
+
function flatMapRequests(_this__u8e3s4, $this, f) {
|
|
1019
|
+
var tmp$ret$16;
|
|
1020
|
+
// Inline function 'kotlin.collections.flatMap' call
|
|
1021
|
+
var tmp$ret$13;
|
|
1022
|
+
// Inline function 'kotlin.collections.flatMap' call
|
|
1023
|
+
var tmp1_flatMap = _this__u8e3s4.h1a_1;
|
|
1024
|
+
var tmp$ret$12;
|
|
1025
|
+
// Inline function 'kotlin.collections.flatMapTo' call
|
|
1026
|
+
var tmp0_flatMapTo = ArrayList_init_$Create$();
|
|
1027
|
+
var tmp$ret$0;
|
|
1028
|
+
// Inline function 'kotlin.collections.iterator' call
|
|
1029
|
+
tmp$ret$0 = tmp1_flatMap.u().c();
|
|
1030
|
+
var tmp0_iterator = tmp$ret$0;
|
|
983
1031
|
while (tmp0_iterator.d()) {
|
|
984
1032
|
var element = tmp0_iterator.e();
|
|
985
|
-
var tmp$ret$
|
|
986
|
-
// Inline function 'community.flock.wirespec.openapi.v2.
|
|
987
|
-
var
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
1033
|
+
var tmp$ret$11;
|
|
1034
|
+
// Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.flatMapRequests.<anonymous>' call
|
|
1035
|
+
var tmp$ret$1;
|
|
1036
|
+
// Inline function 'kotlin.collections.component1' call
|
|
1037
|
+
tmp$ret$1 = element.v().y1c_1;
|
|
1038
|
+
var path = tmp$ret$1;
|
|
1039
|
+
var tmp$ret$2;
|
|
1040
|
+
// Inline function 'kotlin.collections.component2' call
|
|
1041
|
+
tmp$ret$2 = element.w();
|
|
1042
|
+
var pathItem = tmp$ret$2;
|
|
1043
|
+
var tmp$ret$10;
|
|
1044
|
+
// Inline function 'kotlin.collections.flatMap' call
|
|
1045
|
+
var tmp1_flatMap_0 = toOperationList(pathItem, $this);
|
|
1046
|
+
var tmp$ret$9;
|
|
1047
|
+
// Inline function 'kotlin.collections.flatMapTo' call
|
|
1048
|
+
var tmp0_flatMapTo_0 = ArrayList_init_$Create$();
|
|
1049
|
+
var tmp0_iterator_0 = tmp1_flatMap_0.c();
|
|
1050
|
+
while (tmp0_iterator_0.d()) {
|
|
1051
|
+
var element_0 = tmp0_iterator_0.e();
|
|
1052
|
+
var tmp$ret$8;
|
|
1053
|
+
// Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.flatMapRequests.<anonymous>.<anonymous>' call
|
|
1054
|
+
var method = element_0.i3();
|
|
1055
|
+
var operation = element_0.j3();
|
|
1056
|
+
var tmp0_safe_receiver = operation;
|
|
1057
|
+
var tmp;
|
|
1058
|
+
if (tmp0_safe_receiver == null) {
|
|
1059
|
+
tmp = null;
|
|
1060
|
+
} else {
|
|
1061
|
+
var tmp$ret$7;
|
|
1062
|
+
// Inline function 'kotlin.let' call
|
|
1063
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
1064
|
+
var tmp$ret$6;
|
|
1065
|
+
// Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.flatMapRequests.<anonymous>.<anonymous>.<anonymous>' call
|
|
1066
|
+
var tmp0_safe_receiver_0 = _this__u8e3s4.f1a_1;
|
|
1067
|
+
var tmp_0;
|
|
1068
|
+
if (tmp0_safe_receiver_0 == null) {
|
|
1069
|
+
tmp_0 = null;
|
|
1070
|
+
} else {
|
|
1071
|
+
var tmp$ret$5;
|
|
1072
|
+
// Inline function 'kotlin.collections.map' call
|
|
1073
|
+
var tmp$ret$4;
|
|
1074
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
1075
|
+
var tmp0_mapTo = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp0_safe_receiver_0, 10));
|
|
1076
|
+
var tmp0_iterator_1 = tmp0_safe_receiver_0.c();
|
|
1077
|
+
while (tmp0_iterator_1.d()) {
|
|
1078
|
+
var item = tmp0_iterator_1.e();
|
|
1079
|
+
var tmp$ret$3;
|
|
1080
|
+
// Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.flatMapRequests.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
|
|
1081
|
+
tmp$ret$3 = new FlattenRequest(path, pathItem, method, operation, item);
|
|
1082
|
+
tmp0_mapTo.a(tmp$ret$3);
|
|
1083
|
+
}
|
|
1084
|
+
tmp$ret$4 = tmp0_mapTo;
|
|
1085
|
+
tmp$ret$5 = tmp$ret$4;
|
|
1086
|
+
tmp_0 = tmp$ret$5;
|
|
1087
|
+
}
|
|
1088
|
+
tmp$ret$6 = tmp_0;
|
|
1089
|
+
tmp$ret$7 = tmp$ret$6;
|
|
1090
|
+
tmp = tmp$ret$7;
|
|
1091
|
+
}
|
|
1092
|
+
var tmp1_elvis_lhs = tmp;
|
|
1093
|
+
tmp$ret$8 = tmp1_elvis_lhs == null ? emptyList() : tmp1_elvis_lhs;
|
|
1094
|
+
var list = tmp$ret$8;
|
|
1095
|
+
addAll(tmp0_flatMapTo_0, list);
|
|
991
1096
|
}
|
|
1097
|
+
tmp$ret$9 = tmp0_flatMapTo_0;
|
|
1098
|
+
tmp$ret$10 = tmp$ret$9;
|
|
1099
|
+
tmp$ret$11 = tmp$ret$10;
|
|
1100
|
+
var list_0 = tmp$ret$11;
|
|
1101
|
+
addAll(tmp0_flatMapTo, list_0);
|
|
992
1102
|
}
|
|
993
|
-
tmp$ret$
|
|
994
|
-
tmp$ret$
|
|
995
|
-
|
|
1103
|
+
tmp$ret$12 = tmp0_flatMapTo;
|
|
1104
|
+
tmp$ret$13 = tmp$ret$12;
|
|
1105
|
+
var tmp3_flatMap = tmp$ret$13;
|
|
1106
|
+
var tmp$ret$15;
|
|
1107
|
+
// Inline function 'kotlin.collections.flatMapTo' call
|
|
1108
|
+
var tmp2_flatMapTo = ArrayList_init_$Create$();
|
|
1109
|
+
var tmp0_iterator_2 = tmp3_flatMap.c();
|
|
1110
|
+
while (tmp0_iterator_2.d()) {
|
|
1111
|
+
var element_1 = tmp0_iterator_2.e();
|
|
1112
|
+
var tmp$ret$14;
|
|
1113
|
+
// Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.flatMapRequests.<anonymous>' call
|
|
1114
|
+
tmp$ret$14 = f(element_1);
|
|
1115
|
+
var list_1 = tmp$ret$14;
|
|
1116
|
+
addAll(tmp2_flatMapTo, list_1);
|
|
1117
|
+
}
|
|
1118
|
+
tmp$ret$15 = tmp2_flatMapTo;
|
|
1119
|
+
tmp$ret$16 = tmp$ret$15;
|
|
1120
|
+
return tmp$ret$16;
|
|
996
1121
|
}
|
|
997
|
-
function
|
|
998
|
-
this.
|
|
999
|
-
this.
|
|
1122
|
+
function FlattenResponse(path, pathItem, method, operation, statusCode, response, type) {
|
|
1123
|
+
this.d1t_1 = path;
|
|
1124
|
+
this.e1t_1 = pathItem;
|
|
1125
|
+
this.f1t_1 = method;
|
|
1126
|
+
this.g1t_1 = operation;
|
|
1127
|
+
this.h1t_1 = statusCode;
|
|
1128
|
+
this.i1t_1 = response;
|
|
1129
|
+
this.j1t_1 = type;
|
|
1000
1130
|
}
|
|
1001
|
-
protoOf(
|
|
1002
|
-
return '
|
|
1131
|
+
protoOf(FlattenResponse).toString = function () {
|
|
1132
|
+
return 'FlattenResponse(path=' + new Path(this.d1t_1) + ', pathItem=' + this.e1t_1 + ', method=' + this.f1t_1 + ', operation=' + this.g1t_1 + ', statusCode=' + new StatusCode(this.h1t_1) + ', response=' + this.i1t_1 + ', type=' + this.j1t_1 + ')';
|
|
1003
1133
|
};
|
|
1004
|
-
protoOf(
|
|
1005
|
-
var result =
|
|
1006
|
-
result = imul(result, 31) + hashCode(
|
|
1134
|
+
protoOf(FlattenResponse).hashCode = function () {
|
|
1135
|
+
var result = Path__hashCode_impl_go73kd(this.d1t_1);
|
|
1136
|
+
result = imul(result, 31) + this.e1t_1.hashCode() | 0;
|
|
1137
|
+
result = imul(result, 31) + this.f1t_1.hashCode() | 0;
|
|
1138
|
+
result = imul(result, 31) + this.g1t_1.hashCode() | 0;
|
|
1139
|
+
result = imul(result, 31) + StatusCode__hashCode_impl_fevhvx(this.h1t_1) | 0;
|
|
1140
|
+
result = imul(result, 31) + hashCode(this.i1t_1) | 0;
|
|
1141
|
+
result = imul(result, 31) + getStringHashCode(this.j1t_1) | 0;
|
|
1007
1142
|
return result;
|
|
1008
1143
|
};
|
|
1009
|
-
protoOf(
|
|
1144
|
+
protoOf(FlattenResponse).equals = function (other) {
|
|
1010
1145
|
if (this === other)
|
|
1011
1146
|
return true;
|
|
1012
|
-
if (!(other instanceof
|
|
1147
|
+
if (!(other instanceof FlattenResponse))
|
|
1013
1148
|
return false;
|
|
1014
|
-
var tmp0_other_with_cast = other instanceof
|
|
1015
|
-
if (!(this.
|
|
1149
|
+
var tmp0_other_with_cast = other instanceof FlattenResponse ? other : THROW_CCE();
|
|
1150
|
+
if (!(this.d1t_1 === tmp0_other_with_cast.d1t_1))
|
|
1151
|
+
return false;
|
|
1152
|
+
if (!this.e1t_1.equals(tmp0_other_with_cast.e1t_1))
|
|
1153
|
+
return false;
|
|
1154
|
+
if (!this.f1t_1.equals(tmp0_other_with_cast.f1t_1))
|
|
1155
|
+
return false;
|
|
1156
|
+
if (!this.g1t_1.equals(tmp0_other_with_cast.g1t_1))
|
|
1016
1157
|
return false;
|
|
1017
|
-
if (!
|
|
1158
|
+
if (!(this.h1t_1 === tmp0_other_with_cast.h1t_1))
|
|
1159
|
+
return false;
|
|
1160
|
+
if (!equals(this.i1t_1, tmp0_other_with_cast.i1t_1))
|
|
1161
|
+
return false;
|
|
1162
|
+
if (!(this.j1t_1 === tmp0_other_with_cast.j1t_1))
|
|
1018
1163
|
return false;
|
|
1019
1164
|
return true;
|
|
1020
1165
|
};
|
|
1021
|
-
function
|
|
1022
|
-
var
|
|
1023
|
-
|
|
1024
|
-
var tmp;
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1166
|
+
function flatMapResponses(_this__u8e3s4, $this, f) {
|
|
1167
|
+
var tmp$ret$20;
|
|
1168
|
+
// Inline function 'kotlin.collections.flatMap' call
|
|
1169
|
+
var tmp$ret$17;
|
|
1170
|
+
// Inline function 'kotlin.collections.flatMap' call
|
|
1171
|
+
var tmp1_flatMap = _this__u8e3s4.h1a_1;
|
|
1172
|
+
var tmp$ret$16;
|
|
1173
|
+
// Inline function 'kotlin.collections.flatMapTo' call
|
|
1174
|
+
var tmp0_flatMapTo = ArrayList_init_$Create$();
|
|
1175
|
+
var tmp$ret$0;
|
|
1176
|
+
// Inline function 'kotlin.collections.iterator' call
|
|
1177
|
+
tmp$ret$0 = tmp1_flatMap.u().c();
|
|
1178
|
+
var tmp0_iterator = tmp$ret$0;
|
|
1179
|
+
while (tmp0_iterator.d()) {
|
|
1180
|
+
var element = tmp0_iterator.e();
|
|
1181
|
+
var tmp$ret$15;
|
|
1182
|
+
// Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.flatMapResponses.<anonymous>' call
|
|
1183
|
+
var tmp$ret$1;
|
|
1184
|
+
// Inline function 'kotlin.collections.component1' call
|
|
1185
|
+
tmp$ret$1 = element.v().y1c_1;
|
|
1186
|
+
var path = tmp$ret$1;
|
|
1187
|
+
var tmp$ret$2;
|
|
1188
|
+
// Inline function 'kotlin.collections.component2' call
|
|
1189
|
+
tmp$ret$2 = element.w();
|
|
1190
|
+
var pathItem = tmp$ret$2;
|
|
1191
|
+
var tmp$ret$14;
|
|
1192
|
+
// Inline function 'kotlin.collections.flatMap' call
|
|
1193
|
+
var tmp1_flatMap_0 = toOperationList(pathItem, $this);
|
|
1194
|
+
var tmp$ret$13;
|
|
1195
|
+
// Inline function 'kotlin.collections.flatMapTo' call
|
|
1196
|
+
var tmp0_flatMapTo_0 = ArrayList_init_$Create$();
|
|
1197
|
+
var tmp0_iterator_0 = tmp1_flatMap_0.c();
|
|
1198
|
+
while (tmp0_iterator_0.d()) {
|
|
1199
|
+
var element_0 = tmp0_iterator_0.e();
|
|
1200
|
+
var tmp$ret$12;
|
|
1201
|
+
// Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.flatMapResponses.<anonymous>.<anonymous>' call
|
|
1202
|
+
var method = element_0.i3();
|
|
1203
|
+
var operation = element_0.j3();
|
|
1204
|
+
var tmp0_safe_receiver = operation;
|
|
1205
|
+
var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.a1c_1;
|
|
1206
|
+
var tmp;
|
|
1030
1207
|
if (tmp1_safe_receiver == null) {
|
|
1031
|
-
|
|
1208
|
+
tmp = null;
|
|
1032
1209
|
} else {
|
|
1033
|
-
var tmp$ret$
|
|
1210
|
+
var tmp$ret$11;
|
|
1034
1211
|
// Inline function 'kotlin.collections.flatMap' call
|
|
1035
|
-
var tmp$ret$
|
|
1212
|
+
var tmp$ret$10;
|
|
1036
1213
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
1037
|
-
var
|
|
1038
|
-
var tmp$ret$
|
|
1214
|
+
var tmp0_flatMapTo_1 = ArrayList_init_$Create$();
|
|
1215
|
+
var tmp$ret$3;
|
|
1039
1216
|
// Inline function 'kotlin.collections.iterator' call
|
|
1040
|
-
tmp$ret$
|
|
1041
|
-
var
|
|
1042
|
-
while (
|
|
1043
|
-
var
|
|
1044
|
-
var tmp$ret$
|
|
1045
|
-
// Inline function 'community.flock.wirespec.openapi.v2.
|
|
1046
|
-
var tmp$ret$
|
|
1217
|
+
tmp$ret$3 = tmp1_safe_receiver.u().c();
|
|
1218
|
+
var tmp0_iterator_1 = tmp$ret$3;
|
|
1219
|
+
while (tmp0_iterator_1.d()) {
|
|
1220
|
+
var element_1 = tmp0_iterator_1.e();
|
|
1221
|
+
var tmp$ret$9;
|
|
1222
|
+
// Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.flatMapResponses.<anonymous>.<anonymous>.<anonymous>' call
|
|
1223
|
+
var tmp$ret$4;
|
|
1047
1224
|
// Inline function 'kotlin.collections.component1' call
|
|
1048
|
-
tmp$ret$
|
|
1049
|
-
var
|
|
1050
|
-
var tmp$ret$
|
|
1225
|
+
tmp$ret$4 = element_1.v().l1e_1;
|
|
1226
|
+
var statusCode = tmp$ret$4;
|
|
1227
|
+
var tmp$ret$5;
|
|
1051
1228
|
// Inline function 'kotlin.collections.component2' call
|
|
1052
|
-
tmp$ret$
|
|
1053
|
-
var
|
|
1054
|
-
var
|
|
1055
|
-
var
|
|
1056
|
-
if (
|
|
1057
|
-
|
|
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);
|
|
1229
|
+
tmp$ret$5 = element_1.w();
|
|
1230
|
+
var response = tmp$ret$5;
|
|
1231
|
+
var tmp0_safe_receiver_0 = _this__u8e3s4.g1a_1;
|
|
1232
|
+
var tmp_0;
|
|
1233
|
+
if (tmp0_safe_receiver_0 == null) {
|
|
1234
|
+
tmp_0 = null;
|
|
1060
1235
|
} else {
|
|
1061
|
-
|
|
1062
|
-
|
|
1236
|
+
var tmp$ret$8;
|
|
1237
|
+
// Inline function 'kotlin.collections.map' call
|
|
1238
|
+
var tmp$ret$7;
|
|
1239
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
1240
|
+
var tmp0_mapTo = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp0_safe_receiver_0, 10));
|
|
1241
|
+
var tmp0_iterator_2 = tmp0_safe_receiver_0.c();
|
|
1242
|
+
while (tmp0_iterator_2.d()) {
|
|
1243
|
+
var item = tmp0_iterator_2.e();
|
|
1244
|
+
var tmp$ret$6;
|
|
1245
|
+
// Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.flatMapResponses.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
|
|
1246
|
+
tmp$ret$6 = new FlattenResponse(path, pathItem, method, operation, statusCode, response, item);
|
|
1247
|
+
tmp0_mapTo.a(tmp$ret$6);
|
|
1248
|
+
}
|
|
1249
|
+
tmp$ret$7 = tmp0_mapTo;
|
|
1250
|
+
tmp$ret$8 = tmp$ret$7;
|
|
1251
|
+
tmp_0 = tmp$ret$8;
|
|
1252
|
+
}
|
|
1253
|
+
var tmp1_elvis_lhs = tmp_0;
|
|
1254
|
+
tmp$ret$9 = tmp1_elvis_lhs == null ? emptyList() : tmp1_elvis_lhs;
|
|
1255
|
+
var list = tmp$ret$9;
|
|
1256
|
+
addAll(tmp0_flatMapTo_1, list);
|
|
1257
|
+
}
|
|
1258
|
+
tmp$ret$10 = tmp0_flatMapTo_1;
|
|
1259
|
+
tmp$ret$11 = tmp$ret$10;
|
|
1260
|
+
tmp = tmp$ret$11;
|
|
1261
|
+
}
|
|
1262
|
+
var tmp2_elvis_lhs = tmp;
|
|
1263
|
+
tmp$ret$12 = tmp2_elvis_lhs == null ? emptyList() : tmp2_elvis_lhs;
|
|
1264
|
+
var list_0 = tmp$ret$12;
|
|
1265
|
+
addAll(tmp0_flatMapTo_0, list_0);
|
|
1266
|
+
}
|
|
1267
|
+
tmp$ret$13 = tmp0_flatMapTo_0;
|
|
1268
|
+
tmp$ret$14 = tmp$ret$13;
|
|
1269
|
+
tmp$ret$15 = tmp$ret$14;
|
|
1270
|
+
var list_1 = tmp$ret$15;
|
|
1271
|
+
addAll(tmp0_flatMapTo, list_1);
|
|
1272
|
+
}
|
|
1273
|
+
tmp$ret$16 = tmp0_flatMapTo;
|
|
1274
|
+
tmp$ret$17 = tmp$ret$16;
|
|
1275
|
+
var tmp3_flatMap = tmp$ret$17;
|
|
1276
|
+
var tmp$ret$19;
|
|
1277
|
+
// Inline function 'kotlin.collections.flatMapTo' call
|
|
1278
|
+
var tmp2_flatMapTo = ArrayList_init_$Create$();
|
|
1279
|
+
var tmp0_iterator_3 = tmp3_flatMap.c();
|
|
1280
|
+
while (tmp0_iterator_3.d()) {
|
|
1281
|
+
var element_2 = tmp0_iterator_3.e();
|
|
1282
|
+
var tmp$ret$18;
|
|
1283
|
+
// Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.flatMapResponses.<anonymous>' call
|
|
1284
|
+
tmp$ret$18 = f(element_2);
|
|
1285
|
+
var list_2 = tmp$ret$18;
|
|
1286
|
+
addAll(tmp2_flatMapTo, list_2);
|
|
1287
|
+
}
|
|
1288
|
+
tmp$ret$19 = tmp2_flatMapTo;
|
|
1289
|
+
tmp$ret$20 = tmp$ret$19;
|
|
1290
|
+
return tmp$ret$20;
|
|
1291
|
+
}
|
|
1292
|
+
function OpenApiParser$parse$lambda(this$0) {
|
|
1293
|
+
return function (req) {
|
|
1294
|
+
var parameters = plus(resolveParameters_0(req.z1s_1, this$0), resolveParameters(req.b1t_1, this$0));
|
|
1295
|
+
var segments = toSegments(req.y1s_1, this$0, parameters);
|
|
1296
|
+
var name = toName(req.b1t_1, this$0, segments, req.a1t_1);
|
|
1297
|
+
var tmp$ret$5;
|
|
1298
|
+
// Inline function 'kotlin.collections.map' call
|
|
1299
|
+
var tmp$ret$2;
|
|
1300
|
+
// Inline function 'kotlin.collections.filter' call
|
|
1301
|
+
var tmp$ret$1;
|
|
1302
|
+
// Inline function 'kotlin.collections.filterTo' call
|
|
1303
|
+
var tmp0_filterTo = ArrayList_init_$Create$();
|
|
1304
|
+
var tmp0_iterator = parameters.c();
|
|
1305
|
+
while (tmp0_iterator.d()) {
|
|
1306
|
+
var element = tmp0_iterator.e();
|
|
1307
|
+
var tmp$ret$0;
|
|
1308
|
+
// Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.parse.<anonymous>.<anonymous>' call
|
|
1309
|
+
tmp$ret$0 = element.t1a_1.equals(ParameterLocation_QUERY_getInstance());
|
|
1310
|
+
if (tmp$ret$0) {
|
|
1311
|
+
tmp0_filterTo.a(element);
|
|
1312
|
+
}
|
|
1313
|
+
}
|
|
1314
|
+
tmp$ret$1 = tmp0_filterTo;
|
|
1315
|
+
tmp$ret$2 = tmp$ret$1;
|
|
1316
|
+
var tmp2_map = tmp$ret$2;
|
|
1317
|
+
var tmp$ret$4;
|
|
1318
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
1319
|
+
var tmp1_mapTo = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp2_map, 10));
|
|
1320
|
+
var tmp0_iterator_0 = tmp2_map.c();
|
|
1321
|
+
while (tmp0_iterator_0.d()) {
|
|
1322
|
+
var item = tmp0_iterator_0.e();
|
|
1323
|
+
var tmp$ret$3;
|
|
1324
|
+
// Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.parse.<anonymous>.<anonymous>' call
|
|
1325
|
+
tmp$ret$3 = toField(item, this$0);
|
|
1326
|
+
tmp1_mapTo.a(tmp$ret$3);
|
|
1327
|
+
}
|
|
1328
|
+
tmp$ret$4 = tmp1_mapTo;
|
|
1329
|
+
tmp$ret$5 = tmp$ret$4;
|
|
1330
|
+
var query = tmp$ret$5;
|
|
1331
|
+
var tmp$ret$11;
|
|
1332
|
+
// Inline function 'kotlin.collections.map' call
|
|
1333
|
+
var tmp$ret$8;
|
|
1334
|
+
// Inline function 'kotlin.collections.filter' call
|
|
1335
|
+
var tmp$ret$7;
|
|
1336
|
+
// Inline function 'kotlin.collections.filterTo' call
|
|
1337
|
+
var tmp3_filterTo = ArrayList_init_$Create$();
|
|
1338
|
+
var tmp0_iterator_1 = parameters.c();
|
|
1339
|
+
while (tmp0_iterator_1.d()) {
|
|
1340
|
+
var element_0 = tmp0_iterator_1.e();
|
|
1341
|
+
var tmp$ret$6;
|
|
1342
|
+
// Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.parse.<anonymous>.<anonymous>' call
|
|
1343
|
+
tmp$ret$6 = element_0.t1a_1.equals(ParameterLocation_HEADER_getInstance());
|
|
1344
|
+
if (tmp$ret$6) {
|
|
1345
|
+
tmp3_filterTo.a(element_0);
|
|
1346
|
+
}
|
|
1347
|
+
}
|
|
1348
|
+
tmp$ret$7 = tmp3_filterTo;
|
|
1349
|
+
tmp$ret$8 = tmp$ret$7;
|
|
1350
|
+
var tmp5_map = tmp$ret$8;
|
|
1351
|
+
var tmp$ret$10;
|
|
1352
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
1353
|
+
var tmp4_mapTo = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp5_map, 10));
|
|
1354
|
+
var tmp0_iterator_2 = tmp5_map.c();
|
|
1355
|
+
while (tmp0_iterator_2.d()) {
|
|
1356
|
+
var item_0 = tmp0_iterator_2.e();
|
|
1357
|
+
var tmp$ret$9;
|
|
1358
|
+
// Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.parse.<anonymous>.<anonymous>' call
|
|
1359
|
+
tmp$ret$9 = toField(item_0, this$0);
|
|
1360
|
+
tmp4_mapTo.a(tmp$ret$9);
|
|
1361
|
+
}
|
|
1362
|
+
tmp$ret$10 = tmp4_mapTo;
|
|
1363
|
+
tmp$ret$11 = tmp$ret$10;
|
|
1364
|
+
var headers = tmp$ret$11;
|
|
1365
|
+
var tmp$ret$23;
|
|
1366
|
+
// Inline function 'kotlin.collections.ifEmpty' call
|
|
1367
|
+
var tmp$ret$21;
|
|
1368
|
+
// Inline function 'kotlin.collections.flatMap' call
|
|
1369
|
+
var tmp$ret$14;
|
|
1370
|
+
// Inline function 'kotlin.collections.filter' call
|
|
1371
|
+
var tmp$ret$13;
|
|
1372
|
+
// Inline function 'kotlin.collections.filterTo' call
|
|
1373
|
+
var tmp6_filterTo = ArrayList_init_$Create$();
|
|
1374
|
+
var tmp0_iterator_3 = parameters.c();
|
|
1375
|
+
while (tmp0_iterator_3.d()) {
|
|
1376
|
+
var element_1 = tmp0_iterator_3.e();
|
|
1377
|
+
var tmp$ret$12;
|
|
1378
|
+
// Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.parse.<anonymous>.<anonymous>' call
|
|
1379
|
+
tmp$ret$12 = element_1.t1a_1.equals(ParameterLocation_BODY_getInstance());
|
|
1380
|
+
if (tmp$ret$12) {
|
|
1381
|
+
tmp6_filterTo.a(element_1);
|
|
1382
|
+
}
|
|
1383
|
+
}
|
|
1384
|
+
tmp$ret$13 = tmp6_filterTo;
|
|
1385
|
+
tmp$ret$14 = tmp$ret$13;
|
|
1386
|
+
var tmp8_flatMap = tmp$ret$14;
|
|
1387
|
+
var tmp$ret$20;
|
|
1388
|
+
// Inline function 'kotlin.collections.flatMapTo' call
|
|
1389
|
+
var tmp7_flatMapTo = ArrayList_init_$Create$();
|
|
1390
|
+
var tmp0_iterator_4 = tmp8_flatMap.c();
|
|
1391
|
+
while (tmp0_iterator_4.d()) {
|
|
1392
|
+
var element_2 = tmp0_iterator_4.e();
|
|
1393
|
+
var tmp$ret$19;
|
|
1394
|
+
// Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.parse.<anonymous>.<anonymous>' call
|
|
1395
|
+
var tmp$ret$18;
|
|
1396
|
+
// Inline function 'kotlin.collections.map' call
|
|
1397
|
+
var tmp$ret$15;
|
|
1398
|
+
// Inline function 'kotlin.collections.orEmpty' call
|
|
1399
|
+
var tmp0_orEmpty = this$0.s1s_1.f1a_1;
|
|
1400
|
+
var tmp0_elvis_lhs = tmp0_orEmpty;
|
|
1401
|
+
tmp$ret$15 = tmp0_elvis_lhs == null ? emptyList() : tmp0_elvis_lhs;
|
|
1402
|
+
var tmp2_map_0 = tmp$ret$15;
|
|
1403
|
+
var tmp$ret$17;
|
|
1404
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
1405
|
+
var tmp1_mapTo_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp2_map_0, 10));
|
|
1406
|
+
var tmp0_iterator_5 = tmp2_map_0.c();
|
|
1407
|
+
while (tmp0_iterator_5.d()) {
|
|
1408
|
+
var item_1 = tmp0_iterator_5.e();
|
|
1409
|
+
var tmp$ret$16;
|
|
1410
|
+
// Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.parse.<anonymous>.<anonymous>.<anonymous>' call
|
|
1411
|
+
var schema = element_2.w1a_1;
|
|
1412
|
+
var tmp;
|
|
1413
|
+
if (schema instanceof ReferenceObject) {
|
|
1414
|
+
tmp = toReference_0(schema, this$0);
|
|
1415
|
+
} else {
|
|
1416
|
+
if (schema instanceof SchemaObject) {
|
|
1417
|
+
tmp = new Custom(Common_getInstance().q1s([name, 'RequestBody']), true);
|
|
1418
|
+
} else {
|
|
1419
|
+
if (schema == null) {
|
|
1420
|
+
throw new NotImplementedError();
|
|
1063
1421
|
} else {
|
|
1064
1422
|
noWhenBranchMatchedException();
|
|
1065
1423
|
}
|
|
1066
1424
|
}
|
|
1067
|
-
tmp$ret$3 = tmp_1;
|
|
1068
|
-
var list = tmp$ret$3;
|
|
1069
|
-
addAll(tmp0_flatMapTo, list);
|
|
1070
1425
|
}
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1426
|
+
var tmp_0 = tmp;
|
|
1427
|
+
var tmp0_elvis_lhs_0 = element_2.v1a_1;
|
|
1428
|
+
tmp$ret$16 = new Request(new Content(item_1, tmp_0, tmp0_elvis_lhs_0 == null ? false : tmp0_elvis_lhs_0));
|
|
1429
|
+
tmp1_mapTo_0.a(tmp$ret$16);
|
|
1430
|
+
}
|
|
1431
|
+
tmp$ret$17 = tmp1_mapTo_0;
|
|
1432
|
+
tmp$ret$18 = tmp$ret$17;
|
|
1433
|
+
tmp$ret$19 = tmp$ret$18;
|
|
1434
|
+
var list = tmp$ret$19;
|
|
1435
|
+
addAll(tmp7_flatMapTo, list);
|
|
1436
|
+
}
|
|
1437
|
+
tmp$ret$20 = tmp7_flatMapTo;
|
|
1438
|
+
tmp$ret$21 = tmp$ret$20;
|
|
1439
|
+
var tmp9_ifEmpty = tmp$ret$21;
|
|
1440
|
+
var tmp_1;
|
|
1441
|
+
if (tmp9_ifEmpty.g()) {
|
|
1442
|
+
var tmp$ret$22;
|
|
1443
|
+
// Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.parse.<anonymous>.<anonymous>' call
|
|
1444
|
+
tmp$ret$22 = listOf(new Request(null));
|
|
1445
|
+
tmp_1 = tmp$ret$22;
|
|
1446
|
+
} else {
|
|
1447
|
+
tmp_1 = tmp9_ifEmpty;
|
|
1448
|
+
}
|
|
1449
|
+
tmp$ret$23 = tmp_1;
|
|
1450
|
+
var requests = tmp$ret$23;
|
|
1451
|
+
var tmp$ret$36;
|
|
1452
|
+
// Inline function 'kotlin.collections.flatMap' call
|
|
1453
|
+
var tmp$ret$24;
|
|
1454
|
+
// Inline function 'kotlin.collections.orEmpty' call
|
|
1455
|
+
var tmp10_orEmpty = req.b1t_1.a1c_1;
|
|
1456
|
+
var tmp0_elvis_lhs_1 = tmp10_orEmpty;
|
|
1457
|
+
tmp$ret$24 = tmp0_elvis_lhs_1 == null ? emptyMap() : tmp0_elvis_lhs_1;
|
|
1458
|
+
var tmp12_flatMap = tmp$ret$24;
|
|
1459
|
+
var tmp$ret$35;
|
|
1460
|
+
// Inline function 'kotlin.collections.flatMapTo' call
|
|
1461
|
+
var tmp11_flatMapTo = ArrayList_init_$Create$();
|
|
1462
|
+
var tmp$ret$25;
|
|
1463
|
+
// Inline function 'kotlin.collections.iterator' call
|
|
1464
|
+
tmp$ret$25 = tmp12_flatMap.u().c();
|
|
1465
|
+
var tmp0_iterator_6 = tmp$ret$25;
|
|
1466
|
+
while (tmp0_iterator_6.d()) {
|
|
1467
|
+
var element_3 = tmp0_iterator_6.e();
|
|
1468
|
+
var tmp$ret$34;
|
|
1469
|
+
// Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.parse.<anonymous>.<anonymous>' call
|
|
1470
|
+
var tmp$ret$26;
|
|
1471
|
+
// Inline function 'kotlin.collections.component1' call
|
|
1472
|
+
tmp$ret$26 = element_3.v().l1e_1;
|
|
1473
|
+
var status = tmp$ret$26;
|
|
1474
|
+
var tmp$ret$27;
|
|
1475
|
+
// Inline function 'kotlin.collections.component2' call
|
|
1476
|
+
tmp$ret$27 = element_3.w();
|
|
1477
|
+
var res = tmp$ret$27;
|
|
1478
|
+
var tmp$ret$33;
|
|
1479
|
+
// Inline function 'kotlin.collections.map' call
|
|
1480
|
+
var tmp$ret$28;
|
|
1481
|
+
// Inline function 'kotlin.collections.orEmpty' call
|
|
1482
|
+
var tmp0_orEmpty_0 = this$0.s1s_1.g1a_1;
|
|
1483
|
+
var tmp0_elvis_lhs_2 = tmp0_orEmpty_0;
|
|
1484
|
+
tmp$ret$28 = tmp0_elvis_lhs_2 == null ? emptyList() : tmp0_elvis_lhs_2;
|
|
1485
|
+
var tmp2_map_1 = tmp$ret$28;
|
|
1486
|
+
var tmp$ret$32;
|
|
1487
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
1488
|
+
var tmp1_mapTo_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp2_map_1, 10));
|
|
1489
|
+
var tmp0_iterator_7 = tmp2_map_1.c();
|
|
1490
|
+
while (tmp0_iterator_7.d()) {
|
|
1491
|
+
var item_2 = tmp0_iterator_7.e();
|
|
1492
|
+
var tmp$ret$31;
|
|
1493
|
+
// Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.parse.<anonymous>.<anonymous>.<anonymous>' call
|
|
1494
|
+
var tmp_2 = _StatusCode___get_value__impl__we50mu(status);
|
|
1495
|
+
var tmp0_safe_receiver = resolve_0(res, this$0).p1e_1;
|
|
1496
|
+
var tmp_3;
|
|
1497
|
+
if (tmp0_safe_receiver == null) {
|
|
1498
|
+
tmp_3 = null;
|
|
1499
|
+
} else {
|
|
1500
|
+
var tmp$ret$30;
|
|
1501
|
+
// Inline function 'kotlin.let' call
|
|
1502
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
1503
|
+
var tmp$ret$29;
|
|
1504
|
+
// Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.parse.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
|
|
1505
|
+
var tmp0_subject = tmp0_safe_receiver;
|
|
1506
|
+
var tmp_4;
|
|
1507
|
+
if (tmp0_subject instanceof ReferenceObject) {
|
|
1508
|
+
tmp_4 = toReference_0(tmp0_safe_receiver, this$0);
|
|
1509
|
+
} else {
|
|
1510
|
+
if (tmp0_subject instanceof SchemaObject) {
|
|
1511
|
+
var tmp1_subject = tmp0_safe_receiver.d1e_1;
|
|
1512
|
+
var tmp0 = tmp1_subject == null ? -1 : tmp1_subject.q4_1;
|
|
1513
|
+
switch (tmp0) {
|
|
1514
|
+
case -1:
|
|
1515
|
+
case 5:
|
|
1516
|
+
tmp_4 = new Custom(Common_getInstance().q1s([name, _StatusCode___get_value__impl__we50mu(status), 'ResponseBody']), true);
|
|
1517
|
+
break;
|
|
1518
|
+
default:
|
|
1519
|
+
tmp_4 = toReference(tmp0_safe_receiver, this$0);
|
|
1520
|
+
break;
|
|
1521
|
+
}
|
|
1522
|
+
} else {
|
|
1523
|
+
noWhenBranchMatchedException();
|
|
1524
|
+
}
|
|
1525
|
+
}
|
|
1526
|
+
tmp$ret$29 = new Content(item_2, tmp_4, false);
|
|
1527
|
+
tmp$ret$30 = tmp$ret$29;
|
|
1528
|
+
tmp_3 = tmp$ret$30;
|
|
1529
|
+
}
|
|
1530
|
+
tmp$ret$31 = new Response(tmp_2, tmp_3);
|
|
1531
|
+
tmp1_mapTo_1.a(tmp$ret$31);
|
|
1532
|
+
}
|
|
1533
|
+
tmp$ret$32 = tmp1_mapTo_1;
|
|
1534
|
+
tmp$ret$33 = tmp$ret$32;
|
|
1535
|
+
tmp$ret$34 = tmp$ret$33;
|
|
1536
|
+
var list_0 = tmp$ret$34;
|
|
1537
|
+
addAll(tmp11_flatMapTo, list_0);
|
|
1538
|
+
}
|
|
1539
|
+
tmp$ret$35 = tmp11_flatMapTo;
|
|
1540
|
+
tmp$ret$36 = tmp$ret$35;
|
|
1541
|
+
var responses = tmp$ret$36;
|
|
1542
|
+
return listOf(new Endpoint(name, req.a1t_1, segments, query, headers, emptyList(), requests, responses));
|
|
1543
|
+
};
|
|
1544
|
+
}
|
|
1545
|
+
function OpenApiParser$parse$lambda_0(this$0) {
|
|
1546
|
+
return function (req) {
|
|
1547
|
+
var tmp0_safe_receiver = req.b1t_1.z1b_1;
|
|
1548
|
+
var tmp;
|
|
1549
|
+
if (tmp0_safe_receiver == null) {
|
|
1550
|
+
tmp = null;
|
|
1551
|
+
} else {
|
|
1552
|
+
var tmp$ret$2;
|
|
1553
|
+
// Inline function 'kotlin.collections.map' call
|
|
1554
|
+
var tmp$ret$1;
|
|
1555
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
1556
|
+
var tmp0_mapTo = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp0_safe_receiver, 10));
|
|
1557
|
+
var tmp0_iterator = tmp0_safe_receiver.c();
|
|
1558
|
+
while (tmp0_iterator.d()) {
|
|
1559
|
+
var item = tmp0_iterator.e();
|
|
1560
|
+
var tmp$ret$0;
|
|
1561
|
+
// Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.parse.<anonymous>.<anonymous>' call
|
|
1562
|
+
tmp$ret$0 = resolve_1(item, this$0);
|
|
1563
|
+
tmp0_mapTo.a(tmp$ret$0);
|
|
1564
|
+
}
|
|
1565
|
+
tmp$ret$1 = tmp0_mapTo;
|
|
1566
|
+
tmp$ret$2 = tmp$ret$1;
|
|
1567
|
+
tmp = tmp$ret$2;
|
|
1568
|
+
}
|
|
1569
|
+
var tmp1_safe_receiver = tmp;
|
|
1570
|
+
var tmp_0;
|
|
1571
|
+
if (tmp1_safe_receiver == null) {
|
|
1572
|
+
tmp_0 = null;
|
|
1573
|
+
} else {
|
|
1574
|
+
var tmp$ret$5;
|
|
1575
|
+
// Inline function 'kotlin.collections.filter' call
|
|
1576
|
+
var tmp$ret$4;
|
|
1577
|
+
// Inline function 'kotlin.collections.filterTo' call
|
|
1578
|
+
var tmp1_filterTo = ArrayList_init_$Create$();
|
|
1579
|
+
var tmp0_iterator_0 = tmp1_safe_receiver.c();
|
|
1580
|
+
while (tmp0_iterator_0.d()) {
|
|
1581
|
+
var element = tmp0_iterator_0.e();
|
|
1582
|
+
var tmp$ret$3;
|
|
1583
|
+
// Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.parse.<anonymous>.<anonymous>' call
|
|
1584
|
+
tmp$ret$3 = element.t1a_1.equals(ParameterLocation_BODY_getInstance());
|
|
1585
|
+
if (tmp$ret$3) {
|
|
1586
|
+
tmp1_filterTo.a(element);
|
|
1587
|
+
}
|
|
1074
1588
|
}
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
var
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
var
|
|
1101
|
-
|
|
1102
|
-
tmp$ret$8 = item.w();
|
|
1103
|
-
var value_0 = tmp$ret$8;
|
|
1104
|
-
var tmp0_subject_1 = value_0;
|
|
1589
|
+
tmp$ret$4 = tmp1_filterTo;
|
|
1590
|
+
tmp$ret$5 = tmp$ret$4;
|
|
1591
|
+
tmp_0 = tmp$ret$5;
|
|
1592
|
+
}
|
|
1593
|
+
var tmp2_safe_receiver = tmp_0;
|
|
1594
|
+
var tmp_1;
|
|
1595
|
+
if (tmp2_safe_receiver == null) {
|
|
1596
|
+
tmp_1 = null;
|
|
1597
|
+
} else {
|
|
1598
|
+
var tmp$ret$14;
|
|
1599
|
+
// Inline function 'kotlin.collections.flatMap' call
|
|
1600
|
+
var tmp$ret$13;
|
|
1601
|
+
// Inline function 'kotlin.collections.flatMapTo' call
|
|
1602
|
+
var tmp2_flatMapTo = ArrayList_init_$Create$();
|
|
1603
|
+
var tmp0_iterator_1 = tmp2_safe_receiver.c();
|
|
1604
|
+
while (tmp0_iterator_1.d()) {
|
|
1605
|
+
var element_0 = tmp0_iterator_1.e();
|
|
1606
|
+
var tmp$ret$12;
|
|
1607
|
+
// Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.parse.<anonymous>.<anonymous>' call
|
|
1608
|
+
var parameters = plus(resolveParameters_0(req.z1s_1, this$0), resolveParameters(req.b1t_1, this$0));
|
|
1609
|
+
var segments = toSegments(req.y1s_1, this$0, parameters);
|
|
1610
|
+
var name = toName(req.b1t_1, this$0, segments, req.a1t_1);
|
|
1611
|
+
var schema = element_0.w1a_1;
|
|
1612
|
+
var tmp_2;
|
|
1613
|
+
if (schema instanceof SchemaObject) {
|
|
1614
|
+
var tmp0_subject = schema.d1e_1;
|
|
1615
|
+
var tmp0 = tmp0_subject == null ? -1 : tmp0_subject.q4_1;
|
|
1105
1616
|
var tmp_3;
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
var
|
|
1121
|
-
|
|
1122
|
-
var
|
|
1123
|
-
var
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
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;
|
|
1617
|
+
switch (tmp0) {
|
|
1618
|
+
case -1:
|
|
1619
|
+
case 5:
|
|
1620
|
+
var tmp$ret$11;
|
|
1621
|
+
// Inline function 'kotlin.collections.map' call
|
|
1622
|
+
var tmp1_map = flatten(schema, this$0, Common_getInstance().q1s([name, 'RequestBody']));
|
|
1623
|
+
var tmp$ret$10;
|
|
1624
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
1625
|
+
var tmp0_mapTo_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp1_map, 10));
|
|
1626
|
+
var tmp0_iterator_2 = tmp1_map.c();
|
|
1627
|
+
while (tmp0_iterator_2.d()) {
|
|
1628
|
+
var item_0 = tmp0_iterator_2.e();
|
|
1629
|
+
var tmp$ret$9;
|
|
1630
|
+
// Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.parse.<anonymous>.<anonymous>.<anonymous>' call
|
|
1631
|
+
var tmp$ret$8;
|
|
1632
|
+
// Inline function 'kotlin.collections.map' call
|
|
1633
|
+
var tmp1_map_0 = item_0.x1s_1;
|
|
1634
|
+
var tmp$ret$7;
|
|
1635
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
1636
|
+
var tmp0_mapTo_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp1_map_0, 10));
|
|
1637
|
+
var tmp0_iterator_3 = tmp1_map_0.c();
|
|
1638
|
+
while (tmp0_iterator_3.d()) {
|
|
1639
|
+
var item_1 = tmp0_iterator_3.e();
|
|
1640
|
+
var tmp$ret$6;
|
|
1641
|
+
// Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.parse.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
|
|
1642
|
+
tmp$ret$6 = item_1.v1s_1;
|
|
1643
|
+
tmp0_mapTo_1.a(tmp$ret$6);
|
|
1145
1644
|
}
|
|
1645
|
+
tmp$ret$7 = tmp0_mapTo_1;
|
|
1646
|
+
tmp$ret$8 = tmp$ret$7;
|
|
1647
|
+
tmp$ret$9 = new Type_0(item_0.w1s_1, new Shape(tmp$ret$8));
|
|
1648
|
+
tmp0_mapTo_0.a(tmp$ret$9);
|
|
1649
|
+
}
|
|
1650
|
+
tmp$ret$10 = tmp0_mapTo_0;
|
|
1651
|
+
tmp$ret$11 = tmp$ret$10;
|
|
1146
1652
|
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
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)));
|
|
1653
|
+
tmp_3 = tmp$ret$11;
|
|
1654
|
+
break;
|
|
1655
|
+
default:
|
|
1656
|
+
tmp_3 = emptyList();
|
|
1657
|
+
break;
|
|
1658
|
+
}
|
|
1659
|
+
tmp_2 = tmp_3;
|
|
1660
|
+
} else {
|
|
1661
|
+
if (schema instanceof ReferenceObject) {
|
|
1662
|
+
tmp_2 = emptyList();
|
|
1165
1663
|
} else {
|
|
1166
|
-
if (
|
|
1167
|
-
|
|
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)));
|
|
1664
|
+
if (schema == null) {
|
|
1665
|
+
tmp_2 = emptyList();
|
|
1172
1666
|
} else {
|
|
1173
1667
|
noWhenBranchMatchedException();
|
|
1174
1668
|
}
|
|
1175
1669
|
}
|
|
1176
|
-
tmp$ret$9 = tmp_3;
|
|
1177
|
-
tmp1_mapTo.a(tmp$ret$9);
|
|
1178
1670
|
}
|
|
1179
|
-
tmp$ret$
|
|
1180
|
-
|
|
1181
|
-
|
|
1671
|
+
tmp$ret$12 = tmp_2;
|
|
1672
|
+
var list = tmp$ret$12;
|
|
1673
|
+
addAll(tmp2_flatMapTo, list);
|
|
1182
1674
|
}
|
|
1675
|
+
tmp$ret$13 = tmp2_flatMapTo;
|
|
1676
|
+
tmp$ret$14 = tmp$ret$13;
|
|
1677
|
+
tmp_1 = tmp$ret$14;
|
|
1678
|
+
}
|
|
1679
|
+
var tmp3_elvis_lhs = tmp_1;
|
|
1680
|
+
return tmp3_elvis_lhs == null ? emptyList() : tmp3_elvis_lhs;
|
|
1681
|
+
};
|
|
1682
|
+
}
|
|
1683
|
+
function OpenApiParser$parse$lambda_1(this$0) {
|
|
1684
|
+
return function (req) {
|
|
1685
|
+
var response = resolve_0(req.i1t_1, this$0);
|
|
1686
|
+
var parameters = plus(resolveParameters_0(req.e1t_1, this$0), resolveParameters(req.g1t_1, this$0));
|
|
1687
|
+
var segments = toSegments(req.d1t_1, this$0, parameters);
|
|
1688
|
+
var name = toName(req.g1t_1, this$0, segments, req.f1t_1);
|
|
1689
|
+
var schema = response.p1e_1;
|
|
1690
|
+
var tmp;
|
|
1691
|
+
if (schema instanceof SchemaObject) {
|
|
1692
|
+
var tmp0_subject = schema.d1e_1;
|
|
1693
|
+
var tmp0 = tmp0_subject == null ? -1 : tmp0_subject.q4_1;
|
|
1694
|
+
var tmp_0;
|
|
1695
|
+
switch (tmp0) {
|
|
1696
|
+
case -1:
|
|
1697
|
+
case 5:
|
|
1698
|
+
var tmp$ret$5;
|
|
1699
|
+
// Inline function 'kotlin.collections.map' call
|
|
1700
|
+
var tmp1_map = flatten(schema, this$0, Common_getInstance().q1s([name, _StatusCode___get_value__impl__we50mu(req.h1t_1), 'ResponseBody']));
|
|
1701
|
+
var tmp$ret$4;
|
|
1702
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
1703
|
+
var tmp0_mapTo = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp1_map, 10));
|
|
1704
|
+
var tmp0_iterator = tmp1_map.c();
|
|
1705
|
+
while (tmp0_iterator.d()) {
|
|
1706
|
+
var item = tmp0_iterator.e();
|
|
1707
|
+
var tmp$ret$3;
|
|
1708
|
+
// Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.parse.<anonymous>.<anonymous>' call
|
|
1709
|
+
var tmp$ret$2;
|
|
1710
|
+
// Inline function 'kotlin.collections.map' call
|
|
1711
|
+
var tmp1_map_0 = item.x1s_1;
|
|
1712
|
+
var tmp$ret$1;
|
|
1713
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
1714
|
+
var tmp0_mapTo_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp1_map_0, 10));
|
|
1715
|
+
var tmp0_iterator_0 = tmp1_map_0.c();
|
|
1716
|
+
while (tmp0_iterator_0.d()) {
|
|
1717
|
+
var item_0 = tmp0_iterator_0.e();
|
|
1718
|
+
var tmp$ret$0;
|
|
1719
|
+
// Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.parse.<anonymous>.<anonymous>.<anonymous>' call
|
|
1720
|
+
tmp$ret$0 = item_0.v1s_1;
|
|
1721
|
+
tmp0_mapTo_0.a(tmp$ret$0);
|
|
1722
|
+
}
|
|
1723
|
+
tmp$ret$1 = tmp0_mapTo_0;
|
|
1724
|
+
tmp$ret$2 = tmp$ret$1;
|
|
1725
|
+
tmp$ret$3 = new Type_0(item.w1s_1, new Shape(tmp$ret$2));
|
|
1726
|
+
tmp0_mapTo.a(tmp$ret$3);
|
|
1727
|
+
}
|
|
1728
|
+
tmp$ret$4 = tmp0_mapTo;
|
|
1729
|
+
tmp$ret$5 = tmp$ret$4;
|
|
1183
1730
|
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1731
|
+
tmp_0 = tmp$ret$5;
|
|
1732
|
+
break;
|
|
1733
|
+
default:
|
|
1734
|
+
tmp_0 = emptyList();
|
|
1735
|
+
break;
|
|
1736
|
+
}
|
|
1737
|
+
tmp = tmp_0;
|
|
1738
|
+
} else {
|
|
1739
|
+
if (schema instanceof ReferenceObject) {
|
|
1740
|
+
tmp = emptyList();
|
|
1192
1741
|
} else {
|
|
1193
|
-
|
|
1194
|
-
|
|
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();
|
|
1742
|
+
if (schema == null) {
|
|
1743
|
+
tmp = emptyList();
|
|
1202
1744
|
} else {
|
|
1203
|
-
|
|
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
|
-
}
|
|
1745
|
+
noWhenBranchMatchedException();
|
|
1209
1746
|
}
|
|
1210
|
-
tmp$ret$12 = tmp_14;
|
|
1211
|
-
tmp$ret$13 = tmp$ret$12;
|
|
1212
|
-
tmp_13 = tmp$ret$13;
|
|
1213
1747
|
}
|
|
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
1748
|
}
|
|
1263
|
-
|
|
1264
|
-
|
|
1749
|
+
return tmp;
|
|
1750
|
+
};
|
|
1265
1751
|
}
|
|
1266
|
-
function
|
|
1267
|
-
var tmp0_subject =
|
|
1752
|
+
function OpenApiParser$toName$lambda(it) {
|
|
1753
|
+
var tmp0_subject = it;
|
|
1268
1754
|
var tmp;
|
|
1269
|
-
if (tmp0_subject instanceof
|
|
1270
|
-
tmp =
|
|
1755
|
+
if (tmp0_subject instanceof Literal) {
|
|
1756
|
+
tmp = Common_getInstance().q1s([it.pj_1]);
|
|
1271
1757
|
} else {
|
|
1272
|
-
if (tmp0_subject instanceof
|
|
1273
|
-
|
|
1274
|
-
tmp = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.h3_1;
|
|
1758
|
+
if (tmp0_subject instanceof Param) {
|
|
1759
|
+
tmp = Common_getInstance().q1s([it.si_1.dj_1]);
|
|
1275
1760
|
} else {
|
|
1276
1761
|
noWhenBranchMatchedException();
|
|
1277
1762
|
}
|
|
1278
1763
|
}
|
|
1279
1764
|
return tmp;
|
|
1280
1765
|
}
|
|
1281
|
-
function
|
|
1282
|
-
|
|
1283
|
-
|
|
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);
|
|
1766
|
+
function OpenApiParser(openApi) {
|
|
1767
|
+
Companion_getInstance_0();
|
|
1768
|
+
this.s1s_1 = openApi;
|
|
1301
1769
|
}
|
|
1302
|
-
function
|
|
1303
|
-
var
|
|
1304
|
-
var
|
|
1770
|
+
protoOf(OpenApiParser).t1s = function () {
|
|
1771
|
+
var endpointAst = flatMapRequests(this.s1s_1, this, OpenApiParser$parse$lambda(this));
|
|
1772
|
+
var requestBodyAst = flatMapRequests(this.s1s_1, this, OpenApiParser$parse$lambda_0(this));
|
|
1773
|
+
var responseBodyAst = flatMapResponses(this.s1s_1, this, OpenApiParser$parse$lambda_1(this));
|
|
1774
|
+
var tmp0_safe_receiver = this.s1s_1.i1a_1;
|
|
1305
1775
|
var tmp;
|
|
1306
|
-
if (
|
|
1776
|
+
if (tmp0_safe_receiver == null) {
|
|
1307
1777
|
tmp = null;
|
|
1308
1778
|
} else {
|
|
1309
|
-
var tmp$ret$
|
|
1310
|
-
// Inline function 'kotlin.
|
|
1311
|
-
|
|
1779
|
+
var tmp$ret$3;
|
|
1780
|
+
// Inline function 'kotlin.collections.flatMap' call
|
|
1781
|
+
var tmp$ret$2;
|
|
1782
|
+
// Inline function 'kotlin.collections.flatMapTo' call
|
|
1783
|
+
var tmp0_flatMapTo = ArrayList_init_$Create$();
|
|
1312
1784
|
var tmp$ret$0;
|
|
1313
|
-
// Inline function '
|
|
1314
|
-
tmp$ret$0 =
|
|
1315
|
-
|
|
1316
|
-
|
|
1785
|
+
// Inline function 'kotlin.collections.iterator' call
|
|
1786
|
+
tmp$ret$0 = tmp0_safe_receiver.u().c();
|
|
1787
|
+
var tmp0_iterator = tmp$ret$0;
|
|
1788
|
+
while (tmp0_iterator.d()) {
|
|
1789
|
+
var element = tmp0_iterator.e();
|
|
1790
|
+
var tmp$ret$1;
|
|
1791
|
+
// Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.parse.<anonymous>' call
|
|
1792
|
+
tmp$ret$1 = flatten(element.w(), this, Common_getInstance().q1s([element.v()]));
|
|
1793
|
+
var list = tmp$ret$1;
|
|
1794
|
+
addAll(tmp0_flatMapTo, list);
|
|
1795
|
+
}
|
|
1796
|
+
tmp$ret$2 = tmp0_flatMapTo;
|
|
1797
|
+
tmp$ret$3 = tmp$ret$2;
|
|
1798
|
+
tmp = tmp$ret$3;
|
|
1317
1799
|
}
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
var tmp;
|
|
1323
|
-
if (tmp0_subject instanceof SchemaObject) {
|
|
1324
|
-
tmp = flatten(_this__u8e3s4, name, openApi);
|
|
1800
|
+
var tmp1_safe_receiver = tmp;
|
|
1801
|
+
var tmp_0;
|
|
1802
|
+
if (tmp1_safe_receiver == null) {
|
|
1803
|
+
tmp_0 = null;
|
|
1325
1804
|
} else {
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1805
|
+
var tmp$ret$9;
|
|
1806
|
+
// Inline function 'kotlin.collections.map' call
|
|
1807
|
+
var tmp$ret$8;
|
|
1808
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
1809
|
+
var tmp1_mapTo = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp1_safe_receiver, 10));
|
|
1810
|
+
var tmp0_iterator_0 = tmp1_safe_receiver.c();
|
|
1811
|
+
while (tmp0_iterator_0.d()) {
|
|
1812
|
+
var item = tmp0_iterator_0.e();
|
|
1813
|
+
var tmp$ret$7;
|
|
1814
|
+
// Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.parse.<anonymous>' call
|
|
1815
|
+
var tmp$ret$6;
|
|
1816
|
+
// Inline function 'kotlin.collections.map' call
|
|
1817
|
+
var tmp1_map = item.x1s_1;
|
|
1818
|
+
var tmp$ret$5;
|
|
1819
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
1820
|
+
var tmp0_mapTo = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp1_map, 10));
|
|
1821
|
+
var tmp0_iterator_1 = tmp1_map.c();
|
|
1822
|
+
while (tmp0_iterator_1.d()) {
|
|
1823
|
+
var item_0 = tmp0_iterator_1.e();
|
|
1824
|
+
var tmp$ret$4;
|
|
1825
|
+
// Inline function 'community.flock.wirespec.openapi.v2.OpenApiParser.parse.<anonymous>.<anonymous>' call
|
|
1826
|
+
tmp$ret$4 = item_0.v1s_1;
|
|
1827
|
+
tmp0_mapTo.a(tmp$ret$4);
|
|
1335
1828
|
}
|
|
1336
|
-
tmp =
|
|
1337
|
-
|
|
1338
|
-
|
|
1829
|
+
tmp$ret$5 = tmp0_mapTo;
|
|
1830
|
+
tmp$ret$6 = tmp$ret$5;
|
|
1831
|
+
tmp$ret$7 = new Type_0(item.w1s_1, new Shape(tmp$ret$6));
|
|
1832
|
+
tmp1_mapTo.a(tmp$ret$7);
|
|
1339
1833
|
}
|
|
1834
|
+
tmp$ret$8 = tmp1_mapTo;
|
|
1835
|
+
tmp$ret$9 = tmp$ret$8;
|
|
1836
|
+
tmp_0 = tmp$ret$9;
|
|
1340
1837
|
}
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1838
|
+
var tmp2_elvis_lhs = tmp_0;
|
|
1839
|
+
var definitionsAst = tmp2_elvis_lhs == null ? emptyList() : tmp2_elvis_lhs;
|
|
1840
|
+
return plus(plus(plus(endpointAst, requestBodyAst), responseBodyAst), definitionsAst);
|
|
1841
|
+
};
|
|
1842
|
+
function OpenApiParser$parse$lambda_2(it) {
|
|
1344
1843
|
var tmp0_subject = it;
|
|
1345
1844
|
var tmp;
|
|
1346
1845
|
if (tmp0_subject instanceof Literal) {
|
|
@@ -1355,7 +1854,7 @@
|
|
|
1355
1854
|
return tmp;
|
|
1356
1855
|
}
|
|
1357
1856
|
function OpenApiParser_0() {
|
|
1358
|
-
|
|
1857
|
+
OpenApiParser_instance = this;
|
|
1359
1858
|
}
|
|
1360
1859
|
protoOf(OpenApiParser_0).r1s = function (json) {
|
|
1361
1860
|
var tmp$ret$1;
|
|
@@ -1364,11 +1863,11 @@
|
|
|
1364
1863
|
// Inline function 'kotlin.contracts.contract' call
|
|
1365
1864
|
var tmp$ret$0;
|
|
1366
1865
|
// Inline function 'community.flock.wirespec.openapi.v3.OpenApiParser.parse.<anonymous>' call
|
|
1367
|
-
tmp$ret$0 =
|
|
1866
|
+
tmp$ret$0 = OpenApiParser_getInstance().k1t(tmp0_let);
|
|
1368
1867
|
tmp$ret$1 = tmp$ret$0;
|
|
1369
1868
|
return tmp$ret$1;
|
|
1370
1869
|
};
|
|
1371
|
-
protoOf(OpenApiParser_0).
|
|
1870
|
+
protoOf(OpenApiParser_0).k1t = function (openApi) {
|
|
1372
1871
|
var tmp$ret$62;
|
|
1373
1872
|
// Inline function 'kotlin.collections.flatMap' call
|
|
1374
1873
|
var tmp1_flatMap = openApi.x1i_1;
|
|
@@ -1484,7 +1983,7 @@
|
|
|
1484
1983
|
var tmp_3;
|
|
1485
1984
|
if (tmp4_elvis_lhs == null) {
|
|
1486
1985
|
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$(
|
|
1986
|
+
throw IllegalStateException_init_$Create$(toString(tmp1_error));
|
|
1488
1987
|
} else {
|
|
1489
1988
|
tmp_3 = tmp4_elvis_lhs;
|
|
1490
1989
|
}
|
|
@@ -1518,7 +2017,7 @@
|
|
|
1518
2017
|
if (tmp4_elvis_lhs_0 == null) {
|
|
1519
2018
|
var tmp$ret$18;
|
|
1520
2019
|
// Inline function 'kotlin.let' call
|
|
1521
|
-
var tmp2_let = joinToString_0(segments, '', VOID, VOID, VOID, VOID, OpenApiParser$parse$
|
|
2020
|
+
var tmp2_let = joinToString_0(segments, '', VOID, VOID, VOID, VOID, OpenApiParser$parse$lambda_2);
|
|
1522
2021
|
// Inline function 'kotlin.contracts.contract' call
|
|
1523
2022
|
var tmp$ret$17;
|
|
1524
2023
|
// Inline function 'community.flock.wirespec.openapi.v3.OpenApiParser.parse.<anonymous>.<anonymous>.<anonymous>' call
|
|
@@ -1671,7 +2170,7 @@
|
|
|
1671
2170
|
var mediaObject = tmp$ret$39;
|
|
1672
2171
|
var tmp_8 = _MediaType___get_value__impl__wy58mp(mediaType);
|
|
1673
2172
|
var tmp0_safe_receiver_3 = mediaObject.y1m_1;
|
|
1674
|
-
var tmp1_elvis_lhs_0 = tmp0_safe_receiver_3 == null ? null :
|
|
2173
|
+
var tmp1_elvis_lhs_0 = tmp0_safe_receiver_3 == null ? null : toReference_1(tmp0_safe_receiver_3, openApi);
|
|
1675
2174
|
var tmp_9;
|
|
1676
2175
|
if (tmp1_elvis_lhs_0 == null) {
|
|
1677
2176
|
throw new NotImplementedError();
|
|
@@ -1750,7 +2249,7 @@
|
|
|
1750
2249
|
var tmp_13 = _StatusCode___get_value__impl__we50mu_0(status);
|
|
1751
2250
|
var tmp_14 = _MediaType___get_value__impl__wy58mp(contentType);
|
|
1752
2251
|
var tmp0_safe_receiver_5 = media.y1m_1;
|
|
1753
|
-
var tmp1_elvis_lhs_1 = tmp0_safe_receiver_5 == null ? null :
|
|
2252
|
+
var tmp1_elvis_lhs_1 = tmp0_safe_receiver_5 == null ? null : toReference_1(tmp0_safe_receiver_5, openApi);
|
|
1754
2253
|
var tmp_15;
|
|
1755
2254
|
if (tmp1_elvis_lhs_1 == null) {
|
|
1756
2255
|
throw new NotImplementedError();
|
|
@@ -1835,7 +2334,7 @@
|
|
|
1835
2334
|
// Inline function 'community.flock.wirespec.openapi.v3.OpenApiParser.parse.<anonymous>' call
|
|
1836
2335
|
var tmp$ret$69;
|
|
1837
2336
|
// Inline function 'kotlin.collections.map' call
|
|
1838
|
-
var tmp1_map_1 = item_6.
|
|
2337
|
+
var tmp1_map_1 = item_6.m1t_1;
|
|
1839
2338
|
var tmp$ret$68;
|
|
1840
2339
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1841
2340
|
var tmp0_mapTo_3 = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp1_map_1, 10));
|
|
@@ -1844,12 +2343,12 @@
|
|
|
1844
2343
|
var item_7 = tmp0_iterator_14.e();
|
|
1845
2344
|
var tmp$ret$67;
|
|
1846
2345
|
// Inline function 'community.flock.wirespec.openapi.v3.OpenApiParser.parse.<anonymous>.<anonymous>' call
|
|
1847
|
-
tmp$ret$67 = item_7.
|
|
2346
|
+
tmp$ret$67 = item_7.o1t_1;
|
|
1848
2347
|
tmp0_mapTo_3.a(tmp$ret$67);
|
|
1849
2348
|
}
|
|
1850
2349
|
tmp$ret$68 = tmp0_mapTo_3;
|
|
1851
2350
|
tmp$ret$69 = tmp$ret$68;
|
|
1852
|
-
tmp$ret$70 = new
|
|
2351
|
+
tmp$ret$70 = new Type_0(item_6.l1t_1, new Shape(tmp$ret$69));
|
|
1853
2352
|
tmp3_mapTo.a(tmp$ret$70);
|
|
1854
2353
|
}
|
|
1855
2354
|
tmp$ret$71 = tmp3_mapTo;
|
|
@@ -1860,11 +2359,11 @@
|
|
|
1860
2359
|
var componentsAst = tmp3_elvis_lhs == null ? emptyList() : tmp3_elvis_lhs;
|
|
1861
2360
|
return plus(endpointAst, componentsAst);
|
|
1862
2361
|
};
|
|
1863
|
-
var
|
|
1864
|
-
function
|
|
1865
|
-
if (
|
|
2362
|
+
var OpenApiParser_instance;
|
|
2363
|
+
function OpenApiParser_getInstance() {
|
|
2364
|
+
if (OpenApiParser_instance == null)
|
|
1866
2365
|
new OpenApiParser_0();
|
|
1867
|
-
return
|
|
2366
|
+
return OpenApiParser_instance;
|
|
1868
2367
|
}
|
|
1869
2368
|
function resolveParameters_1(_this__u8e3s4, openApi) {
|
|
1870
2369
|
var tmp0_safe_receiver = _this__u8e3s4.d1k_1;
|
|
@@ -2064,7 +2563,7 @@
|
|
|
2064
2563
|
}
|
|
2065
2564
|
return tmp;
|
|
2066
2565
|
}
|
|
2067
|
-
function
|
|
2566
|
+
function toReference_1(_this__u8e3s4, openApi) {
|
|
2068
2567
|
var tmp0_subject = _this__u8e3s4;
|
|
2069
2568
|
var tmp;
|
|
2070
2569
|
if (tmp0_subject instanceof ReferenceObject_0) {
|
|
@@ -2213,15 +2712,15 @@
|
|
|
2213
2712
|
return tmp$ret$5;
|
|
2214
2713
|
}
|
|
2215
2714
|
function SimpleSchema_0(name, properties) {
|
|
2216
|
-
this.
|
|
2217
|
-
this.
|
|
2715
|
+
this.l1t_1 = name;
|
|
2716
|
+
this.m1t_1 = properties;
|
|
2218
2717
|
}
|
|
2219
2718
|
protoOf(SimpleSchema_0).toString = function () {
|
|
2220
|
-
return 'SimpleSchema(name=' + this.
|
|
2719
|
+
return 'SimpleSchema(name=' + this.l1t_1 + ', properties=' + this.m1t_1 + ')';
|
|
2221
2720
|
};
|
|
2222
2721
|
protoOf(SimpleSchema_0).hashCode = function () {
|
|
2223
|
-
var result = getStringHashCode(this.
|
|
2224
|
-
result = imul(result, 31) + hashCode(this.
|
|
2722
|
+
var result = getStringHashCode(this.l1t_1);
|
|
2723
|
+
result = imul(result, 31) + hashCode(this.m1t_1) | 0;
|
|
2225
2724
|
return result;
|
|
2226
2725
|
};
|
|
2227
2726
|
protoOf(SimpleSchema_0).equals = function (other) {
|
|
@@ -2230,9 +2729,9 @@
|
|
|
2230
2729
|
if (!(other instanceof SimpleSchema_0))
|
|
2231
2730
|
return false;
|
|
2232
2731
|
var tmp0_other_with_cast = other instanceof SimpleSchema_0 ? other : THROW_CCE();
|
|
2233
|
-
if (!(this.
|
|
2732
|
+
if (!(this.l1t_1 === tmp0_other_with_cast.l1t_1))
|
|
2234
2733
|
return false;
|
|
2235
|
-
if (!equals(this.
|
|
2734
|
+
if (!equals(this.m1t_1, tmp0_other_with_cast.m1t_1))
|
|
2236
2735
|
return false;
|
|
2237
2736
|
return true;
|
|
2238
2737
|
};
|
|
@@ -2260,15 +2759,15 @@
|
|
|
2260
2759
|
return tmp;
|
|
2261
2760
|
}
|
|
2262
2761
|
function SimpleProp_0(key, field) {
|
|
2263
|
-
this.
|
|
2264
|
-
this.
|
|
2762
|
+
this.n1t_1 = key;
|
|
2763
|
+
this.o1t_1 = field;
|
|
2265
2764
|
}
|
|
2266
2765
|
protoOf(SimpleProp_0).toString = function () {
|
|
2267
|
-
return 'SimpleProp(key=' + this.
|
|
2766
|
+
return 'SimpleProp(key=' + this.n1t_1 + ', field=' + this.o1t_1 + ')';
|
|
2268
2767
|
};
|
|
2269
2768
|
protoOf(SimpleProp_0).hashCode = function () {
|
|
2270
|
-
var result = getStringHashCode(this.
|
|
2271
|
-
result = imul(result, 31) + this.
|
|
2769
|
+
var result = getStringHashCode(this.n1t_1);
|
|
2770
|
+
result = imul(result, 31) + this.o1t_1.hashCode() | 0;
|
|
2272
2771
|
return result;
|
|
2273
2772
|
};
|
|
2274
2773
|
protoOf(SimpleProp_0).equals = function (other) {
|
|
@@ -2277,9 +2776,9 @@
|
|
|
2277
2776
|
if (!(other instanceof SimpleProp_0))
|
|
2278
2777
|
return false;
|
|
2279
2778
|
var tmp0_other_with_cast = other instanceof SimpleProp_0 ? other : THROW_CCE();
|
|
2280
|
-
if (!(this.
|
|
2779
|
+
if (!(this.n1t_1 === tmp0_other_with_cast.n1t_1))
|
|
2281
2780
|
return false;
|
|
2282
|
-
if (!this.
|
|
2781
|
+
if (!this.o1t_1.equals(tmp0_other_with_cast.o1t_1))
|
|
2283
2782
|
return false;
|
|
2284
2783
|
return true;
|
|
2285
2784
|
};
|
|
@@ -2605,8 +3104,8 @@
|
|
|
2605
3104
|
}
|
|
2606
3105
|
//region block: exports
|
|
2607
3106
|
_.$_$ = _.$_$ || {};
|
|
2608
|
-
_.$_$.a =
|
|
2609
|
-
_.$_$.b =
|
|
3107
|
+
_.$_$.a = Companion_getInstance_0;
|
|
3108
|
+
_.$_$.b = OpenApiParser_getInstance;
|
|
2610
3109
|
//endregion
|
|
2611
3110
|
return _;
|
|
2612
3111
|
}));
|