mirror of
https://github.com/versia-pub/server.git
synced 2026-04-27 20:59:15 +02:00
refactor(api): ♻️ Move from @hono/zod-openapi to hono-openapi
hono-openapi is easier to work with and generates better OpenAPI definitions
This commit is contained in:
parent
0576aff972
commit
58342e86e1
240 changed files with 9494 additions and 9575 deletions
|
|
@ -1,12 +1,13 @@
|
|||
import type { OpenAPIHono, z } from "@hono/zod-openapi";
|
||||
import type { Server } from "bun";
|
||||
import type { Hono } from "hono";
|
||||
import type { z } from "zod";
|
||||
import type { ConfigSchema } from "~/classes/config/schema.ts";
|
||||
import type { HonoEnv } from "~/types/api";
|
||||
import { debugResponse } from "./api.ts";
|
||||
|
||||
export const createServer = (
|
||||
config: z.infer<typeof ConfigSchema>,
|
||||
app: OpenAPIHono<HonoEnv>,
|
||||
app: Hono<HonoEnv>,
|
||||
): Server =>
|
||||
Bun.serve({
|
||||
port: config.http.bind_port,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue