fix: OpenAPI spec not generating properly
Summary: Test Plan:
This commit is contained in:
@@ -17,7 +17,10 @@ const route = createRoute({
|
||||
method: "get",
|
||||
path: "/",
|
||||
request: {
|
||||
query: z.object({ query: z.string(), page: z.number().min(1).default(1) }),
|
||||
query: z.object({
|
||||
query: z.string(),
|
||||
page: z.number({ coerce: true }).int().min(1).default(1),
|
||||
}),
|
||||
},
|
||||
responses: {
|
||||
200: {
|
||||
|
||||
@@ -2,7 +2,7 @@ import { OpenAPIHono, createRoute, z } from "@hono/zod-openapi";
|
||||
|
||||
import { fetchFromMultipleSources } from "~/libs/fetchFromMultipleSources";
|
||||
import {
|
||||
AniListIdSchema,
|
||||
AniListIdQuerySchema,
|
||||
ErrorResponseSchema,
|
||||
SuccessResponseSchema,
|
||||
} from "~/types/schema";
|
||||
@@ -20,7 +20,7 @@ const route = createRoute({
|
||||
method: "get",
|
||||
path: "/",
|
||||
request: {
|
||||
query: z.object({ id: AniListIdSchema }),
|
||||
query: z.object({ id: AniListIdQuerySchema }),
|
||||
headers: z.object({ "x-anilist-token": z.string().nullish() }),
|
||||
},
|
||||
responses: {
|
||||
|
||||
Reference in New Issue
Block a user