swagger improvements
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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(),
|
||||
|
||||
@@ -6,3 +6,4 @@ const services = new Services();
|
||||
const api = await createApi({ services });
|
||||
|
||||
await api.listen({ port: 3000 });
|
||||
console.log('Started');
|
||||
|
||||
Reference in New Issue
Block a user