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.

Update OpenAPI descriptions for tag IDs and tag names

Kiran Kfaf885054ba0
diff --git a/apps/web/lib/zod/schemas/links.ts b/apps/web/lib/zod/schemas/links.ts
index 91ac93079b..7312f56e4c 100644
--- a/apps/web/lib/zod/schemas/links.ts
+++ b/apps/web/lib/zod/schemas/links.ts
@@ -79,6 +79,7 @@ const LinksQuerySchema = z.object({
.union([z.string(), z.array(z.string())])
.transform((v) => (Array.isArray(v) ? v : v.split(",")))
.optional()
+ .describe("The tag IDs to filter the links by.")
.openapi({
param: {
style: "form",
@@ -95,15 +96,31 @@ const LinksQuerySchema = z.object({
},
},
],
- })
- .describe("The tag IDs to filter the links by."),
+ }),
tagNames: z
.union([z.string(), z.array(z.string())])
.transform((v) => (Array.isArray(v) ? v : v.split(",")))
.optional()
.describe(
"The unique name of the tags assigned to the short link (case insensitive).",
- ),
+ )
+ .openapi({
+ param: {
+ style: "form",
+ explode: false,
+ },
+ anyOf: [
+ {
+ type: "string",
+ },
+ {
+ type: "array",
+ items: {
+ type: "string",
+ },
+ },
+ ],
+ }),
folderId: z
.string()
.optional()