diff --git a/package.json b/package.json index c00b7ec..fe796d9 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,8 @@ "dependencies": { "ajv": "^8.13.0", "fastify": "^4.27.0", - "typescript-eslint": "^7.8.0" + "typescript-eslint": "^7.8.0", + "yaml": "^2.4.2" }, "devDependencies": { "@types/eslint": "^8.56.10", diff --git a/src/routes/index.ts b/src/routes/index.ts index 3a2cda3..d843250 100644 --- a/src/routes/index.ts +++ b/src/routes/index.ts @@ -1,11 +1,13 @@ import { FastifyPluginAsync } from 'fastify'; import deleter from './delete.js'; +import openapi from './openapi.js'; import upload from './upload.js'; import index from './indexpage.js'; import list from './list.js'; import get from './get.js'; export default (async function (fastify) { + await fastify.register(openapi); await fastify.register(deleter); await fastify.register(upload); await fastify.register(index); diff --git a/src/routes/indexpage.ts b/src/routes/indexpage.ts index 13720bf..0fa5f2b 100644 --- a/src/routes/indexpage.ts +++ b/src/routes/indexpage.ts @@ -9,17 +9,18 @@ const page = `
This is the backup server! If you are a regular user, you wouldn't find this place very interesting and might as well close this page now.
-If you are a sysadmin, please refer to API docs for more info
+If you are a sysadmin, please refer to API docs or OpenAPI reference for more info