const routes = app .route('/', authApp) .route('/', secretApp);export type AppType = typeof routes;export { app };// OTHER FILE:import { secret } from '@/server/routes/secret/secret';import type { ContextVariables } from '@/server/types';import { OpenAPIHono } from '@hono/zod-openapi';export const secretApp = new OpenAPIHono<{ Variables: ContextVariables }>() .use(async (c, next) => { const user = c.get('user'); if (!user) { c.status(401); return c.body(null); } return next(); }) .route('/', secret);// OTHER FILE:import type { ContextVariables } from '@/server/types';import { createRoute, OpenAPIHono, z } from '@hono/zod-openapi';export const secret = new OpenAPIHono<{ Variables: ContextVariables }>().openapi( createRoute({ method: 'get', path: '/api/secret', tags: ['Secret'], summary: 'Shhh...', responses: { 200: { description: 'Success', content: { 'application/json': { schema: z .object({ message: z.string(), email: z.string().email(), }) .openapi('SecretResponse'), }, }, }, }, }), async c => { const user = c.get('user')!; return c.json({ message: 'Secret Message', email: user.email, }); });
property 'secret' does not exist on type '{ auth: { register: { "send-registration-code": ClientRequest<{ $post: { input: { json: { email: string; agree: boolean; }; }; output: {}; outputFormat: string; status: 200; }; }>; }; }; } & { ...; } & { ...; } & { ...; }'.ts(2339)roperty 'secret' does not exist on type '{ auth: { register: { "send-registration-code": ClientRequest<{ $post: { input: { json: { email: string; agree: boolean; }; }; output: {}; outputFormat: string; status: 200; }; }>; }; }; } & { ...; } & { ...; } & { ...; }'.ts(2339)
@hono/zod-openapi
&redirect_uri=${redirectUri}
&state=${c.req.param("userId")}