@ivotoby/openapi-mcp-server 1.10.0 → 1.10.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/dist/bundle.js CHANGED
@@ -18606,6 +18606,7 @@ var ApiClient = class {
18606
18606
  return str2.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
18607
18607
  };
18608
18608
  const headerParams = {};
18609
+ const queryParams = {};
18609
18610
  if (toolDef?.inputSchema?.properties) {
18610
18611
  for (const [key, value] of Object.entries(paramsCopy)) {
18611
18612
  const paramDef = toolDef.inputSchema.properties[key];
@@ -18626,6 +18627,9 @@ var ApiClient = class {
18626
18627
  resolvedPath = resolvedPath.replace(`/${key}`, `/${encodeURIComponent(value)}`);
18627
18628
  }
18628
18629
  delete paramsCopy[key];
18630
+ } else if (paramLocation === "query") {
18631
+ queryParams[key] = value;
18632
+ delete paramsCopy[key];
18629
18633
  } else if (paramLocation === "header") {
18630
18634
  headerParams[key] = String(value);
18631
18635
  delete paramsCopy[key];
@@ -18657,10 +18661,20 @@ var ApiClient = class {
18657
18661
  url: resolvedPath,
18658
18662
  headers: { ...authHeaders, ...headerParams }
18659
18663
  };
18664
+ if (Object.keys(queryParams).length > 0) {
18665
+ config.params = this.processQueryParams(queryParams);
18666
+ }
18660
18667
  if (isGetLikeMethod(method)) {
18661
- config.params = this.processQueryParams(paramsCopy);
18668
+ if (Object.keys(paramsCopy).length > 0) {
18669
+ config.params = {
18670
+ ...config.params,
18671
+ ...this.processQueryParams(paramsCopy)
18672
+ };
18673
+ }
18662
18674
  } else {
18663
- config.data = paramsCopy;
18675
+ if (Object.keys(paramsCopy).length > 0) {
18676
+ config.data = paramsCopy;
18677
+ }
18664
18678
  }
18665
18679
  const response = await this.axiosInstance(config);
18666
18680
  return response.data;
package/dist/cli.js CHANGED
@@ -18606,6 +18606,7 @@ var ApiClient = class {
18606
18606
  return str2.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
18607
18607
  };
18608
18608
  const headerParams = {};
18609
+ const queryParams = {};
18609
18610
  if (toolDef?.inputSchema?.properties) {
18610
18611
  for (const [key, value] of Object.entries(paramsCopy)) {
18611
18612
  const paramDef = toolDef.inputSchema.properties[key];
@@ -18626,6 +18627,9 @@ var ApiClient = class {
18626
18627
  resolvedPath = resolvedPath.replace(`/${key}`, `/${encodeURIComponent(value)}`);
18627
18628
  }
18628
18629
  delete paramsCopy[key];
18630
+ } else if (paramLocation === "query") {
18631
+ queryParams[key] = value;
18632
+ delete paramsCopy[key];
18629
18633
  } else if (paramLocation === "header") {
18630
18634
  headerParams[key] = String(value);
18631
18635
  delete paramsCopy[key];
@@ -18657,10 +18661,20 @@ var ApiClient = class {
18657
18661
  url: resolvedPath,
18658
18662
  headers: { ...authHeaders, ...headerParams }
18659
18663
  };
18664
+ if (Object.keys(queryParams).length > 0) {
18665
+ config.params = this.processQueryParams(queryParams);
18666
+ }
18660
18667
  if (isGetLikeMethod(method)) {
18661
- config.params = this.processQueryParams(paramsCopy);
18668
+ if (Object.keys(paramsCopy).length > 0) {
18669
+ config.params = {
18670
+ ...config.params,
18671
+ ...this.processQueryParams(paramsCopy)
18672
+ };
18673
+ }
18662
18674
  } else {
18663
- config.data = paramsCopy;
18675
+ if (Object.keys(paramsCopy).length > 0) {
18676
+ config.data = paramsCopy;
18677
+ }
18664
18678
  }
18665
18679
  const response = await this.axiosInstance(config);
18666
18680
  return response.data;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ivotoby/openapi-mcp-server",
3
- "version": "1.10.0",
3
+ "version": "1.10.1",
4
4
  "description": "An MCP server that exposes OpenAPI endpoints as resources",
5
5
  "license": "MIT",
6
6
  "type": "module",