Skip to content

Commit 3985079

Browse files
committed
tool: expose the deprecated attribute
Expose the `deprecated` attribute and default to `false`.
1 parent 8ee9fc3 commit 3985079

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/parser/extract-tools.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@ export function extractToolsFromApi(
9090
const securityRequirements =
9191
operation.security === null ? globalSecurity : operation.security || globalSecurity;
9292

93+
const deprecated = operation.deprecated || false;
94+
9395
// Create the tool definition
9496
tools.push({
9597
name: finalToolName,
@@ -102,6 +104,7 @@ export function extractToolsFromApi(
102104
requestBodyContentType,
103105
securityRequirements,
104106
operationId: baseName,
107+
deprecated,
105108
});
106109
}
107110
}

0 commit comments

Comments
 (0)