Skip to content

Commit 6fa0b49

Browse files
committed
Merge branch 'main' of https://github.com/dubinc/dub
2 parents 31d5336 + 7d3fd6c commit 6fa0b49

1 file changed

Lines changed: 20 additions & 3 deletions

File tree

apps/web/lib/zod/schemas/links.ts

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ const LinksQuerySchema = z.object({
7979
.union([z.string(), z.array(z.string())])
8080
.transform((v) => (Array.isArray(v) ? v : v.split(",")))
8181
.optional()
82+
.describe("The tag IDs to filter the links by.")
8283
.openapi({
8384
param: {
8485
style: "form",
@@ -95,15 +96,31 @@ const LinksQuerySchema = z.object({
9596
},
9697
},
9798
],
98-
})
99-
.describe("The tag IDs to filter the links by."),
99+
}),
100100
tagNames: z
101101
.union([z.string(), z.array(z.string())])
102102
.transform((v) => (Array.isArray(v) ? v : v.split(",")))
103103
.optional()
104104
.describe(
105105
"The unique name of the tags assigned to the short link (case insensitive).",
106-
),
106+
)
107+
.openapi({
108+
param: {
109+
style: "form",
110+
explode: false,
111+
},
112+
anyOf: [
113+
{
114+
type: "string",
115+
},
116+
{
117+
type: "array",
118+
items: {
119+
type: "string",
120+
},
121+
},
122+
],
123+
}),
107124
folderId: z
108125
.string()
109126
.optional()

0 commit comments

Comments
 (0)