vls-openapi-generator 1.8.3 → 1.9.0

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.
@@ -77,6 +77,9 @@ const generateOpenAPI = async () => {
77
77
  }
78
78
  const { bodySchema, queryParametersSchema, eventResponseParametersSchema, eventResponseModulesSchema, OPENAPI_CONFIG: openAPIConfig } = (await Promise.resolve(`${path.join(SCHEMAS_DIR, fileName + '.js')}`).then(s => __importStar(require(s))).catch(() => ({})));
79
79
  const { LAMBDA_CONFIG } = (await Promise.resolve(`${path.join(HANDLERS_DIR, `${fileName}.js`)}`).then(s => __importStar(require(s))));
80
+ if (openAPIConfig.isDocumentationNeeded !== undefined && !openAPIConfig.isDocumentationNeeded) {
81
+ continue;
82
+ }
80
83
  const bodyComponent = (0, zod_openapi_1.generateSchema)(bodySchema ?? zod_1.z.never(), undefined, '3.0');
81
84
  const queryParametersComponent = (0, zod_openapi_1.generateSchema)(queryParametersSchema ?? zod_1.z.never(), undefined, '3.0');
82
85
  const eventResponseComponent = (0, zod_openapi_1.generateSchema)(zod_1.z.object({
@@ -1,5 +1,6 @@
1
1
  export type OpenAPIConfig = {
2
2
  tags: string[];
3
+ isDocumentationNeeded?: boolean;
3
4
  };
4
5
  export type LambdaConfig = {
5
6
  api?: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vls-openapi-generator",
3
- "version": "1.8.3",
3
+ "version": "1.9.0",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {
@@ -74,6 +74,10 @@ export const generateOpenAPI = async (): Promise<void> => {
74
74
  LAMBDA_CONFIG?: LambdaConfig;
75
75
  };
76
76
 
77
+ if (openAPIConfig.isDocumentationNeeded !== undefined && !openAPIConfig.isDocumentationNeeded) {
78
+ continue;
79
+ }
80
+
77
81
  const bodyComponent = generateSchema(bodySchema ?? z.never(), undefined, '3.0');
78
82
  const queryParametersComponent = generateSchema(queryParametersSchema ?? z.never(), undefined, '3.0');
79
83
  const eventResponseComponent = generateSchema(
@@ -1,5 +1,6 @@
1
1
  export type OpenAPIConfig = {
2
2
  tags: string[];
3
+ isDocumentationNeeded?: boolean;
3
4
  };
4
5
 
5
6
  export type LambdaConfig = {