const paramsSchema = z.object({
entry_id: z.string().openapi({
param: {
name: "entry_id",
in: "path",
},
example: "42",
}),
event_id: z.string().openapi({
param: {
name: "event_id",
in: "path",
},
example: "99",
}),
fixtures_event_id: z.string().optional().openapi({
param: {
name: "fixtures_event_id",
in: "query",
}
})
});
const route = createRoute({
method: "get",
path: "/",
request: {
params: paramsSchema,
},
responses: {
200: {
content: {
"application/json": {
schema: PicksResponse,
},
},
description: "get the picks",
},
},
});
const paramsSchema = z.object({
entry_id: z.string().openapi({
param: {
name: "entry_id",
in: "path",
},
example: "42",
}),
event_id: z.string().openapi({
param: {
name: "event_id",
in: "path",
},
example: "99",
}),
fixtures_event_id: z.string().optional().openapi({
param: {
name: "fixtures_event_id",
in: "query",
}
})
});
const route = createRoute({
method: "get",
path: "/",
request: {
params: paramsSchema,
},
responses: {
200: {
content: {
"application/json": {
schema: PicksResponse,
},
},
description: "get the picks",
},
},
});