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'),