MCPcopy Index your code
hub / github.com/callumalpass/tasknotes / generateSwaggerUIHTML

Method generateSwaggerUIHTML

src/api/SystemController.ts:173–215  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

171 }
172
173 private generateSwaggerUIHTML(): string {
174 const port = this.plugin.settings.apiPort;
175
176 return `<!DOCTYPE html>
177<html lang="en">
178<head>
179 <meta charset="UTF-8">
180 <meta name="viewport" content="width=device-width, initial-scale=1.0">
181 <title>TaskNotes API Documentation</title>
182 <link rel="stylesheet" type="text/css" href="https://unpkg.com/swagger-ui-dist@5.9.0/swagger-ui.css" />
183 <style>
184 body { margin: 0; }
185 .swagger-ui .topbar { display: none; }
186 .swagger-ui .info .title { color: #663399; }
187 </style>
188</head>
189<body>
190 <div id="swagger-ui"></div>
191 <script src="https://unpkg.com/swagger-ui-dist@5.9.0/swagger-ui-bundle.js"></script>
192 <script src="https://unpkg.com/swagger-ui-dist@5.9.0/swagger-ui-standalone-preset.js"></script>
193 <script>
194 SwaggerUIBundle({
195 url: 'http://localhost:${port}/api/docs',
196 dom_id: '#swagger-ui',
197 deepLinking: true,
198 presets: [
199 SwaggerUIBundle.presets.apis,
200 SwaggerUIStandalonePreset
201 ],
202 plugins: [
203 SwaggerUIBundle.plugins.DownloadUrl
204 ],
205 layout: "StandaloneLayout",
206 tryItOutEnabled: true,
207 displayRequestDuration: true,
208 docExpansion: 'list',
209 filter: true,
210 validatorUrl: null
211 });
212 </script>
213</body>
214</html>`;
215 }
216}

Callers 1

handleSwaggerUIMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected