fix: add cruical Converter ceation option

This commit is contained in:
Rainer Killinger
2021-08-27 13:49:01 +02:00
parent 3fd23689c1
commit f82b465263

View File

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