vite-plugin-swagger-mcp 0.0.3 → 0.0.4

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/cjs/index.js CHANGED
@@ -125,7 +125,7 @@ var SwaggerMcpServer = class {
125
125
  const op = (_a = doc.paths[path]) == null ? void 0 : _a[method.toLowerCase()];
126
126
  if (!op)
127
127
  throw new Error("接口不存在");
128
- const originalRef = (_d = (_c = (_b = doc.paths[path][method].responses) == null ? void 0 : _b["200"]) == null ? void 0 : _c.schema) == null ? void 0 : _d.originalRef;
128
+ const originalRef = (_d = (_c = (_b = doc.paths[path][method.toLowerCase()].responses) == null ? void 0 : _b["200"]) == null ? void 0 : _c.schema) == null ? void 0 : _d.originalRef;
129
129
  const resolvedDefinition = this.resolveRef(doc, originalRef);
130
130
  return {
131
131
  path,
package/dist/esm/index.js CHANGED
@@ -204,7 +204,7 @@ export var SwaggerMcpServer = /*#__PURE__*/function () {
204
204
  }
205
205
  throw new Error("接口不存在");
206
206
  case 6:
207
- originalRef = (_doc$paths$path$metho3 = doc.paths[path][method].responses) === null || _doc$paths$path$metho3 === void 0 || (_doc$paths$path$metho3 = _doc$paths$path$metho3["200"]) === null || _doc$paths$path$metho3 === void 0 || (_doc$paths$path$metho3 = _doc$paths$path$metho3.schema) === null || _doc$paths$path$metho3 === void 0 ? void 0 : _doc$paths$path$metho3.originalRef;
207
+ originalRef = (_doc$paths$path$metho3 = doc.paths[path][method.toLowerCase()].responses) === null || _doc$paths$path$metho3 === void 0 || (_doc$paths$path$metho3 = _doc$paths$path$metho3["200"]) === null || _doc$paths$path$metho3 === void 0 || (_doc$paths$path$metho3 = _doc$paths$path$metho3.schema) === null || _doc$paths$path$metho3 === void 0 ? void 0 : _doc$paths$path$metho3.originalRef;
208
208
  resolvedDefinition = this.resolveRef(doc, originalRef);
209
209
  return _context4.abrupt("return", _objectSpread(_objectSpread({
210
210
  path: path,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite-plugin-swagger-mcp",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "description": "vite plugin for swagger mcp",
5
5
  "homepage": "https://github.com/mmctjj/vite-plugin-swagger-mcp",
6
6
  "repository": {