diff --git a/src/analyseSchemaFile.ts b/src/analyseSchemaFile.ts index a5ffc0f7..aa9bf5d2 100644 --- a/src/analyseSchemaFile.ts +++ b/src/analyseSchemaFile.ts @@ -3,7 +3,7 @@ import Path from 'path'; import { Settings, ConvertedType, GenerateTypeFile } from './types'; import { getTypeFileNameFromSchema } from './index'; -import { Describe, getAllCustomTypes, parseSchema, typeContentToTs } from 'parse'; +import { Describe, getAllCustomTypes, parseSchema, typeContentToTs } from './parse'; export function convertSchemaInternal( settings: Settings, diff --git a/src/index.ts b/src/index.ts index 0d758ad3..895da709 100644 --- a/src/index.ts +++ b/src/index.ts @@ -2,10 +2,10 @@ import { AnySchema } from 'joi'; import Path from 'path'; import { writeFileSync } from 'fs'; -import { Settings, ConvertedType } from './types'; +import { ConvertedType, Settings } from './types'; import { convertFilesInDirectory } from './convertFilesInDirectory'; import { writeInterfaceFile } from './writeInterfaceFile'; -import { convertSchemaInternal } from 'analyseSchemaFile'; +import { convertSchemaInternal } from './analyseSchemaFile'; export { Settings }; @@ -47,7 +47,7 @@ export function convertSchema( export function getTypeFileNameFromSchema(schemaFileName: string, settings: Settings): string { return schemaFileName.endsWith(`${settings.schemaFileSuffix}.ts`) - ? schemaFileName.substring(0, schemaFileName.length - `${settings.schemaFileSuffix}.ts`.length) + ? schemaFileName.substring(0, schemaFileName.length - `${settings.schemaFileSuffix}.ts`.length) : schemaFileName.replace('.ts', ''); }