swagger-client 3.19.10 → 3.20.0
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/dist/swagger-client.browser.js +649 -356
- package/dist/swagger-client.browser.min.js +1 -1
- package/dist/swagger-client.browser.min.js.map +1 -1
- package/es/execute/index.js +1 -1
- package/es/execute/oas3/build-request.js +1 -1
- package/es/http/index.js +41 -6
- package/es/resolver/apidom/reference/dereference/strategies/openapi-3-1-swagger-client/visitors/dereference.js +7 -5
- package/lib/execute/index.js +1 -1
- package/lib/execute/oas3/build-request.js +2 -1
- package/lib/http/index.js +39 -6
- package/lib/resolver/apidom/reference/dereference/strategies/openapi-3-1-swagger-client/visitors/all-of.js +4 -4
- package/lib/resolver/apidom/reference/dereference/strategies/openapi-3-1-swagger-client/visitors/dereference.js +15 -13
- package/lib/resolver/apidom/reference/dereference/strategies/openapi-3-1-swagger-client/visitors/parameters.js +2 -2
- package/lib/resolver/apidom/reference/dereference/strategies/openapi-3-1-swagger-client/visitors/properties.js +2 -2
- package/package.json +14 -14
package/es/execute/index.js
CHANGED
|
@@ -240,7 +240,7 @@ export function buildRequest(options) {
|
|
|
240
240
|
}
|
|
241
241
|
if (req.cookies) {
|
|
242
242
|
// even if no cookies were defined, we need to remove
|
|
243
|
-
// the cookies key from our request, or many
|
|
243
|
+
// the cookies key from our request, or many legacy
|
|
244
244
|
// tests will break.
|
|
245
245
|
delete req.cookies;
|
|
246
246
|
}
|
|
@@ -63,7 +63,7 @@ export default function buildRequest(options, req) {
|
|
|
63
63
|
// contentType that has been explicitly set
|
|
64
64
|
if (requestContentType === 'application/x-www-form-urlencoded' || requestContentType === 'multipart/form-data') {
|
|
65
65
|
if (typeof requestBody === 'object') {
|
|
66
|
-
const encoding =
|
|
66
|
+
const encoding = requestBodyDef.content[requestContentType]?.encoding ?? {};
|
|
67
67
|
req.form = {};
|
|
68
68
|
Object.keys(requestBody).forEach(k => {
|
|
69
69
|
req.form[k] = {
|
package/es/http/index.js
CHANGED
|
@@ -182,6 +182,29 @@ const SEPARATORS = {
|
|
|
182
182
|
pipes: '|'
|
|
183
183
|
};
|
|
184
184
|
|
|
185
|
+
/**
|
|
186
|
+
* Specialized sub-class of File class, that only
|
|
187
|
+
* accepts string data and retain this data in `data`
|
|
188
|
+
* public property throughout the lifecycle of its instances.
|
|
189
|
+
*
|
|
190
|
+
* This sub-class is exclusively used only when Encoding Object
|
|
191
|
+
* is defined within the Media Type Object (OpenAPI 3.x.y).
|
|
192
|
+
*/
|
|
193
|
+
class FileWithData extends File {
|
|
194
|
+
constructor(data) {
|
|
195
|
+
let name = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
196
|
+
let options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
197
|
+
super([data], name, options);
|
|
198
|
+
this.data = data;
|
|
199
|
+
}
|
|
200
|
+
valueOf() {
|
|
201
|
+
return this.data;
|
|
202
|
+
}
|
|
203
|
+
toString() {
|
|
204
|
+
return this.valueOf();
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
|
|
185
208
|
// Formats a key-value and returns an array of key-value pairs.
|
|
186
209
|
//
|
|
187
210
|
// Return value example 1: [['color', 'blue']]
|
|
@@ -230,13 +253,21 @@ function formatKeyValue(key, input) {
|
|
|
230
253
|
allowReserved
|
|
231
254
|
});
|
|
232
255
|
}
|
|
233
|
-
if (encoding.contentType) {
|
|
234
|
-
if (encoding.contentType
|
|
235
|
-
//
|
|
256
|
+
if (typeof encoding.contentType === 'string') {
|
|
257
|
+
if (encoding.contentType.startsWith('application/json')) {
|
|
258
|
+
// if value is a string, assume value is already a JSON string
|
|
236
259
|
const json = typeof value === 'string' ? value : JSON.stringify(value);
|
|
237
|
-
|
|
260
|
+
const encodedJson = encodeFn(json);
|
|
261
|
+
const file = new FileWithData(encodedJson, 'blob', {
|
|
262
|
+
type: encoding.contentType
|
|
263
|
+
});
|
|
264
|
+
return [[encodedKey, file]];
|
|
238
265
|
}
|
|
239
|
-
|
|
266
|
+
const encodedData = encodeFn(String(value));
|
|
267
|
+
const blob = new FileWithData(encodedData, 'blob', {
|
|
268
|
+
type: encoding.contentType
|
|
269
|
+
});
|
|
270
|
+
return [[encodedKey, blob]];
|
|
240
271
|
}
|
|
241
272
|
|
|
242
273
|
// Primitive
|
|
@@ -357,7 +388,11 @@ export function encodeFormOrQuery(data) {
|
|
|
357
388
|
const encodedQuery = Object.keys(data).reduce((result, parameterName) => {
|
|
358
389
|
// eslint-disable-next-line no-restricted-syntax
|
|
359
390
|
for (const [key, value] of formatKeyValue(parameterName, data[parameterName])) {
|
|
360
|
-
|
|
391
|
+
if (value instanceof FileWithData) {
|
|
392
|
+
result[key] = value.valueOf();
|
|
393
|
+
} else {
|
|
394
|
+
result[key] = value;
|
|
395
|
+
}
|
|
361
396
|
}
|
|
362
397
|
return result;
|
|
363
398
|
}, {});
|
|
@@ -51,7 +51,9 @@ const OpenApi3_1SwaggerClientDereferenceVisitor = OpenApi3_1DereferenceVisitor.c
|
|
|
51
51
|
return false;
|
|
52
52
|
}
|
|
53
53
|
const reference = await this.toReference(referenceElement.$ref.toValue());
|
|
54
|
-
const
|
|
54
|
+
const {
|
|
55
|
+
uri: retrievalURI
|
|
56
|
+
} = reference;
|
|
55
57
|
const $refBaseURI = url.resolve(retrievalURI, referenceElement.$ref.toValue());
|
|
56
58
|
this.indirections.push(referenceElement);
|
|
57
59
|
const jsonPointer = uriToPointer($refBaseURI);
|
|
@@ -188,7 +190,9 @@ const OpenApi3_1SwaggerClientDereferenceVisitor = OpenApi3_1DereferenceVisitor.c
|
|
|
188
190
|
return undefined;
|
|
189
191
|
}
|
|
190
192
|
const reference = await this.toReference(pathItemElement.$ref.toValue());
|
|
191
|
-
const
|
|
193
|
+
const {
|
|
194
|
+
uri: retrievalURI
|
|
195
|
+
} = reference;
|
|
192
196
|
const $refBaseURI = url.resolve(retrievalURI, pathItemElement.$ref.toValue());
|
|
193
197
|
this.indirections.push(pathItemElement);
|
|
194
198
|
const jsonPointer = uriToPointer($refBaseURI);
|
|
@@ -310,9 +314,7 @@ const OpenApi3_1SwaggerClientDereferenceVisitor = OpenApi3_1DereferenceVisitor.c
|
|
|
310
314
|
}
|
|
311
315
|
|
|
312
316
|
// compute baseURI using rules around $id and $ref keywords
|
|
313
|
-
let
|
|
314
|
-
reference
|
|
315
|
-
} = this;
|
|
317
|
+
let reference = await this.toReference(url.unsanitize(this.reference.uri));
|
|
316
318
|
let {
|
|
317
319
|
uri: retrievalURI
|
|
318
320
|
} = reference;
|
package/lib/execute/index.js
CHANGED
|
@@ -256,7 +256,7 @@ function buildRequest(options) {
|
|
|
256
256
|
}
|
|
257
257
|
if (req.cookies) {
|
|
258
258
|
// even if no cookies were defined, we need to remove
|
|
259
|
-
// the cookies key from our request, or many
|
|
259
|
+
// the cookies key from our request, or many legacy
|
|
260
260
|
// tests will break.
|
|
261
261
|
delete req.cookies;
|
|
262
262
|
}
|
|
@@ -68,7 +68,8 @@ function buildRequest(options, req) {
|
|
|
68
68
|
// contentType that has been explicitly set
|
|
69
69
|
if (requestContentType === 'application/x-www-form-urlencoded' || requestContentType === 'multipart/form-data') {
|
|
70
70
|
if (typeof requestBody === 'object') {
|
|
71
|
-
|
|
71
|
+
var _requestBodyDef$conte, _requestBodyDef$conte2;
|
|
72
|
+
const encoding = (_requestBodyDef$conte = (_requestBodyDef$conte2 = requestBodyDef.content[requestContentType]) === null || _requestBodyDef$conte2 === void 0 ? void 0 : _requestBodyDef$conte2.encoding) !== null && _requestBodyDef$conte !== void 0 ? _requestBodyDef$conte : {};
|
|
72
73
|
req.form = {};
|
|
73
74
|
Object.keys(requestBody).forEach(k => {
|
|
74
75
|
req.form[k] = {
|
package/lib/http/index.js
CHANGED
|
@@ -189,6 +189,27 @@ const SEPARATORS = {
|
|
|
189
189
|
pipes: '|'
|
|
190
190
|
};
|
|
191
191
|
|
|
192
|
+
/**
|
|
193
|
+
* Specialized sub-class of File class, that only
|
|
194
|
+
* accepts string data and retain this data in `data`
|
|
195
|
+
* public property throughout the lifecycle of its instances.
|
|
196
|
+
*
|
|
197
|
+
* This sub-class is exclusively used only when Encoding Object
|
|
198
|
+
* is defined within the Media Type Object (OpenAPI 3.x.y).
|
|
199
|
+
*/
|
|
200
|
+
class FileWithData extends _formdataNode.File {
|
|
201
|
+
constructor(data, name = '', options = {}) {
|
|
202
|
+
super([data], name, options);
|
|
203
|
+
this.data = data;
|
|
204
|
+
}
|
|
205
|
+
valueOf() {
|
|
206
|
+
return this.data;
|
|
207
|
+
}
|
|
208
|
+
toString() {
|
|
209
|
+
return this.valueOf();
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
|
|
192
213
|
// Formats a key-value and returns an array of key-value pairs.
|
|
193
214
|
//
|
|
194
215
|
// Return value example 1: [['color', 'blue']]
|
|
@@ -236,13 +257,21 @@ function formatKeyValue(key, input, skipEncoding = false) {
|
|
|
236
257
|
allowReserved
|
|
237
258
|
});
|
|
238
259
|
}
|
|
239
|
-
if (encoding.contentType) {
|
|
240
|
-
if (encoding.contentType
|
|
241
|
-
//
|
|
260
|
+
if (typeof encoding.contentType === 'string') {
|
|
261
|
+
if (encoding.contentType.startsWith('application/json')) {
|
|
262
|
+
// if value is a string, assume value is already a JSON string
|
|
242
263
|
const json = typeof value === 'string' ? value : JSON.stringify(value);
|
|
243
|
-
|
|
264
|
+
const encodedJson = encodeFn(json);
|
|
265
|
+
const file = new FileWithData(encodedJson, 'blob', {
|
|
266
|
+
type: encoding.contentType
|
|
267
|
+
});
|
|
268
|
+
return [[encodedKey, file]];
|
|
244
269
|
}
|
|
245
|
-
|
|
270
|
+
const encodedData = encodeFn(String(value));
|
|
271
|
+
const blob = new FileWithData(encodedData, 'blob', {
|
|
272
|
+
type: encoding.contentType
|
|
273
|
+
});
|
|
274
|
+
return [[encodedKey, blob]];
|
|
246
275
|
}
|
|
247
276
|
|
|
248
277
|
// Primitive
|
|
@@ -362,7 +391,11 @@ function encodeFormOrQuery(data) {
|
|
|
362
391
|
const encodedQuery = Object.keys(data).reduce((result, parameterName) => {
|
|
363
392
|
// eslint-disable-next-line no-restricted-syntax
|
|
364
393
|
for (const [key, value] of formatKeyValue(parameterName, data[parameterName])) {
|
|
365
|
-
|
|
394
|
+
if (value instanceof FileWithData) {
|
|
395
|
+
result[key] = value.valueOf();
|
|
396
|
+
} else {
|
|
397
|
+
result[key] = value;
|
|
398
|
+
}
|
|
366
399
|
}
|
|
367
400
|
return result;
|
|
368
401
|
}, {});
|
|
@@ -22,10 +22,10 @@ const AllOfVisitor = (0, _compose.default)({
|
|
|
22
22
|
|
|
23
23
|
// collect error and return if allOf keyword is not an array
|
|
24
24
|
if (!(0, _apidomCore.isArrayElement)(schemaElement.allOf)) {
|
|
25
|
-
var _this$options$derefer, _this$options$derefer2
|
|
25
|
+
var _this$options$derefer, _this$options$derefer2;
|
|
26
26
|
const error = new TypeError('allOf must be an array');
|
|
27
27
|
error.fullPath = [...(0, _toPath.default)([...ancestors, parent, schemaElement]), 'allOf'];
|
|
28
|
-
(_this$options$derefer = this.options.dereference.dereferenceOpts) === null || _this$options$derefer === void 0
|
|
28
|
+
(_this$options$derefer = this.options.dereference.dereferenceOpts) === null || _this$options$derefer === void 0 || (_this$options$derefer = _this$options$derefer.errors) === null || _this$options$derefer === void 0 || (_this$options$derefer2 = _this$options$derefer.push) === null || _this$options$derefer2 === void 0 ? void 0 : _this$options$derefer2.call(_this$options$derefer, error);
|
|
29
29
|
return undefined;
|
|
30
30
|
}
|
|
31
31
|
|
|
@@ -37,10 +37,10 @@ const AllOfVisitor = (0, _compose.default)({
|
|
|
37
37
|
// collect errors if allOf keyword contains anything else than Schema Object
|
|
38
38
|
const includesSchemaElementOnly = schemaElement.allOf.content.every(_apidomNsOpenapi.isSchemaElement);
|
|
39
39
|
if (!includesSchemaElementOnly) {
|
|
40
|
-
var _this$options$
|
|
40
|
+
var _this$options$derefer3, _this$options$derefer4;
|
|
41
41
|
const error = new TypeError('Elements in allOf must be objects');
|
|
42
42
|
error.fullPath = [...(0, _toPath.default)([...ancestors, parent, schemaElement]), 'allOf'];
|
|
43
|
-
(_this$options$
|
|
43
|
+
(_this$options$derefer3 = this.options.dereference.dereferenceOpts) === null || _this$options$derefer3 === void 0 || (_this$options$derefer3 = _this$options$derefer3.errors) === null || _this$options$derefer3 === void 0 || (_this$options$derefer4 = _this$options$derefer3.push) === null || _this$options$derefer4 === void 0 ? void 0 : _this$options$derefer4.call(_this$options$derefer3, error);
|
|
44
44
|
return undefined;
|
|
45
45
|
}
|
|
46
46
|
const mergedSchemaElement = _apidomCore.deepmerge.all([...schemaElement.allOf.content, schemaElement]);
|
|
@@ -57,7 +57,9 @@ const OpenApi3_1SwaggerClientDereferenceVisitor = _openapi.OpenApi3_1Dereference
|
|
|
57
57
|
return false;
|
|
58
58
|
}
|
|
59
59
|
const reference = await this.toReference(referenceElement.$ref.toValue());
|
|
60
|
-
const
|
|
60
|
+
const {
|
|
61
|
+
uri: retrievalURI
|
|
62
|
+
} = reference;
|
|
61
63
|
const $refBaseURI = _empty.url.resolve(retrievalURI, referenceElement.$ref.toValue());
|
|
62
64
|
this.indirections.push(referenceElement);
|
|
63
65
|
const jsonPointer = (0, _apidomJsonPointer.uriToPointer)($refBaseURI);
|
|
@@ -158,7 +160,7 @@ const OpenApi3_1SwaggerClientDereferenceVisitor = _openapi.OpenApi3_1Dereference
|
|
|
158
160
|
// transclude the element for a fragment
|
|
159
161
|
return fragment;
|
|
160
162
|
} catch (error) {
|
|
161
|
-
var _this$basePath2, _this$options$derefer, _this$options$derefer2
|
|
163
|
+
var _this$basePath2, _this$options$derefer, _this$options$derefer2;
|
|
162
164
|
const rootCause = (0, _getRootCause.default)(error);
|
|
163
165
|
const wrappedError = wrapError(rootCause, {
|
|
164
166
|
baseDoc: this.reference.uri,
|
|
@@ -166,7 +168,7 @@ const OpenApi3_1SwaggerClientDereferenceVisitor = _openapi.OpenApi3_1Dereference
|
|
|
166
168
|
pointer: (0, _apidomJsonPointer.uriToPointer)(referenceElement.$ref.toValue()),
|
|
167
169
|
fullPath: (_this$basePath2 = this.basePath) !== null && _this$basePath2 !== void 0 ? _this$basePath2 : [...(0, _toPath.default)([...ancestors, parent, referenceElement]), '$ref']
|
|
168
170
|
});
|
|
169
|
-
(_this$options$derefer = this.options.dereference.dereferenceOpts) === null || _this$options$derefer === void 0
|
|
171
|
+
(_this$options$derefer = this.options.dereference.dereferenceOpts) === null || _this$options$derefer === void 0 || (_this$options$derefer = _this$options$derefer.errors) === null || _this$options$derefer === void 0 || (_this$options$derefer2 = _this$options$derefer.push) === null || _this$options$derefer2 === void 0 ? void 0 : _this$options$derefer2.call(_this$options$derefer, wrappedError);
|
|
170
172
|
return undefined;
|
|
171
173
|
}
|
|
172
174
|
},
|
|
@@ -196,7 +198,9 @@ const OpenApi3_1SwaggerClientDereferenceVisitor = _openapi.OpenApi3_1Dereference
|
|
|
196
198
|
return undefined;
|
|
197
199
|
}
|
|
198
200
|
const reference = await this.toReference(pathItemElement.$ref.toValue());
|
|
199
|
-
const
|
|
201
|
+
const {
|
|
202
|
+
uri: retrievalURI
|
|
203
|
+
} = reference;
|
|
200
204
|
const $refBaseURI = _empty.url.resolve(retrievalURI, pathItemElement.$ref.toValue());
|
|
201
205
|
this.indirections.push(pathItemElement);
|
|
202
206
|
const jsonPointer = (0, _apidomJsonPointer.uriToPointer)($refBaseURI);
|
|
@@ -285,7 +289,7 @@ const OpenApi3_1SwaggerClientDereferenceVisitor = _openapi.OpenApi3_1Dereference
|
|
|
285
289
|
// transclude referencing element with merged referenced element
|
|
286
290
|
return mergedPathItemElement;
|
|
287
291
|
} catch (error) {
|
|
288
|
-
var _this$basePath4, _this$options$
|
|
292
|
+
var _this$basePath4, _this$options$derefer3, _this$options$derefer4;
|
|
289
293
|
const rootCause = (0, _getRootCause.default)(error);
|
|
290
294
|
const wrappedError = wrapError(rootCause, {
|
|
291
295
|
baseDoc: this.reference.uri,
|
|
@@ -293,7 +297,7 @@ const OpenApi3_1SwaggerClientDereferenceVisitor = _openapi.OpenApi3_1Dereference
|
|
|
293
297
|
pointer: (0, _apidomJsonPointer.uriToPointer)(pathItemElement.$ref.toValue()),
|
|
294
298
|
fullPath: (_this$basePath4 = this.basePath) !== null && _this$basePath4 !== void 0 ? _this$basePath4 : [...(0, _toPath.default)([...ancestors, parent, pathItemElement]), '$ref']
|
|
295
299
|
});
|
|
296
|
-
(_this$options$
|
|
300
|
+
(_this$options$derefer3 = this.options.dereference.dereferenceOpts) === null || _this$options$derefer3 === void 0 || (_this$options$derefer3 = _this$options$derefer3.errors) === null || _this$options$derefer3 === void 0 || (_this$options$derefer4 = _this$options$derefer3.push) === null || _this$options$derefer4 === void 0 ? void 0 : _this$options$derefer4.call(_this$options$derefer3, wrappedError);
|
|
297
301
|
return undefined;
|
|
298
302
|
}
|
|
299
303
|
},
|
|
@@ -320,9 +324,7 @@ const OpenApi3_1SwaggerClientDereferenceVisitor = _openapi.OpenApi3_1Dereference
|
|
|
320
324
|
}
|
|
321
325
|
|
|
322
326
|
// compute baseURI using rules around $id and $ref keywords
|
|
323
|
-
let
|
|
324
|
-
reference
|
|
325
|
-
} = this;
|
|
327
|
+
let reference = await this.toReference(_empty.url.unsanitize(this.reference.uri));
|
|
326
328
|
let {
|
|
327
329
|
uri: retrievalURI
|
|
328
330
|
} = reference;
|
|
@@ -471,14 +473,14 @@ const OpenApi3_1SwaggerClientDereferenceVisitor = _openapi.OpenApi3_1Dereference
|
|
|
471
473
|
// transclude referencing element with merged referenced element
|
|
472
474
|
return mergedSchemaElement;
|
|
473
475
|
} catch (error) {
|
|
474
|
-
var _this$basePath6, _this$options$
|
|
476
|
+
var _this$basePath6, _this$options$derefer5, _this$options$derefer6;
|
|
475
477
|
const rootCause = (0, _getRootCause.default)(error);
|
|
476
478
|
const wrappedError = new _index.SchemaRefError(`Could not resolve reference: ${rootCause.message}`, {
|
|
477
479
|
baseDoc: this.reference.uri,
|
|
478
480
|
$ref: referencingElement.$ref.toValue(),
|
|
479
481
|
fullPath: (_this$basePath6 = this.basePath) !== null && _this$basePath6 !== void 0 ? _this$basePath6 : [...(0, _toPath.default)([...ancestors, parent, referencingElement]), '$ref']
|
|
480
482
|
}, rootCause);
|
|
481
|
-
(_this$options$
|
|
483
|
+
(_this$options$derefer5 = this.options.dereference.dereferenceOpts) === null || _this$options$derefer5 === void 0 || (_this$options$derefer5 = _this$options$derefer5.errors) === null || _this$options$derefer5 === void 0 || (_this$options$derefer6 = _this$options$derefer5.push) === null || _this$options$derefer6 === void 0 ? void 0 : _this$options$derefer6.call(_this$options$derefer5, wrappedError);
|
|
482
484
|
return undefined;
|
|
483
485
|
}
|
|
484
486
|
},
|
|
@@ -494,14 +496,14 @@ const OpenApi3_1SwaggerClientDereferenceVisitor = _openapi.OpenApi3_1Dereference
|
|
|
494
496
|
try {
|
|
495
497
|
return await _openapi.OpenApi3_1DereferenceVisitor.compose.methods.ExampleElement.call(this, exampleElement, key, parent, path, ancestors);
|
|
496
498
|
} catch (error) {
|
|
497
|
-
var _exampleElement$exter, _this$basePath7, _this$options$
|
|
499
|
+
var _exampleElement$exter, _this$basePath7, _this$options$derefer7, _this$options$derefer8;
|
|
498
500
|
const rootCause = (0, _getRootCause.default)(error);
|
|
499
501
|
const wrappedError = wrapError(rootCause, {
|
|
500
502
|
baseDoc: this.reference.uri,
|
|
501
503
|
externalValue: (_exampleElement$exter = exampleElement.externalValue) === null || _exampleElement$exter === void 0 ? void 0 : _exampleElement$exter.toValue(),
|
|
502
504
|
fullPath: (_this$basePath7 = this.basePath) !== null && _this$basePath7 !== void 0 ? _this$basePath7 : [...(0, _toPath.default)([...ancestors, parent, exampleElement]), 'externalValue']
|
|
503
505
|
});
|
|
504
|
-
(_this$options$
|
|
506
|
+
(_this$options$derefer7 = this.options.dereference.dereferenceOpts) === null || _this$options$derefer7 === void 0 || (_this$options$derefer7 = _this$options$derefer7.errors) === null || _this$options$derefer7 === void 0 || (_this$options$derefer8 = _this$options$derefer7.push) === null || _this$options$derefer8 === void 0 ? void 0 : _this$options$derefer8.call(_this$options$derefer7, wrappedError);
|
|
505
507
|
return undefined;
|
|
506
508
|
}
|
|
507
509
|
}
|
|
@@ -34,12 +34,12 @@ const ParameterMacroVisitor = (0, _compose.default)({
|
|
|
34
34
|
const macroValue = this.parameterMacro(pojoOperation, pojoParameter);
|
|
35
35
|
parameterElement.set('default', macroValue);
|
|
36
36
|
} catch (error) {
|
|
37
|
-
var _this$options$derefer, _this$options$derefer2
|
|
37
|
+
var _this$options$derefer, _this$options$derefer2;
|
|
38
38
|
const macroError = new Error(error, {
|
|
39
39
|
cause: error
|
|
40
40
|
});
|
|
41
41
|
macroError.fullPath = (0, _toPath.default)([...ancestors, parent]);
|
|
42
|
-
(_this$options$derefer = this.options.dereference.dereferenceOpts) === null || _this$options$derefer === void 0
|
|
42
|
+
(_this$options$derefer = this.options.dereference.dereferenceOpts) === null || _this$options$derefer === void 0 || (_this$options$derefer = _this$options$derefer.errors) === null || _this$options$derefer === void 0 || (_this$options$derefer2 = _this$options$derefer.push) === null || _this$options$derefer2 === void 0 ? void 0 : _this$options$derefer2.call(_this$options$derefer, macroError);
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
}
|
|
@@ -27,12 +27,12 @@ const ModelPropertyMacroVisitor = (0, _compose.default)({
|
|
|
27
27
|
const macroValue = this.modelPropertyMacro((0, _apidomCore.toValue)(property));
|
|
28
28
|
property.set('default', macroValue);
|
|
29
29
|
} catch (error) {
|
|
30
|
-
var _this$options$derefer, _this$options$derefer2
|
|
30
|
+
var _this$options$derefer, _this$options$derefer2;
|
|
31
31
|
const macroError = new Error(error, {
|
|
32
32
|
cause: error
|
|
33
33
|
});
|
|
34
34
|
macroError.fullPath = [...(0, _toPath.default)([...ancestors, parent, schemaElement]), 'properties'];
|
|
35
|
-
(_this$options$derefer = this.options.dereference.dereferenceOpts) === null || _this$options$derefer === void 0
|
|
35
|
+
(_this$options$derefer = this.options.dereference.dereferenceOpts) === null || _this$options$derefer === void 0 || (_this$options$derefer = _this$options$derefer.errors) === null || _this$options$derefer === void 0 || (_this$options$derefer2 = _this$options$derefer.push) === null || _this$options$derefer2 === void 0 ? void 0 : _this$options$derefer2.call(_this$options$derefer, macroError);
|
|
36
36
|
}
|
|
37
37
|
});
|
|
38
38
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "swagger-client",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.20.0",
|
|
4
4
|
"description": "SwaggerJS - a collection of interfaces for OAI specs",
|
|
5
5
|
"browser": {
|
|
6
6
|
"./src/http/fold-formdata-to-request.node.js": "./src/http/fold-formdata-to-request.browser.js",
|
|
@@ -79,17 +79,17 @@
|
|
|
79
79
|
"@commitlint/cli": "^17.0.0",
|
|
80
80
|
"@commitlint/config-conventional": "^17.0.0",
|
|
81
81
|
"abort-controller": "^3.0.0",
|
|
82
|
-
"babel-loader": "=9.1.
|
|
82
|
+
"babel-loader": "=9.1.3",
|
|
83
83
|
"babel-plugin-lodash": "=3.3.4",
|
|
84
84
|
"cross-env": "=7.0.3",
|
|
85
85
|
"eslint": "^8.42.0",
|
|
86
86
|
"eslint-config-airbnb-base": "^15.0.0",
|
|
87
|
-
"eslint-config-prettier": "=8.
|
|
88
|
-
"eslint-plugin-import": "=2.
|
|
89
|
-
"eslint-plugin-prettier": "=
|
|
87
|
+
"eslint-config-prettier": "=8.9.0",
|
|
88
|
+
"eslint-plugin-import": "=2.28.0",
|
|
89
|
+
"eslint-plugin-prettier": "=5.0.0",
|
|
90
90
|
"expect": "^29.0.3",
|
|
91
91
|
"fetch-mock": "=9.11.0",
|
|
92
|
-
"glob": "=10.
|
|
92
|
+
"glob": "=10.3.3",
|
|
93
93
|
"husky": "^8.0.1",
|
|
94
94
|
"inspectpack": "=4.7.1",
|
|
95
95
|
"install": "=0.13.0",
|
|
@@ -97,16 +97,16 @@
|
|
|
97
97
|
"jest-environment-jsdom": "^29.0.3",
|
|
98
98
|
"json-loader": "=0.5.7",
|
|
99
99
|
"license-checker": "=25.0.1",
|
|
100
|
-
"lint-staged": "=13.2.
|
|
100
|
+
"lint-staged": "=13.2.3",
|
|
101
101
|
"lodash-webpack-plugin": "=0.11.6",
|
|
102
|
-
"nock": "=13.3.
|
|
102
|
+
"nock": "=13.3.2",
|
|
103
103
|
"node-fetch": "^2.6.7",
|
|
104
104
|
"npm-run-all": "=4.1.5",
|
|
105
|
-
"prettier": "^
|
|
105
|
+
"prettier": "^3.0.0",
|
|
106
106
|
"rimraf": "=5.0.1",
|
|
107
107
|
"source-map-explorer": "^2.5.3",
|
|
108
108
|
"terser-webpack-plugin": "^5.0.3",
|
|
109
|
-
"webpack": "=5.
|
|
109
|
+
"webpack": "=5.88.2",
|
|
110
110
|
"webpack-bundle-size-analyzer": "=3.1.0",
|
|
111
111
|
"webpack-cli": "=5.1.4",
|
|
112
112
|
"webpack-stats-plugin": "=1.1.3",
|
|
@@ -114,10 +114,10 @@
|
|
|
114
114
|
},
|
|
115
115
|
"dependencies": {
|
|
116
116
|
"@babel/runtime-corejs3": "^7.20.13",
|
|
117
|
-
"@swagger-api/apidom-core": ">=0.
|
|
118
|
-
"@swagger-api/apidom-json-pointer": ">=0.
|
|
119
|
-
"@swagger-api/apidom-ns-openapi-3-1": ">=0.
|
|
120
|
-
"@swagger-api/apidom-reference": ">=0.
|
|
117
|
+
"@swagger-api/apidom-core": ">=0.74.1 <1.0.0",
|
|
118
|
+
"@swagger-api/apidom-json-pointer": ">=0.74.1 <1.0.0",
|
|
119
|
+
"@swagger-api/apidom-ns-openapi-3-1": ">=0.74.1 <1.0.0",
|
|
120
|
+
"@swagger-api/apidom-reference": ">=0.74.1 <1.0.0",
|
|
121
121
|
"cookie": "~0.5.0",
|
|
122
122
|
"cross-fetch": "^3.1.5",
|
|
123
123
|
"deepmerge": "~4.3.0",
|