Skip to content

Commit 0650f74

Browse files
committed
feat: add V1_RAW_ROUTER for raw data endpoints and update OpenAPI documentation
1 parent 77fb6de commit 0650f74

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

Diff for: src/index.ts

+8-2
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,14 @@ import { HTTPException } from "hono/http-exception";
88
import { GATEWAY_GITHUB_ROUTER } from "./routes/gateway_github";
99
import { RANDOM_EMOJI_ROUTER } from "./routes/random-emoji";
1010
import { V1_CATEGORIES_ROUTER } from "./routes/v1_categories";
11+
import { V1_RAW_ROUTER } from "./routes/v1_raw";
1112
import { V1_VERSIONS_ROUTER } from "./routes/v1_versions";
1213

1314
const app = new OpenAPIHono<HonoContext>();
1415

1516
app.route("/", V1_VERSIONS_ROUTER);
1617
app.route("/", V1_CATEGORIES_ROUTER);
18+
app.route("/", V1_RAW_ROUTER);
1719
app.route("/", GATEWAY_GITHUB_ROUTER);
1820
app.route("/", RANDOM_EMOJI_ROUTER);
1921

@@ -77,8 +79,8 @@ app.doc("/openapi.json", (c) => {
7779
},
7880
tags: [
7981
{
80-
name: "Emoji",
81-
description: "Emoji related endpoints",
82+
name: "Categories",
83+
description: "Categories related endpoints",
8284
},
8385
{
8486
name: "Versions",
@@ -88,6 +90,10 @@ app.doc("/openapi.json", (c) => {
8890
name: "Gateway",
8991
description: "Gateway related endpoints",
9092
},
93+
{
94+
name: "Raw",
95+
description: "Raw data related endpoints",
96+
},
9197
],
9298
servers: [
9399
server,

Diff for: src/routes/v1_raw/index.ts

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import type { HonoContext } from "../../types";
2+
import { OpenAPIHono } from "@hono/zod-openapi";
3+
4+
export const V1_RAW_ROUTER = new OpenAPIHono<HonoContext>().basePath("/api/v1/raw");

0 commit comments

Comments
 (0)