Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

Fix OpenAPI schema for tag filter query parameter

Kiran K83173fb86d47
diff --git a/apps/web/lib/zod/schemas/links.ts b/apps/web/lib/zod/schemas/links.ts
index 82b0ff1a44..6295d785b3 100644
--- a/apps/web/lib/zod/schemas/links.ts
+++ b/apps/web/lib/zod/schemas/links.ts
@@ -43,6 +43,23 @@ const LinksQuerySchema = z.object({
.union([z.string(), z.array(z.string())])
.transform((v) => (Array.isArray(v) ? v : v.split(",")))
.optional()
+ .openapi({
+ param: {
+ style: "form",
+ explode: false,
+ },
+ anyOf: [
+ {
+ type: "string",
+ },
+ {
+ type: "array",
+ items: {
+ type: "string",
+ },
+ },
+ ],
+ })
.describe("The tag IDs to filter the links by."),
tagNames: z
.union([z.string(), z.array(z.string())])