Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/crutchcorn/hono-openapi. A template project showing Hono's usage with OpenAPI and Valibot validatio
Something went wrong. Try again.
415 B · 10 lines
TypeScript
at main
1234567891011import {resolve} from "node:path";import {writeFile} from "node:fs/promises";import {app} from "../src/shared.ts";import {generateSpecs} from "hono-openapi";import {openAPIOptions} from "../src/constants/open-api.ts";
const outPath = resolve(import.meta.dirname, "../out/openapi.json");
const specs = await generateSpecs(app, openAPIOptions);await writeFile(outPath, JSON.stringify(specs, null, 2), 'utf-8')