mirror of
https://github.com/fosrl/pangolin.git
synced 2026-05-17 06:24:32 +00:00
Fix openapi zod issue error
This commit is contained in:
@@ -43,14 +43,24 @@ const listResourcePoliciesSchema = z.object({
|
|||||||
.positive()
|
.positive()
|
||||||
.optional()
|
.optional()
|
||||||
.catch(20)
|
.catch(20)
|
||||||
.default(20),
|
.default(20)
|
||||||
|
.openapi({
|
||||||
|
type: "integer",
|
||||||
|
default: 20,
|
||||||
|
description: "Number of items per page"
|
||||||
|
}),
|
||||||
page: z.coerce
|
page: z.coerce
|
||||||
.number<string>() // for prettier formatting
|
.number<string>() // for prettier formatting
|
||||||
.int()
|
.int()
|
||||||
.min(0)
|
.min(0)
|
||||||
.optional()
|
.optional()
|
||||||
.catch(1)
|
.catch(1)
|
||||||
.default(1),
|
.default(1)
|
||||||
|
.openapi({
|
||||||
|
type: "integer",
|
||||||
|
default: 1,
|
||||||
|
description: "Page number to retrieve"
|
||||||
|
}),
|
||||||
query: z.string().optional()
|
query: z.string().optional()
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user