vls-openapi-generator 1.1.0 → 1.2.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.
package/dist/generate-openapi.js
CHANGED
|
@@ -51,11 +51,6 @@ const generateTemplate = async () => {
|
|
|
51
51
|
await (0, util_1.promisify)(child_process_1.exec)('npx tsc');
|
|
52
52
|
const handlerFiles = await fs_1.promises.readdir(HANDLERS_DIR);
|
|
53
53
|
const existingOpenAPIFile = JSON.parse(await fs_1.promises.readFile(OPENAPI_FILE, 'utf-8'));
|
|
54
|
-
existingOpenAPIFile.paths = {};
|
|
55
|
-
existingOpenAPIFile.components = {
|
|
56
|
-
parameters: {},
|
|
57
|
-
schemas: {}
|
|
58
|
-
};
|
|
59
54
|
for (const handler of handlerFiles) {
|
|
60
55
|
const fileName = path.parse(handler).name;
|
|
61
56
|
const { bodySchema, queryParametersSchema, eventResponseParametersSchema, eventResponseModulesSchema, OPENAPI_CONFIG: openAPIConfig } = (await Promise.resolve(`${path.join(SCHEMAS_DIR, fileName + '.js')}`).then(s => __importStar(require(s))).catch(() => ({})));
|
package/package.json
CHANGED
package/src/generate-openapi.ts
CHANGED
|
@@ -24,12 +24,6 @@ const generateTemplate = async (): Promise<void> => {
|
|
|
24
24
|
const handlerFiles = await fs.readdir(HANDLERS_DIR);
|
|
25
25
|
const existingOpenAPIFile = JSON.parse(await fs.readFile(OPENAPI_FILE, 'utf-8')) as OpenAPI;
|
|
26
26
|
|
|
27
|
-
existingOpenAPIFile.paths = {};
|
|
28
|
-
existingOpenAPIFile.components = {
|
|
29
|
-
parameters: {},
|
|
30
|
-
schemas: {}
|
|
31
|
-
};
|
|
32
|
-
|
|
33
27
|
for (const handler of handlerFiles) {
|
|
34
28
|
const fileName = path.parse(handler).name;
|
|
35
29
|
|