ahok-skill 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.prettierrc +8 -0
- package/Dockerfile +59 -0
- package/RAW_SKILL.md +219 -0
- package/README.md +277 -0
- package/SKILL.md +58 -0
- package/bin/opm.js +268 -0
- package/data/openmemory.sqlite +0 -0
- package/data/openmemory.sqlite-shm +0 -0
- package/data/openmemory.sqlite-wal +0 -0
- package/dist/ai/graph.js +293 -0
- package/dist/ai/mcp.js +397 -0
- package/dist/cli.js +78 -0
- package/dist/core/cfg.js +87 -0
- package/dist/core/db.js +636 -0
- package/dist/core/memory.js +116 -0
- package/dist/core/migrate.js +227 -0
- package/dist/core/models.js +105 -0
- package/dist/core/telemetry.js +57 -0
- package/dist/core/types.js +2 -0
- package/dist/core/vector/postgres.js +52 -0
- package/dist/core/vector/valkey.js +246 -0
- package/dist/core/vector_store.js +2 -0
- package/dist/index.js +44 -0
- package/dist/memory/decay.js +301 -0
- package/dist/memory/embed.js +675 -0
- package/dist/memory/hsg.js +959 -0
- package/dist/memory/reflect.js +131 -0
- package/dist/memory/user_summary.js +99 -0
- package/dist/migrate.js +9 -0
- package/dist/ops/compress.js +255 -0
- package/dist/ops/dynamics.js +189 -0
- package/dist/ops/extract.js +333 -0
- package/dist/ops/ingest.js +214 -0
- package/dist/server/index.js +109 -0
- package/dist/server/middleware/auth.js +137 -0
- package/dist/server/routes/auth.js +186 -0
- package/dist/server/routes/compression.js +108 -0
- package/dist/server/routes/dashboard.js +399 -0
- package/dist/server/routes/docs.js +241 -0
- package/dist/server/routes/dynamics.js +312 -0
- package/dist/server/routes/ide.js +280 -0
- package/dist/server/routes/index.js +33 -0
- package/dist/server/routes/keys.js +132 -0
- package/dist/server/routes/langgraph.js +61 -0
- package/dist/server/routes/memory.js +213 -0
- package/dist/server/routes/sources.js +140 -0
- package/dist/server/routes/system.js +63 -0
- package/dist/server/routes/temporal.js +293 -0
- package/dist/server/routes/users.js +101 -0
- package/dist/server/routes/vercel.js +57 -0
- package/dist/server/server.js +211 -0
- package/dist/server.js +3 -0
- package/dist/sources/base.js +223 -0
- package/dist/sources/github.js +171 -0
- package/dist/sources/google_drive.js +166 -0
- package/dist/sources/google_sheets.js +112 -0
- package/dist/sources/google_slides.js +139 -0
- package/dist/sources/index.js +34 -0
- package/dist/sources/notion.js +165 -0
- package/dist/sources/onedrive.js +143 -0
- package/dist/sources/web_crawler.js +166 -0
- package/dist/temporal_graph/index.js +20 -0
- package/dist/temporal_graph/query.js +240 -0
- package/dist/temporal_graph/store.js +116 -0
- package/dist/temporal_graph/timeline.js +241 -0
- package/dist/temporal_graph/types.js +2 -0
- package/dist/utils/chunking.js +60 -0
- package/dist/utils/index.js +31 -0
- package/dist/utils/keyword.js +94 -0
- package/dist/utils/text.js +120 -0
- package/nodemon.json +7 -0
- package/package.json +50 -0
- package/references/api_reference.md +66 -0
- package/references/examples.md +45 -0
- package/src/ai/graph.ts +363 -0
- package/src/ai/mcp.ts +494 -0
- package/src/cli.ts +94 -0
- package/src/core/cfg.ts +110 -0
- package/src/core/db.ts +1052 -0
- package/src/core/memory.ts +99 -0
- package/src/core/migrate.ts +302 -0
- package/src/core/models.ts +107 -0
- package/src/core/telemetry.ts +47 -0
- package/src/core/types.ts +130 -0
- package/src/core/vector/postgres.ts +61 -0
- package/src/core/vector/valkey.ts +261 -0
- package/src/core/vector_store.ts +9 -0
- package/src/index.ts +5 -0
- package/src/memory/decay.ts +427 -0
- package/src/memory/embed.ts +707 -0
- package/src/memory/hsg.ts +1245 -0
- package/src/memory/reflect.ts +158 -0
- package/src/memory/user_summary.ts +110 -0
- package/src/migrate.ts +8 -0
- package/src/ops/compress.ts +296 -0
- package/src/ops/dynamics.ts +272 -0
- package/src/ops/extract.ts +360 -0
- package/src/ops/ingest.ts +286 -0
- package/src/server/index.ts +159 -0
- package/src/server/middleware/auth.ts +156 -0
- package/src/server/routes/auth.ts +223 -0
- package/src/server/routes/compression.ts +106 -0
- package/src/server/routes/dashboard.ts +420 -0
- package/src/server/routes/docs.ts +380 -0
- package/src/server/routes/dynamics.ts +516 -0
- package/src/server/routes/ide.ts +283 -0
- package/src/server/routes/index.ts +32 -0
- package/src/server/routes/keys.ts +131 -0
- package/src/server/routes/langgraph.ts +71 -0
- package/src/server/routes/memory.ts +440 -0
- package/src/server/routes/sources.ts +111 -0
- package/src/server/routes/system.ts +68 -0
- package/src/server/routes/temporal.ts +335 -0
- package/src/server/routes/users.ts +111 -0
- package/src/server/routes/vercel.ts +55 -0
- package/src/server/server.js +215 -0
- package/src/server.ts +1 -0
- package/src/sources/base.ts +257 -0
- package/src/sources/github.ts +156 -0
- package/src/sources/google_drive.ts +144 -0
- package/src/sources/google_sheets.ts +85 -0
- package/src/sources/google_slides.ts +115 -0
- package/src/sources/index.ts +19 -0
- package/src/sources/notion.ts +148 -0
- package/src/sources/onedrive.ts +131 -0
- package/src/sources/web_crawler.ts +161 -0
- package/src/temporal_graph/index.ts +4 -0
- package/src/temporal_graph/query.ts +299 -0
- package/src/temporal_graph/store.ts +156 -0
- package/src/temporal_graph/timeline.ts +319 -0
- package/src/temporal_graph/types.ts +41 -0
- package/src/utils/chunking.ts +66 -0
- package/src/utils/index.ts +25 -0
- package/src/utils/keyword.ts +137 -0
- package/src/utils/text.ts +115 -0
- package/tests/test_api_workspace_management.ts +413 -0
- package/tests/test_bulk_delete.ts +267 -0
- package/tests/test_omnibus.ts +166 -0
- package/tests/test_workspace_management.ts +278 -0
- package/tests/verify.ts +104 -0
- package/tsconfig.json +15 -0
|
@@ -0,0 +1,380 @@
|
|
|
1
|
+
import { env } from "../../core/cfg";
|
|
2
|
+
|
|
3
|
+
const API_BASE = process.env.API_BASE_URL || "https://zqmt62peqz.us-east-1.awsapprunner.com";
|
|
4
|
+
|
|
5
|
+
const OPENAPI_SPEC = {
|
|
6
|
+
openapi: "3.1.0",
|
|
7
|
+
info: {
|
|
8
|
+
title: "Ahok Memory Cloud API",
|
|
9
|
+
description: "Universal Long-Term Memory for AI Agents and Applications. High-performance, multi-sector vector memory based on Hierarchical Segmented Graphs (HSG).",
|
|
10
|
+
version: "2.0.0",
|
|
11
|
+
},
|
|
12
|
+
servers: [
|
|
13
|
+
{
|
|
14
|
+
url: API_BASE,
|
|
15
|
+
description: "Production Environment",
|
|
16
|
+
},
|
|
17
|
+
],
|
|
18
|
+
components: {
|
|
19
|
+
securitySchemes: {
|
|
20
|
+
ApiKeyAuth: {
|
|
21
|
+
type: "apiKey",
|
|
22
|
+
in: "header",
|
|
23
|
+
name: "x-api-key",
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
schemas: {
|
|
27
|
+
Memory: {
|
|
28
|
+
type: "object",
|
|
29
|
+
properties: {
|
|
30
|
+
id: { type: "string", format: "uuid" },
|
|
31
|
+
content: { type: "string" },
|
|
32
|
+
primary_sector: { type: "string" },
|
|
33
|
+
sectors: { type: "array", items: { type: "string" } },
|
|
34
|
+
tags: { type: "array", items: { type: "string" } },
|
|
35
|
+
metadata: { type: "object" },
|
|
36
|
+
created_at: { type: "number" },
|
|
37
|
+
updated_at: { type: "number" },
|
|
38
|
+
salience: { type: "number" },
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
security: [{ ApiKeyAuth: [] }],
|
|
44
|
+
paths: {
|
|
45
|
+
"/memory/add": {
|
|
46
|
+
post: {
|
|
47
|
+
summary: "Add a new memory",
|
|
48
|
+
description: "Stores a piece of information in the long-term memory. It will be automatically classified and indexed across relevant sectors.",
|
|
49
|
+
requestBody: {
|
|
50
|
+
required: true,
|
|
51
|
+
content: {
|
|
52
|
+
"application/json": {
|
|
53
|
+
schema: {
|
|
54
|
+
type: "object",
|
|
55
|
+
required: ["content"],
|
|
56
|
+
properties: {
|
|
57
|
+
content: { type: "string", description: "The text content to remember." },
|
|
58
|
+
tags: { type: "array", items: { type: "string" }, description: "Optional tags for categorization." },
|
|
59
|
+
metadata: { type: "object", description: "Optional arbitrary metadata." },
|
|
60
|
+
user_id: { type: "string", description: "Optional user identifier for multi-tenant isolation." },
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
responses: {
|
|
67
|
+
200: {
|
|
68
|
+
description: "Memory successfully added",
|
|
69
|
+
content: {
|
|
70
|
+
"application/json": {
|
|
71
|
+
schema: { $ref: "#/components/schemas/Memory" },
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
"/memory/query": {
|
|
79
|
+
post: {
|
|
80
|
+
summary: "Query contextual memory",
|
|
81
|
+
description: "Performs a semantic and contextual search across memories. Returns the most relevant matches based on similarity, salience, and temporal factors.",
|
|
82
|
+
requestBody: {
|
|
83
|
+
required: true,
|
|
84
|
+
content: {
|
|
85
|
+
"application/json": {
|
|
86
|
+
schema: {
|
|
87
|
+
type: "object",
|
|
88
|
+
required: ["query"],
|
|
89
|
+
properties: {
|
|
90
|
+
query: { type: "string", description: "The search query (natural language)." },
|
|
91
|
+
k: { type: "integer", default: 8, description: "Number of results to return." },
|
|
92
|
+
user_id: { type: "string", description: "Filter by user identifier." },
|
|
93
|
+
filters: {
|
|
94
|
+
type: "object",
|
|
95
|
+
properties: {
|
|
96
|
+
sector: { type: "string", description: "Filter by a specific memory sector." },
|
|
97
|
+
min_score: { type: "number", description: "Minimum relevance score (0-1)." },
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
responses: {
|
|
106
|
+
200: {
|
|
107
|
+
description: "Matching memories found",
|
|
108
|
+
content: {
|
|
109
|
+
"application/json": {
|
|
110
|
+
schema: {
|
|
111
|
+
type: "object",
|
|
112
|
+
properties: {
|
|
113
|
+
query: { type: "string" },
|
|
114
|
+
matches: {
|
|
115
|
+
type: "array",
|
|
116
|
+
items: {
|
|
117
|
+
type: "object",
|
|
118
|
+
properties: {
|
|
119
|
+
id: { type: "string" },
|
|
120
|
+
content: { type: "string" },
|
|
121
|
+
score: { type: "number" },
|
|
122
|
+
sectors: { type: "array", items: { type: "string" } },
|
|
123
|
+
salience: { type: "number" },
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
},
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
},
|
|
130
|
+
},
|
|
131
|
+
},
|
|
132
|
+
},
|
|
133
|
+
},
|
|
134
|
+
},
|
|
135
|
+
"/memory/all": {
|
|
136
|
+
get: {
|
|
137
|
+
summary: "List all memories",
|
|
138
|
+
description: "Retrieves a paginated list of all stored memories.",
|
|
139
|
+
parameters: [
|
|
140
|
+
{ name: "user_id", in: "query", schema: { type: "string" } },
|
|
141
|
+
{ name: "l", in: "query", schema: { type: "integer", default: 50 }, description: "Limit" },
|
|
142
|
+
{ name: "u", in: "query", schema: { type: "integer", default: 0 }, description: "Offset" },
|
|
143
|
+
],
|
|
144
|
+
responses: {
|
|
145
|
+
200: {
|
|
146
|
+
description: "List of memories",
|
|
147
|
+
content: {
|
|
148
|
+
"application/json": {
|
|
149
|
+
schema: {
|
|
150
|
+
type: "object",
|
|
151
|
+
properties: {
|
|
152
|
+
items: { type: "array", items: { $ref: "#/components/schemas/Memory" } },
|
|
153
|
+
},
|
|
154
|
+
},
|
|
155
|
+
},
|
|
156
|
+
},
|
|
157
|
+
},
|
|
158
|
+
},
|
|
159
|
+
},
|
|
160
|
+
},
|
|
161
|
+
"/memory/{id}": {
|
|
162
|
+
delete: {
|
|
163
|
+
summary: "Delete a memory",
|
|
164
|
+
parameters: [
|
|
165
|
+
{ name: "id", in: "path", required: true, schema: { type: "string" } },
|
|
166
|
+
{ name: "user_id", in: "query", schema: { type: "string" } },
|
|
167
|
+
],
|
|
168
|
+
responses: {
|
|
169
|
+
200: {
|
|
170
|
+
description: "Memory deleted",
|
|
171
|
+
content: { "application/json": { schema: { type: "object", properties: { ok: { type: "boolean" } } } } },
|
|
172
|
+
},
|
|
173
|
+
},
|
|
174
|
+
},
|
|
175
|
+
},
|
|
176
|
+
"/health": {
|
|
177
|
+
get: {
|
|
178
|
+
summary: "System health check",
|
|
179
|
+
security: [],
|
|
180
|
+
responses: {
|
|
181
|
+
200: {
|
|
182
|
+
description: "System is healthy",
|
|
183
|
+
content: { "application/json": { schema: { type: "object", properties: { ok: { type: "boolean" } } } } },
|
|
184
|
+
},
|
|
185
|
+
},
|
|
186
|
+
},
|
|
187
|
+
},
|
|
188
|
+
},
|
|
189
|
+
};
|
|
190
|
+
|
|
191
|
+
export function docs_route(app: any) {
|
|
192
|
+
// OpenAPI spec
|
|
193
|
+
app.get("/openapi.json", (req: any, res: any) => {
|
|
194
|
+
res.json(OPENAPI_SPEC);
|
|
195
|
+
});
|
|
196
|
+
|
|
197
|
+
// OpenAI GPT Plugin manifest
|
|
198
|
+
app.get("/.well-known/ai-plugin.json", (req: any, res: any) => {
|
|
199
|
+
res.json({
|
|
200
|
+
schema_version: "v1",
|
|
201
|
+
name_for_human: "Ahok Memory",
|
|
202
|
+
name_for_model: "ahok_memory",
|
|
203
|
+
description_for_human: "Long-term memory storage and retrieval for AI agents. Remember and recall information across conversations.",
|
|
204
|
+
description_for_model: "Use this plugin to store and retrieve long-term memories. Call 'remember' to save important information the user shares. Call 'recall' to search for relevant memories when context is needed. Always check memories at the start of conversations for personalization.",
|
|
205
|
+
auth: {
|
|
206
|
+
type: "service_http",
|
|
207
|
+
authorization_type: "bearer",
|
|
208
|
+
verification_tokens: {}
|
|
209
|
+
},
|
|
210
|
+
api: {
|
|
211
|
+
type: "openapi",
|
|
212
|
+
url: `${API_BASE}/openapi.json`
|
|
213
|
+
},
|
|
214
|
+
logo_url: `${API_BASE}/logo.png`,
|
|
215
|
+
contact_email: "support@ahokmemory.com",
|
|
216
|
+
legal_info_url: "https://ahokmemory.com/legal"
|
|
217
|
+
});
|
|
218
|
+
});
|
|
219
|
+
|
|
220
|
+
// OpenAI Actions schema (simplified for GPT Actions)
|
|
221
|
+
app.get("/.well-known/openapi.yaml", (req: any, res: any) => {
|
|
222
|
+
const yaml = `openapi: 3.1.0
|
|
223
|
+
info:
|
|
224
|
+
title: Ahok Memory API
|
|
225
|
+
description: Long-term memory for AI agents. Use x-api-key header for authentication.
|
|
226
|
+
version: 2.0.0
|
|
227
|
+
servers:
|
|
228
|
+
- url: ${API_BASE}
|
|
229
|
+
components:
|
|
230
|
+
securitySchemes:
|
|
231
|
+
ApiKeyAuth:
|
|
232
|
+
type: apiKey
|
|
233
|
+
in: header
|
|
234
|
+
name: x-api-key
|
|
235
|
+
description: Your Ahok Memory API key (get from dashboard)
|
|
236
|
+
schemas:
|
|
237
|
+
MemoryInput:
|
|
238
|
+
type: object
|
|
239
|
+
required:
|
|
240
|
+
- content
|
|
241
|
+
properties:
|
|
242
|
+
content:
|
|
243
|
+
type: string
|
|
244
|
+
description: The information to remember
|
|
245
|
+
tags:
|
|
246
|
+
type: array
|
|
247
|
+
items:
|
|
248
|
+
type: string
|
|
249
|
+
description: Optional categorization tags
|
|
250
|
+
user_id:
|
|
251
|
+
type: string
|
|
252
|
+
description: Optional user identifier for multi-user apps
|
|
253
|
+
memory_key_id:
|
|
254
|
+
type: string
|
|
255
|
+
description: Optional workspace ID to store memory in specific workspace
|
|
256
|
+
security:
|
|
257
|
+
- ApiKeyAuth: []
|
|
258
|
+
paths:
|
|
259
|
+
/query:
|
|
260
|
+
post:
|
|
261
|
+
operationId: recallMemories
|
|
262
|
+
summary: Search and recall relevant memories
|
|
263
|
+
description: Use this to find memories related to the current conversation context. Returns formatted text with relevant memories.
|
|
264
|
+
requestBody:
|
|
265
|
+
required: true
|
|
266
|
+
content:
|
|
267
|
+
application/json:
|
|
268
|
+
schema:
|
|
269
|
+
type: object
|
|
270
|
+
required:
|
|
271
|
+
- query
|
|
272
|
+
properties:
|
|
273
|
+
query:
|
|
274
|
+
type: string
|
|
275
|
+
description: Natural language search query
|
|
276
|
+
k:
|
|
277
|
+
type: integer
|
|
278
|
+
default: 5
|
|
279
|
+
description: Number of memories to return
|
|
280
|
+
user_id:
|
|
281
|
+
type: string
|
|
282
|
+
description: Filter memories by user ID
|
|
283
|
+
responses:
|
|
284
|
+
'200':
|
|
285
|
+
description: Relevant memories found
|
|
286
|
+
content:
|
|
287
|
+
application/json:
|
|
288
|
+
schema:
|
|
289
|
+
type: object
|
|
290
|
+
properties:
|
|
291
|
+
result:
|
|
292
|
+
type: string
|
|
293
|
+
description: Formatted memory results
|
|
294
|
+
matches:
|
|
295
|
+
type: array
|
|
296
|
+
items:
|
|
297
|
+
type: object
|
|
298
|
+
properties:
|
|
299
|
+
content:
|
|
300
|
+
type: string
|
|
301
|
+
score:
|
|
302
|
+
type: number
|
|
303
|
+
/memories:
|
|
304
|
+
post:
|
|
305
|
+
operationId: rememberInformation
|
|
306
|
+
summary: Store new information in long-term memory
|
|
307
|
+
description: Use this to save important facts, preferences, or context for future recall. The memory will be automatically categorized.
|
|
308
|
+
requestBody:
|
|
309
|
+
required: true
|
|
310
|
+
content:
|
|
311
|
+
application/json:
|
|
312
|
+
schema:
|
|
313
|
+
$ref: '#/components/schemas/MemoryInput'
|
|
314
|
+
responses:
|
|
315
|
+
'200':
|
|
316
|
+
description: Memory stored successfully
|
|
317
|
+
content:
|
|
318
|
+
application/json:
|
|
319
|
+
schema:
|
|
320
|
+
type: object
|
|
321
|
+
properties:
|
|
322
|
+
id:
|
|
323
|
+
type: string
|
|
324
|
+
primary_sector:
|
|
325
|
+
type: string
|
|
326
|
+
`;
|
|
327
|
+
res.setHeader("Content-Type", "text/yaml");
|
|
328
|
+
res.send(yaml);
|
|
329
|
+
});
|
|
330
|
+
|
|
331
|
+
// Swagger UI docs
|
|
332
|
+
app.get("/docs", (req: any, res: any) => {
|
|
333
|
+
const html = `<!DOCTYPE html>
|
|
334
|
+
<html lang="en">
|
|
335
|
+
<head>
|
|
336
|
+
<meta charset="UTF-8">
|
|
337
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
338
|
+
<title>Ahok Memory Cloud API Docs</title>
|
|
339
|
+
<link rel="stylesheet" href="https://unpkg.com/swagger-ui-dist@5.11.0/swagger-ui.css" />
|
|
340
|
+
<style>
|
|
341
|
+
body { margin: 0; background: #020617; }
|
|
342
|
+
.swagger-ui .topbar { display: none; }
|
|
343
|
+
.swagger-ui .info .title { color: #f8fafc; }
|
|
344
|
+
.swagger-ui .scheme-container { background: #0f172a; box-shadow: none; border-bottom: 1px solid #1e293b; }
|
|
345
|
+
.swagger-ui select, .swagger-ui input { background: #1e293b; color: #f8fafc; border: 1px solid #334155; }
|
|
346
|
+
.swagger-ui .opblock { border-radius: 12px; background: #0f172a; border: 1px solid #1e293b; }
|
|
347
|
+
.swagger-ui .opblock-tag { color: #f8fafc; border-bottom: 1px solid #1e293b; }
|
|
348
|
+
.swagger-ui .opblock .opblock-summary-description { color: #94a3b8; }
|
|
349
|
+
.swagger-ui section.models { border: 1px solid #1e293b; background: #0f172a; border-radius: 12px; }
|
|
350
|
+
.swagger-ui section.models h4 { color: #f8fafc; }
|
|
351
|
+
.swagger-ui .model-box { background: #020617; border: 1px solid #1e293b; }
|
|
352
|
+
.swagger-ui .btn.authorize { color: #10b981; border-color: #10b981; }
|
|
353
|
+
.swagger-ui .btn.authorize svg { fill: #10b981; }
|
|
354
|
+
.swagger-ui .opblock.opblock-post { border-color: #0ea5e9; }
|
|
355
|
+
.swagger-ui .opblock.opblock-post .opblock-summary { border-color: #0ea5e9; }
|
|
356
|
+
.swagger-ui .opblock.opblock-post .opblock-summary-method { background: #0ea5e9; }
|
|
357
|
+
</style>
|
|
358
|
+
</head>
|
|
359
|
+
<body>
|
|
360
|
+
<div id="swagger-ui"></div>
|
|
361
|
+
<script src="https://unpkg.com/swagger-ui-dist@5.11.0/swagger-ui-bundle.js"></script>
|
|
362
|
+
<script>
|
|
363
|
+
window.onload = () => {
|
|
364
|
+
window.ui = SwaggerUIBundle({
|
|
365
|
+
url: '/openapi.json',
|
|
366
|
+
dom_id: '#swagger-ui',
|
|
367
|
+
deepLinking: true,
|
|
368
|
+
presets: [
|
|
369
|
+
SwaggerUIBundle.presets.apis,
|
|
370
|
+
],
|
|
371
|
+
layout: "BaseLayout"
|
|
372
|
+
});
|
|
373
|
+
};
|
|
374
|
+
</script>
|
|
375
|
+
</body>
|
|
376
|
+
</html>`;
|
|
377
|
+
res.setHeader("Content-Type", "text/html");
|
|
378
|
+
res.send(html);
|
|
379
|
+
});
|
|
380
|
+
}
|