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

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, {