Skip to content

Commit 75691bf

Browse files
authored
feat: hello hack; allow polymorphic attachment properties by updating object schema to passthrough for microsoft_graph_attachment (#151)
1 parent 62ccff1 commit 75691bf

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

bin/modules/generate-mcp-tools.mjs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ export function generateMcpTools(openApiSpec, outputDir) {
2727

2828
let clientCode = fs.readFileSync(clientFilePath, 'utf-8');
2929
clientCode = clientCode.replace(/'@zodios\/core';/, "'./hack.js';");
30+
31+
clientCode = clientCode.replace(
32+
/const microsoft_graph_attachment = z\s+\.object\({[\s\S]*?}\)\s+\.strict\(\);/,
33+
(match) => match.replace(/\.strict\(\);/, '.passthrough();')
34+
);
35+
3036
fs.writeFileSync(clientFilePath, clientCode);
3137

3238
return true;

0 commit comments

Comments
 (0)