@omer-x/next-openapi-json-generator 1.3.3 → 1.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +3 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +3 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -434,6 +434,7 @@ async function generateOpenApiSpec(schemas, {
|
|
|
434
434
|
exclude: excludeOption = [],
|
|
435
435
|
routeDefinerName = "defineRoute",
|
|
436
436
|
rootPath: additionalRootPath,
|
|
437
|
+
info,
|
|
437
438
|
servers,
|
|
438
439
|
security,
|
|
439
440
|
securitySchemes,
|
|
@@ -472,7 +473,8 @@ async function generateOpenApiSpec(schemas, {
|
|
|
472
473
|
openapi: "3.1.0",
|
|
473
474
|
info: {
|
|
474
475
|
title: metadata.serviceName,
|
|
475
|
-
version: metadata.version
|
|
476
|
+
version: metadata.version,
|
|
477
|
+
...info ?? {}
|
|
476
478
|
},
|
|
477
479
|
servers,
|
|
478
480
|
...clearUnusedSchemasOption ? clearUnusedSchemas(pathsAndComponents) : pathsAndComponents,
|
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { OpenApiDocument } from '@omer-x/openapi-types';
|
|
2
2
|
import { ComponentsObject } from '@omer-x/openapi-types/components';
|
|
3
|
-
import { ServerObject } from '@omer-x/openapi-types/server';
|
|
4
3
|
import { ZodType } from 'zod';
|
|
5
4
|
|
|
6
5
|
type GeneratorOptions = {
|
|
@@ -8,11 +7,12 @@ type GeneratorOptions = {
|
|
|
8
7
|
exclude?: string[];
|
|
9
8
|
routeDefinerName?: string;
|
|
10
9
|
rootPath?: string;
|
|
11
|
-
|
|
10
|
+
info?: OpenApiDocument["info"];
|
|
11
|
+
servers?: OpenApiDocument["servers"];
|
|
12
12
|
security?: OpenApiDocument["security"];
|
|
13
13
|
securitySchemes?: ComponentsObject["securitySchemes"];
|
|
14
14
|
clearUnusedSchemas?: boolean;
|
|
15
15
|
};
|
|
16
|
-
declare function generateOpenApiSpec(schemas: Record<string, ZodType>, { include: includeOption, exclude: excludeOption, routeDefinerName, rootPath: additionalRootPath, servers, security, securitySchemes, clearUnusedSchemas: clearUnusedSchemasOption, }?: GeneratorOptions): Promise<Omit<OpenApiDocument, "components"> & Required<Pick<OpenApiDocument, "components">>>;
|
|
16
|
+
declare function generateOpenApiSpec(schemas: Record<string, ZodType>, { include: includeOption, exclude: excludeOption, routeDefinerName, rootPath: additionalRootPath, info, servers, security, securitySchemes, clearUnusedSchemas: clearUnusedSchemasOption, }?: GeneratorOptions): Promise<Omit<OpenApiDocument, "components"> & Required<Pick<OpenApiDocument, "components">>>;
|
|
17
17
|
|
|
18
18
|
export { generateOpenApiSpec as default };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { OpenApiDocument } from '@omer-x/openapi-types';
|
|
2
2
|
import { ComponentsObject } from '@omer-x/openapi-types/components';
|
|
3
|
-
import { ServerObject } from '@omer-x/openapi-types/server';
|
|
4
3
|
import { ZodType } from 'zod';
|
|
5
4
|
|
|
6
5
|
type GeneratorOptions = {
|
|
@@ -8,11 +7,12 @@ type GeneratorOptions = {
|
|
|
8
7
|
exclude?: string[];
|
|
9
8
|
routeDefinerName?: string;
|
|
10
9
|
rootPath?: string;
|
|
11
|
-
|
|
10
|
+
info?: OpenApiDocument["info"];
|
|
11
|
+
servers?: OpenApiDocument["servers"];
|
|
12
12
|
security?: OpenApiDocument["security"];
|
|
13
13
|
securitySchemes?: ComponentsObject["securitySchemes"];
|
|
14
14
|
clearUnusedSchemas?: boolean;
|
|
15
15
|
};
|
|
16
|
-
declare function generateOpenApiSpec(schemas: Record<string, ZodType>, { include: includeOption, exclude: excludeOption, routeDefinerName, rootPath: additionalRootPath, servers, security, securitySchemes, clearUnusedSchemas: clearUnusedSchemasOption, }?: GeneratorOptions): Promise<Omit<OpenApiDocument, "components"> & Required<Pick<OpenApiDocument, "components">>>;
|
|
16
|
+
declare function generateOpenApiSpec(schemas: Record<string, ZodType>, { include: includeOption, exclude: excludeOption, routeDefinerName, rootPath: additionalRootPath, info, servers, security, securitySchemes, clearUnusedSchemas: clearUnusedSchemasOption, }?: GeneratorOptions): Promise<Omit<OpenApiDocument, "components"> & Required<Pick<OpenApiDocument, "components">>>;
|
|
17
17
|
|
|
18
18
|
export { generateOpenApiSpec as default };
|
package/dist/index.js
CHANGED
|
@@ -398,6 +398,7 @@ async function generateOpenApiSpec(schemas, {
|
|
|
398
398
|
exclude: excludeOption = [],
|
|
399
399
|
routeDefinerName = "defineRoute",
|
|
400
400
|
rootPath: additionalRootPath,
|
|
401
|
+
info,
|
|
401
402
|
servers,
|
|
402
403
|
security,
|
|
403
404
|
securitySchemes,
|
|
@@ -436,7 +437,8 @@ async function generateOpenApiSpec(schemas, {
|
|
|
436
437
|
openapi: "3.1.0",
|
|
437
438
|
info: {
|
|
438
439
|
title: metadata.serviceName,
|
|
439
|
-
version: metadata.version
|
|
440
|
+
version: metadata.version,
|
|
441
|
+
...info ?? {}
|
|
440
442
|
},
|
|
441
443
|
servers,
|
|
442
444
|
...clearUnusedSchemasOption ? clearUnusedSchemas(pathsAndComponents) : pathsAndComponents,
|