From f82b4652637808abf68f1e72b1de0c76b228457a Mon Sep 17 00:00:00 2001 From: Rainer Killinger Date: Fri, 27 Aug 2021 13:49:01 +0200 Subject: [PATCH] fix: add cruical Converter ceation option --- src/schema.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/schema.ts b/src/schema.ts index 32ca8ba7..28b39795 100644 --- a/src/schema.ts +++ b/src/schema.ts @@ -45,11 +45,13 @@ export class Converter { * Create a new converter * * @param projectPath Path to the project + * @param sourcePath Path to optionally point to a different directory of / or single source file */ - constructor(projectPath: string) { + constructor(projectPath: string, sourcePath?: string) { // set config for schema generator const config: Config = { ...DEFAULT_CONFIG, + path: sourcePath, sortProps: true, topRef: false, tsconfig: path.join(getTsconfigPath(projectPath), 'tsconfig.json'),