swagger-client 3.27.0 → 3.27.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/http/index.js CHANGED
@@ -299,6 +299,13 @@ function formatKeyValueBySerializationOption(key, value, skipEncoding, serializa
299
299
  const escape = skipEncoding ? false : serializationOption && serializationOption.allowReserved ? 'unsafe' : 'reserved';
300
300
  const encodeFn = v => valueEncoder(v, escape);
301
301
  const encodeKeyFn = skipEncoding ? k => k : k => encodeFn(k);
302
+ if (typeof value === 'string') {
303
+ try {
304
+ value = JSON.parse(value);
305
+ } catch {
306
+ // can't parse the value so treat it as as a simple string
307
+ }
308
+ }
302
309
 
303
310
  // Primitive
304
311
  if (typeof value !== 'object') {
package/lib/http/index.js CHANGED
@@ -312,6 +312,13 @@ function formatKeyValueBySerializationOption(key, value, skipEncoding, serializa
312
312
  const escape = skipEncoding ? false : serializationOption && serializationOption.allowReserved ? 'unsafe' : 'reserved';
313
313
  const encodeFn = v => (0, _styleSerializer.valueEncoder)(v, escape);
314
314
  const encodeKeyFn = skipEncoding ? k => k : k => encodeFn(k);
315
+ if (typeof value === 'string') {
316
+ try {
317
+ value = JSON.parse(value);
318
+ } catch {
319
+ // can't parse the value so treat it as as a simple string
320
+ }
321
+ }
315
322
 
316
323
  // Primitive
317
324
  if (typeof value !== 'object') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "swagger-client",
3
- "version": "3.27.0",
3
+ "version": "3.27.1",
4
4
  "description": "SwaggerJS - a collection of interfaces for OAI specs",
5
5
  "browser": {
6
6
  "./src/helpers/btoa.node.js": "./src/helpers/btoa.browser.js",
@@ -102,7 +102,7 @@
102
102
  "rimraf": "=5.0.5",
103
103
  "source-map-explorer": "^2.5.3",
104
104
  "terser-webpack-plugin": "^5.0.3",
105
- "undici": "^5.28.3",
105
+ "undici": "^5.28.4",
106
106
  "webpack": "=5.91.0",
107
107
  "webpack-bundle-size-analyzer": "=3.1.0",
108
108
  "webpack-cli": "=5.1.4",
@@ -123,7 +123,7 @@
123
123
  "node-abort-controller": "^3.1.1",
124
124
  "node-fetch-commonjs": "^3.3.2",
125
125
  "qs": "^6.10.2",
126
- "traverse": "~0.6.6"
126
+ "traverse": "=0.6.8"
127
127
  },
128
128
  "overrides": {
129
129
  "@swagger-api/apidom-reference": {