80 lines
2.0 KiB
TypeScript
80 lines
2.0 KiB
TypeScript
import {OpenAPIHono} from "@hono/zod-openapi";
|
|
import {apiReference} from "@scalar/hono-api-reference";
|
|
|
|
const app = new OpenAPIHono();
|
|
|
|
app.get(
|
|
"/api/docs",
|
|
apiReference({
|
|
theme: "kepler",
|
|
layout: "classic",
|
|
defaultHttpClient: {targetKey: "node", clientKey: "axios"},
|
|
pageTitle: "Lst API Reference",
|
|
hiddenClients: [
|
|
"libcurl",
|
|
"clj_http",
|
|
"httpclient",
|
|
"restsharp",
|
|
"native",
|
|
"http1.1",
|
|
"asynchttp",
|
|
"nethttp",
|
|
"okhttp",
|
|
"unirest",
|
|
"xhr",
|
|
"fetch",
|
|
"jquery",
|
|
"okhttp",
|
|
"native",
|
|
"request",
|
|
"unirest",
|
|
"nsurlsession",
|
|
"cohttp",
|
|
"curl",
|
|
"guzzle",
|
|
"http1",
|
|
"http2",
|
|
"webrequest",
|
|
"restmethod",
|
|
"python3",
|
|
"requests",
|
|
"httr",
|
|
"native",
|
|
"curl",
|
|
"httpie",
|
|
"wget",
|
|
"nsurlsession",
|
|
"undici",
|
|
],
|
|
spec: {
|
|
url: "/api",
|
|
},
|
|
baseServerURL: "https://scalar.com",
|
|
servers: [
|
|
{
|
|
url: "http://usday1vms006:3000",
|
|
description: "Production",
|
|
},
|
|
{
|
|
url: "http://localhost:4000",
|
|
description: "dev server",
|
|
},
|
|
],
|
|
// authentication: {
|
|
// preferredSecurityScheme: {'bearerAuth'},
|
|
// },
|
|
|
|
// metaData: {
|
|
// title: "Page title",
|
|
// description: "My page page",
|
|
// ogDescription: "Still about my my page",
|
|
// ogTitle: "Page title",
|
|
// ogImage: "https://example.com/image.png",
|
|
// twitterCard: "summary_large_image",
|
|
// // Add more...
|
|
// },
|
|
})
|
|
);
|
|
|
|
export default app;
|