@@ -9,15 +9,15 @@ import { type RouteRecord, bundlePaths, createRouteRecord } from "./route";
9
9
import { bundleSchemas } from "./schema" ;
10
10
import type { OpenApiDocument } from "@omer-x/openapi-types" ;
11
11
import type { ComponentsObject } from "@omer-x/openapi-types/components" ;
12
- import type { ServerObject } from "@omer-x/openapi-types/server" ;
13
12
import type { ZodType } from "zod" ;
14
13
15
14
type GeneratorOptions = {
16
15
include ?: string [ ] ,
17
16
exclude ?: string [ ] ,
18
17
routeDefinerName ?: string ,
19
18
rootPath ?: string ,
20
- servers ?: ServerObject [ ] ,
19
+ info ?: OpenApiDocument [ "info" ] ,
20
+ servers ?: OpenApiDocument [ "servers" ] ,
21
21
security ?: OpenApiDocument [ "security" ] ,
22
22
securitySchemes ?: ComponentsObject [ "securitySchemes" ] ,
23
23
clearUnusedSchemas ?: boolean ,
@@ -28,6 +28,7 @@ export default async function generateOpenApiSpec(schemas: Record<string, ZodTyp
28
28
exclude : excludeOption = [ ] ,
29
29
routeDefinerName = "defineRoute" ,
30
30
rootPath : additionalRootPath ,
31
+ info,
31
32
servers,
32
33
security,
33
34
securitySchemes,
@@ -66,7 +67,7 @@ export default async function generateOpenApiSpec(schemas: Record<string, ZodTyp
66
67
67
68
return {
68
69
openapi : "3.1.0" ,
69
- info : {
70
+ info : info ?? {
70
71
title : metadata . serviceName ,
71
72
version : metadata . version ,
72
73
} ,
0 commit comments