swagger-client 3.19.9 → 3.19.10

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.
@@ -30,9 +30,13 @@ const normalize = element => {
30
30
  */
31
31
  export const pojoAdapter = normalizeFn => spec => {
32
32
  if (spec?.$$normalized) return spec;
33
+ if (pojoAdapter.cache.has(spec)) return spec;
33
34
  const openApiElement = OpenApi3_1Element.refract(spec);
34
35
  const normalized = normalizeFn(openApiElement);
35
- return toValue(normalized);
36
+ const value = toValue(normalized);
37
+ pojoAdapter.cache.set(spec, value);
38
+ return value;
36
39
  };
40
+ pojoAdapter.cache = new WeakMap();
37
41
  export default normalize;
38
42
  /* eslint-enable camelcase */
@@ -36,11 +36,15 @@ const normalize = element => {
36
36
  */
37
37
  const pojoAdapter = normalizeFn => spec => {
38
38
  if (spec !== null && spec !== void 0 && spec.$$normalized) return spec;
39
+ if (pojoAdapter.cache.has(spec)) return spec;
39
40
  const openApiElement = _apidomNsOpenapi.OpenApi3_1Element.refract(spec);
40
41
  const normalized = normalizeFn(openApiElement);
41
- return (0, _apidomCore.toValue)(normalized);
42
+ const value = (0, _apidomCore.toValue)(normalized);
43
+ pojoAdapter.cache.set(spec, value);
44
+ return value;
42
45
  };
43
46
  exports.pojoAdapter = pojoAdapter;
47
+ pojoAdapter.cache = new WeakMap();
44
48
  var _default = normalize;
45
49
  /* eslint-enable camelcase */
46
50
  exports.default = _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "swagger-client",
3
- "version": "3.19.9",
3
+ "version": "3.19.10",
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",
@@ -114,10 +114,10 @@
114
114
  },
115
115
  "dependencies": {
116
116
  "@babel/runtime-corejs3": "^7.20.13",
117
- "@swagger-api/apidom-core": ">=0.70.0 <1.0.0",
118
- "@swagger-api/apidom-json-pointer": ">=0.70.0 <1.0.0",
119
- "@swagger-api/apidom-ns-openapi-3-1": ">=0.70.0 <1.0.0",
120
- "@swagger-api/apidom-reference": ">=0.70.0 <1.0.0",
117
+ "@swagger-api/apidom-core": ">=0.70.1 <1.0.0",
118
+ "@swagger-api/apidom-json-pointer": ">=0.70.1 <1.0.0",
119
+ "@swagger-api/apidom-ns-openapi-3-1": ">=0.70.2 <1.0.0",
120
+ "@swagger-api/apidom-reference": ">=0.70.2 <1.0.0",
121
121
  "cookie": "~0.5.0",
122
122
  "cross-fetch": "^3.1.5",
123
123
  "deepmerge": "~4.3.0",