feat: add openapi gen to core

This commit is contained in:
2023-06-27 11:14:28 +02:00
parent 5b4d2bd16c
commit c4260dc882
11 changed files with 14 additions and 51 deletions

View File

@@ -86,7 +86,7 @@ class LightweightDefinitionBuilder {
esModuleInterop: true,
experimentalDecorators: true,
inlineSourceMap: true,
module: ts.ModuleKind.CommonJS,
module: ts.ModuleKind.NodeNext,
strict: true,
target: ts.ScriptTarget.ES2015,
},

View File

@@ -23,7 +23,7 @@ import {LightweightDefinition} from './lightweight-definition.js';
*/
function buildIndex(project: LightweightProject): Record<string, string> {
return Object.fromEntries(
Object.values(project).flatMap((definitions, file) =>
Object.entries(project).flatMap(([file, definitions]) =>
Object.keys(definitions).map(definition => [definition, file.toString()]),
),
);