Generic Commit; Most likely a fix or small feature

This commit is contained in:
Darius
2025-11-23 02:34:40 +01:00
parent 8c487f823a
commit 1b125b041d
3 changed files with 15 additions and 0 deletions

7
package-lock.json generated
View File

@@ -15,6 +15,7 @@
"fastify": "^5.6.2",
"fastify-axios": "^1.3.0",
"fastify-type-provider-zod": "^6.1.0",
"swagger-themes": "^1.4.3",
"zod": "^4.1.12"
},
"devDependencies": {
@@ -2160,6 +2161,12 @@
"node": ">=8"
}
},
"node_modules/swagger-themes": {
"version": "1.4.3",
"resolved": "https://registry.npmjs.org/swagger-themes/-/swagger-themes-1.4.3.tgz",
"integrity": "sha512-1G0CqJC1IBbNxkAOyJoREd9hfwXH1R6+3GOFxLhQho2w2i+AbaJqkF4mTJhkce4yhaEMUXvv4KKu1YO/qpe6nQ==",
"license": "MIT"
},
"node_modules/thread-stream": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/thread-stream/-/thread-stream-3.1.0.tgz",

View File

@@ -20,6 +20,7 @@
"fastify": "^5.6.2",
"fastify-axios": "^1.3.0",
"fastify-type-provider-zod": "^6.1.0",
"swagger-themes": "^1.4.3",
"zod": "^4.1.12"
},
"devDependencies": {

View File

@@ -10,6 +10,7 @@ import {
validatorCompiler,
type ZodTypeProvider,
} from "fastify-type-provider-zod";
import { SwaggerTheme, SwaggerThemeNameEnum } from "swagger-themes";
import { z } from "zod";
import { Config } from "./config.js";
import { HomeAssistantClient } from "./homeassistant/client.js";
@@ -39,6 +40,9 @@ await fastify.register(fastifySwagger, {
transform: jsonSchemaTransform,
});
const theme = new SwaggerTheme();
const content = theme.getBuffer(SwaggerThemeNameEnum.ONE_DARK);
await fastify.register(fastifySwaggerUi, {
routePrefix: "/docs",
indexPrefix: "/api",
@@ -46,6 +50,9 @@ await fastify.register(fastifySwaggerUi, {
docExpansion: "list",
deepLinking: false,
},
theme: {
css: [{ filename: "theme.css", content: content }],
},
});
await fastify.register(fastifyAxios, {