diff --git a/packages/rejs-swagger/src/options.ts b/packages/rejs-swagger/src/options.ts index 3a2a938..6f55bee 100644 --- a/packages/rejs-swagger/src/options.ts +++ b/packages/rejs-swagger/src/options.ts @@ -1,3 +1,4 @@ +import { OpenAPIObjectConfig } from '@asteasolutions/zod-to-openapi/dist/v3.0/openapi-generator' import { UrlSchema } from '@relab/rejs' export type SwaggerOptions = { @@ -5,6 +6,7 @@ export type SwaggerOptions = { version?: string title?: string description?: string + options?: OpenAPIObjectConfig ui?: | { enabled: true diff --git a/packages/rejs-swagger/src/swagger.ts b/packages/rejs-swagger/src/swagger.ts index 9de11ef..27179f8 100644 --- a/packages/rejs-swagger/src/swagger.ts +++ b/packages/rejs-swagger/src/swagger.ts @@ -32,6 +32,7 @@ export const swagger: (options?: SwaggerOptions) => Middleware = options => conf .status(200) .send( generator.generateDocument({ + ...(options?.options ?? {}), openapi: '3.0.0', info: { version: options?.version ?? '',