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 +1 -1
- package/dist/esm/index.js +1 -1
- package/package.json +1 -1
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,
|