feat: create route to fetch episodes for a title
Summary: Test Plan:
This commit is contained in:
@@ -19,6 +19,7 @@ export const PaginatedResponseSchema = <T extends ZodSchema>(schema: T) => {
|
||||
});
|
||||
};
|
||||
|
||||
export const ErrorResponse = { success: false } as const;
|
||||
export const ErrorResponseSchema = z.object({
|
||||
success: z.literal(false).openapi({ type: "boolean" }),
|
||||
});
|
||||
@@ -29,3 +30,11 @@ export const AniListIdSchema = z.number().int().openapi({ format: "int64" });
|
||||
export const AniListIdQuerySchema = z
|
||||
.string()
|
||||
.openapi({ type: "integer", format: "int64" });
|
||||
|
||||
export const EpisodeNumberSchema = z.number().openapi({
|
||||
minimum: 0,
|
||||
multipleOf: 0.5,
|
||||
examples: [1, 2, 3.5],
|
||||
type: "number",
|
||||
format: "float",
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user