swagger-client 3.12.0 → 3.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/es/specmap/lib/refs.js
CHANGED
|
@@ -26,16 +26,62 @@ var JSONRefError = createError('JSONRefError', function cb(message, extra, oriEr
|
|
|
26
26
|
});
|
|
27
27
|
var docCache = {};
|
|
28
28
|
var specmapRefs = new _WeakMap();
|
|
29
|
-
var skipResolutionTestFns = [
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
var skipResolutionTestFns = [// OpenAPI 2.0 response examples
|
|
30
|
+
function (path) {
|
|
31
|
+
return (// ["paths", *, *, "responses", *, "examples"]
|
|
32
|
+
path[0] === 'paths' && path[3] === 'responses' && path[5] === 'examples'
|
|
33
|
+
);
|
|
34
|
+
}, // OpenAPI 3.0 Response Media Type Examples
|
|
35
|
+
function (path) {
|
|
36
|
+
return (// ["paths", *, *, "responses", *, "content", *, "example"]
|
|
32
37
|
path[0] === 'paths' && path[3] === 'responses' && path[5] === 'content' && path[7] === 'example'
|
|
33
38
|
);
|
|
34
39
|
}, function (path) {
|
|
35
|
-
return (//
|
|
36
|
-
|
|
40
|
+
return (// ["paths", *, *, "responses", *, "content", *, "examples", *, "value"]
|
|
41
|
+
path[0] === 'paths' && path[3] === 'responses' && path[5] === 'content' && path[7] === 'examples' && path[9] === 'value'
|
|
42
|
+
);
|
|
43
|
+
}, // OpenAPI 3.0 Request Body Media Type Examples
|
|
44
|
+
function (path) {
|
|
45
|
+
return (// ["paths", *, *, "requestBody", "content", *, "example"]
|
|
37
46
|
path[0] === 'paths' && path[3] === 'requestBody' && path[4] === 'content' && path[6] === 'example'
|
|
38
47
|
);
|
|
48
|
+
}, function (path) {
|
|
49
|
+
return (// ["paths", *, *, "requestBody", "content", *, "examples", *, "value"]
|
|
50
|
+
path[0] === 'paths' && path[3] === 'requestBody' && path[4] === 'content' && path[6] === 'examples' && path[8] === 'value'
|
|
51
|
+
);
|
|
52
|
+
}, // OAS 3.0 Parameter Examples
|
|
53
|
+
function (path) {
|
|
54
|
+
return (// ["paths", *, "parameters", *, "example"]
|
|
55
|
+
path[0] === 'paths' && path[2] === 'parameters' && path[4] === 'example'
|
|
56
|
+
);
|
|
57
|
+
}, function (path) {
|
|
58
|
+
return (// ["paths", *, *, "parameters", *, "example"]
|
|
59
|
+
path[0] === 'paths' && path[3] === 'parameters' && path[5] === 'example'
|
|
60
|
+
);
|
|
61
|
+
}, function (path) {
|
|
62
|
+
return (// ["paths", *, "parameters", *, "examples", *, "value"]
|
|
63
|
+
path[0] === 'paths' && path[2] === 'parameters' && path[4] === 'examples' && path[6] === 'value'
|
|
64
|
+
);
|
|
65
|
+
}, function (path) {
|
|
66
|
+
return (// ["paths", *, *, "parameters", *, "examples", *, "value"]
|
|
67
|
+
path[0] === 'paths' && path[3] === 'parameters' && path[5] === 'examples' && path[7] === 'value'
|
|
68
|
+
);
|
|
69
|
+
}, function (path) {
|
|
70
|
+
return (// ["paths", *, "parameters", *, "content", *, "example"]
|
|
71
|
+
path[0] === 'paths' && path[2] === 'parameters' && path[4] === 'content' && path[6] === 'example'
|
|
72
|
+
);
|
|
73
|
+
}, function (path) {
|
|
74
|
+
return (// ["paths", *, "parameters", *, "content", *, "examples", *, "value"]
|
|
75
|
+
path[0] === 'paths' && path[2] === 'parameters' && path[4] === 'content' && path[6] === 'examples' && path[8] === 'value'
|
|
76
|
+
);
|
|
77
|
+
}, function (path) {
|
|
78
|
+
return (// ["paths", *, *, "parameters", *, "content", *, "example"]
|
|
79
|
+
path[0] === 'paths' && path[3] === 'parameters' && path[4] === 'content' && path[7] === 'example'
|
|
80
|
+
);
|
|
81
|
+
}, function (path) {
|
|
82
|
+
return (// ["paths", *, *, "parameters", *, "content", *, "examples", *, "value"]
|
|
83
|
+
path[0] === 'paths' && path[3] === 'parameters' && path[5] === 'content' && path[7] === 'examples' && path[9] === 'value'
|
|
84
|
+
);
|
|
39
85
|
}];
|
|
40
86
|
|
|
41
87
|
var shouldSkipResolution = function shouldSkipResolution(path) {
|
package/lib/specmap/lib/refs.js
CHANGED
|
@@ -28,11 +28,24 @@ const JSONRefError = (0, _createError.default)('JSONRefError', function cb(messa
|
|
|
28
28
|
});
|
|
29
29
|
const docCache = {};
|
|
30
30
|
const specmapRefs = new WeakMap();
|
|
31
|
-
const skipResolutionTestFns = [
|
|
32
|
-
// ["paths", *, *, "responses", *, "
|
|
33
|
-
path[0] === 'paths' && path[3] === 'responses' && path[5] === '
|
|
34
|
-
// ["paths", *, *, "responses", *, "content", *, "example"]
|
|
35
|
-
path[0] === 'paths' && path[3] === '
|
|
31
|
+
const skipResolutionTestFns = [// OpenAPI 2.0 response examples
|
|
32
|
+
path => // ["paths", *, *, "responses", *, "examples"]
|
|
33
|
+
path[0] === 'paths' && path[3] === 'responses' && path[5] === 'examples', // OpenAPI 3.0 Response Media Type Examples
|
|
34
|
+
path => // ["paths", *, *, "responses", *, "content", *, "example"]
|
|
35
|
+
path[0] === 'paths' && path[3] === 'responses' && path[5] === 'content' && path[7] === 'example', path => // ["paths", *, *, "responses", *, "content", *, "examples", *, "value"]
|
|
36
|
+
path[0] === 'paths' && path[3] === 'responses' && path[5] === 'content' && path[7] === 'examples' && path[9] === 'value', // OpenAPI 3.0 Request Body Media Type Examples
|
|
37
|
+
path => // ["paths", *, *, "requestBody", "content", *, "example"]
|
|
38
|
+
path[0] === 'paths' && path[3] === 'requestBody' && path[4] === 'content' && path[6] === 'example', path => // ["paths", *, *, "requestBody", "content", *, "examples", *, "value"]
|
|
39
|
+
path[0] === 'paths' && path[3] === 'requestBody' && path[4] === 'content' && path[6] === 'examples' && path[8] === 'value', // OAS 3.0 Parameter Examples
|
|
40
|
+
path => // ["paths", *, "parameters", *, "example"]
|
|
41
|
+
path[0] === 'paths' && path[2] === 'parameters' && path[4] === 'example', path => // ["paths", *, *, "parameters", *, "example"]
|
|
42
|
+
path[0] === 'paths' && path[3] === 'parameters' && path[5] === 'example', path => // ["paths", *, "parameters", *, "examples", *, "value"]
|
|
43
|
+
path[0] === 'paths' && path[2] === 'parameters' && path[4] === 'examples' && path[6] === 'value', path => // ["paths", *, *, "parameters", *, "examples", *, "value"]
|
|
44
|
+
path[0] === 'paths' && path[3] === 'parameters' && path[5] === 'examples' && path[7] === 'value', path => // ["paths", *, "parameters", *, "content", *, "example"]
|
|
45
|
+
path[0] === 'paths' && path[2] === 'parameters' && path[4] === 'content' && path[6] === 'example', path => // ["paths", *, "parameters", *, "content", *, "examples", *, "value"]
|
|
46
|
+
path[0] === 'paths' && path[2] === 'parameters' && path[4] === 'content' && path[6] === 'examples' && path[8] === 'value', path => // ["paths", *, *, "parameters", *, "content", *, "example"]
|
|
47
|
+
path[0] === 'paths' && path[3] === 'parameters' && path[4] === 'content' && path[7] === 'example', path => // ["paths", *, *, "parameters", *, "content", *, "examples", *, "value"]
|
|
48
|
+
path[0] === 'paths' && path[3] === 'parameters' && path[5] === 'content' && path[7] === 'examples' && path[9] === 'value'];
|
|
36
49
|
|
|
37
50
|
const shouldSkipResolution = path => skipResolutionTestFns.some(fn => fn(path)); // =========================
|
|
38
51
|
// Core
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "swagger-client",
|
|
3
|
-
"version": "3.12.
|
|
3
|
+
"version": "3.12.1",
|
|
4
4
|
"description": "SwaggerJS - a collection of interfaces for OAI specs",
|
|
5
5
|
"main": "lib/commonjs.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -60,53 +60,53 @@
|
|
|
60
60
|
],
|
|
61
61
|
"license": "Apache-2.0",
|
|
62
62
|
"devDependencies": {
|
|
63
|
-
"@babel/cli": "=7.12.
|
|
64
|
-
"@babel/core": "=7.12.
|
|
63
|
+
"@babel/cli": "=7.12.8",
|
|
64
|
+
"@babel/core": "=7.12.9",
|
|
65
65
|
"@babel/plugin-proposal-class-properties": "=7.12.1",
|
|
66
66
|
"@babel/plugin-proposal-object-rest-spread": "=7.12.1",
|
|
67
67
|
"@babel/plugin-transform-runtime": "=7.12.1",
|
|
68
|
-
"@babel/preset-env": "=7.12.
|
|
68
|
+
"@babel/preset-env": "=7.12.7",
|
|
69
69
|
"@babel/register": "=7.12.1",
|
|
70
70
|
"@char0n/npm-audit": "gist:2964395223d7943c10396f59df9a8ea0",
|
|
71
71
|
"@commitlint/cli": "^11.0.0",
|
|
72
72
|
"@commitlint/config-conventional": "^11.0.0",
|
|
73
73
|
"@release-it/conventional-changelog": "^1.1.4",
|
|
74
|
-
"babel-loader": "=8.1
|
|
74
|
+
"babel-loader": "=8.2.1",
|
|
75
75
|
"babel-plugin-lodash": "=3.3.4",
|
|
76
76
|
"cross-env": "=7.0.2",
|
|
77
|
-
"eslint": "=7.
|
|
78
|
-
"eslint-config-airbnb-base": "=14.2.
|
|
77
|
+
"eslint": "=7.14.0",
|
|
78
|
+
"eslint-config-airbnb-base": "=14.2.1",
|
|
79
79
|
"eslint-config-prettier": "=6.15.0",
|
|
80
80
|
"eslint-plugin-import": "=2.22.1",
|
|
81
81
|
"eslint-plugin-prettier": "=3.1.4",
|
|
82
|
-
"expect": "=26.6.
|
|
83
|
-
"fetch-mock": "=9.
|
|
82
|
+
"expect": "=26.6.2",
|
|
83
|
+
"fetch-mock": "=9.11.0",
|
|
84
84
|
"glob": "=7.1.6",
|
|
85
85
|
"husky": "=4.3.0",
|
|
86
86
|
"inspectpack": "=4.5.2",
|
|
87
87
|
"install": "=0.13.0",
|
|
88
|
-
"jest": "=26.6.
|
|
88
|
+
"jest": "=26.6.3",
|
|
89
89
|
"json-loader": "=0.5.7",
|
|
90
90
|
"license-checker": "=25.0.1",
|
|
91
|
-
"lint-staged": "=10.5.
|
|
91
|
+
"lint-staged": "=10.5.2",
|
|
92
92
|
"lodash-webpack-plugin": "=0.11.5",
|
|
93
|
-
"nock": "=13.0.
|
|
93
|
+
"nock": "=13.0.5",
|
|
94
94
|
"node-fetch": "=2.6.1",
|
|
95
95
|
"npm-run-all": "=4.1.5",
|
|
96
|
-
"prettier": "=2.
|
|
96
|
+
"prettier": "=2.2.0",
|
|
97
97
|
"release-it": "=12.4.3",
|
|
98
98
|
"rimraf": "=3.0.2",
|
|
99
99
|
"terser-webpack-plugin": "=4.2.3",
|
|
100
100
|
"webpack": "=4.44.2",
|
|
101
101
|
"webpack-bundle-size-analyzer": "=3.1.0",
|
|
102
|
-
"webpack-cli": "=4.
|
|
103
|
-
"webpack-stats-plugin": "=1.0.
|
|
102
|
+
"webpack-cli": "=4.2.0",
|
|
103
|
+
"webpack-stats-plugin": "=1.0.2",
|
|
104
104
|
"xmock": "=0.3.0"
|
|
105
105
|
},
|
|
106
106
|
"dependencies": {
|
|
107
107
|
"@babel/runtime-corejs3": "^7.11.2",
|
|
108
108
|
"btoa": "^1.2.1",
|
|
109
|
-
"buffer": "^
|
|
109
|
+
"buffer": "^6.0.3",
|
|
110
110
|
"cookie": "~0.4.1",
|
|
111
111
|
"cross-fetch": "^3.0.6",
|
|
112
112
|
"deep-extend": "~0.6.0",
|