zod: How to only include types from endpoints with certain tags? #1799
-
|
Hi all, I tried to generate zod types for my OpenAPI which works great so far! Now I only want to generate types and operations only for endpoints with a specific tag. I both tried pluginZod({
include: [{ type: "tag", pattern: /Admin/ }],
// also tried:
// exclude: [{ type: "tag", pattern: /^(?!Admin$).*$/ }],
importPath: "zod/v4",
coercion: false,
typed: false,
inferred: true,
operations: true,
output: {
path: "./src/generated-types",
barrelType: "propagate",
},
unknownType: "unknown",
dateType: "stringOffset",
version: "4",
transformers: {
name: (n) => { /* ... */ }
},
}),Only the Thanks a lot for your help! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
@nilshartmann For now, types will always be generated. Even if you exclude based on the operationId or something else. This was quite hard to do, so we opt in for a simple solution and just generated all |
Beta Was this translation helpful? Give feedback.
Thanks for your fast response, will try!