Files
Homarr/packages/api/src/open-api.ts
Manuel b14f82b4bb feat: add api keys (#991)
* feat: add api keys

* chore: address pull request feedback

---------

Co-authored-by: Meier Lukas <meierschlumpf@gmail.com>
2024-10-05 16:18:31 +02:00

20 lines
521 B
TypeScript

import { generateOpenApiDocument } from "trpc-swagger";
import { appRouter } from "./root";
export const openApiDocument = (base: string) =>
generateOpenApiDocument(appRouter, {
title: "Homarr API documentation",
version: "1.0.0",
baseUrl: base,
docsUrl: "https://homarr.dev",
securitySchemes: {
apikey: {
type: "apiKey",
name: "ApiKey",
description: "API key which can be obtained in the Homarr administration dashboard",
in: "header",
},
},
});