diff --git a/src/app.ts b/src/app.ts index 0fab5e0..2d9ea54 100644 --- a/src/app.ts +++ b/src/app.ts @@ -15,6 +15,8 @@ import parseRoute from "./routes/parse"; import indexRoute from "./routes/index"; import rawHtml from "./routes/raw-html"; +import publicConfig from "./publicConfig"; + class App { config: IConfigService; @@ -38,7 +40,15 @@ class App { }, }); - await fastify.register(fastifySwagger); + await fastify.register(fastifySwagger, { + swagger: { + info: { + title: "TXTDot API", + description: publicConfig.description, + version: publicConfig.version, + }, + }, + }); await fastify.register(fastifySwaggerUi, { routePrefix: "/doc" }); fastify.register(indexRoute); diff --git a/src/publicConfig.ts b/src/publicConfig.ts new file mode 100644 index 0000000..57a09c7 --- /dev/null +++ b/src/publicConfig.ts @@ -0,0 +1,5 @@ +export default { + version: "1.0.0", + description: + "HTTP proxy that parses only text, links and pictures from pages reducing internet traffic, removing ads and heavy scripts", +};