Slide 26
Slide 26 text
03 開発前に揃えるもの / フレームワークを1つに
ルート定義が型推論・バリデーション・OpenAPIを担う
// 市場データ API: 指数の日次価格
const getIndexPricesRoute = createRoute({
method: "get",
path: "/{code}/prices",
407
現在のcreateRouteの数
tags: ["indices"],
operationId: "getIndexDailyPrices",
summary: "指数日次価格",
request: {
params: indexCodeParamSchema,
query: indexPricesQuerySchema,
},
responses: {
200: { content: json(indexPricesResponseSchema), description: "OK" },
400: { content: json(httpErrorBodySchema), description: "不正" },
},
})
operationIdが、そのまま自動生成される
フロントのhookの名前になる。
Hono Conference 2026
26