refac
This commit is contained in:
1 parent
02f9fe7890
commit
2ba6b423aa
3 files changed
+10
-3
No files matched your search
@@ -1395,7 +1395,8 @@ export const convertOpenApiToToolPayload = (openApiSpec) => {
|
||||
|
||||
for (const [path, methods] of Object.entries(openApiSpec.paths)) {
|
||||
for (const [method, operation] of Object.entries(methods)) {
|
||||
if (operation?.operationId) {
|
||||
if (!operation || typeof operation !== 'object') continue;
|
||||
if ((operation as any)?.operationId) {
|
||||
const tool = {
|
||||
name: operation.operationId,
|
||||
description: operation.description || operation.summary || 'No description available.',
|
||||
|
||||
Reference in new issue
Block a user