swagger improvements

This commit is contained in:
2025-09-10 05:19:56 +00:00
parent 4f82fc4be3
commit e03c777921
3 changed files with 7 additions and 2 deletions

View File

@@ -21,7 +21,7 @@ const createApi = async (options: CreateApiOptions) => {
openapi: {
info: {
title: 'FluxCurrent',
description: 'Sample backend service',
description: 'A home for all data',
version: '1.0.0',
},
tags: [
@@ -37,6 +37,10 @@ const createApi = async (options: CreateApiOptions) => {
await app.register(fastifyApiReference, {
routePrefix: '/docs',
configuration: {
theme: 'elysiajs',
pageTitle: 'FluxCurrent API',
},
});
await app.register(FastifySSEPlugin);

View File

@@ -12,7 +12,7 @@ const streamEndpoint: FastifyPluginAsyncZod<{ services: Services }> = async (fas
url: '/documents',
schema: {
operationId: 'get.stream.documents',
summary: 'Stream documents matching a query',
summary: 'Subscribe to documents matching a query',
tags: ['streams', 'documents'],
querystring: z.object({
query: z.string().optional(),

View File

@@ -6,3 +6,4 @@ const services = new Services();
const api = await createApi({ services });
await api.listen({ port: 3000 });
console.log('Started');