Skip to content

Commit 135a7b4

Browse files
committed
fix openapi
1 parent 80410bf commit 135a7b4

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

apps/web/lib/openapi/commissions/update-commission.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ export const updateCommission: ZodOpenApiOperationObject = {
99
summary: "Update a commission.",
1010
description:
1111
"Update an existing commission amount. This is useful for handling refunds (partial or full) or fraudulent sales.",
12+
requestParams: {
13+
path: CommissionSchema.pick({ id: true }),
14+
},
1215
requestBody: {
1316
content: {
1417
"application/json": {

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ import { PartnerSchema } from "./partners";
77
import { parseDateSchema } from "./utils";
88

99
export const CommissionSchema = z.object({
10-
id: z.string(),
10+
id: z.string().describe("The commission's unique ID on Dub.").openapi({
11+
example: "cm_1JVR7XRCSR0EDBAF39FZ4PMYE",
12+
}),
1113
type: z.enum(["click", "lead", "sale"]).optional(),
1214
amount: z.number(),
1315
earnings: z.number(),

0 commit comments

Comments
 (0)