feat: create route to fetch episodes for a title

Summary:

Test Plan:
This commit is contained in:
2024-05-24 17:07:06 -04:00
parent c5cce2543c
commit 75bb7615f5
11 changed files with 533 additions and 6 deletions

View File

@@ -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",
});