swagger-client 3.27.1 → 3.27.2

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.
@@ -1931,6 +1931,18 @@ function encodeFormOrQuery(data) {
1931
1931
  * @param {string} parameterName - Parameter name
1932
1932
  * @return {object} encoded parameter names and values
1933
1933
  */
1934
+ if (typeof data === 'string') {
1935
+ try {
1936
+ data = JSON.parse(data);
1937
+ Object.entries(data).forEach(([key, value]) => {
1938
+ if (typeof value === 'object' && !Array.isArray(value)) {
1939
+ data[key] = JSON.stringify(value);
1940
+ }
1941
+ });
1942
+ } catch {
1943
+ return (0,_execute_oas3_style_serializer_js__WEBPACK_IMPORTED_MODULE_2__.valueEncoder)(data, 'reserved');
1944
+ }
1945
+ }
1934
1946
  const encodedQuery = Object.keys(data).reduce((result, parameterName) => {
1935
1947
  // eslint-disable-next-line no-restricted-syntax
1936
1948
  for (const [key, value] of formatKeyValue(parameterName, data[parameterName])) {