From 6839700f33b6add90fc9882ae40c32320f444b1f Mon Sep 17 00:00:00 2001 From: Ali Asghar <75574550+aliasghar98@users.noreply.github.com> Date: Mon, 10 Nov 2025 13:08:44 +0500 Subject: [PATCH] fix: set fallback value when env url not given --- src/infrastructure/services/validation-service.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/infrastructure/services/validation-service.ts b/src/infrastructure/services/validation-service.ts index 3ec96ccb2..a0ea11fe0 100644 --- a/src/infrastructure/services/validation-service.ts +++ b/src/infrastructure/services/validation-service.ts @@ -54,6 +54,8 @@ export interface ValidateApiResponse { } export class ValidationService { + private readonly apiBaseUrl = "https://api.apimatic.io" as const; + constructor(private readonly configDir: DirectoryPath) {} async validateViaFile({ @@ -105,7 +107,7 @@ export class ValidationService { formData.append("file", createReadStream(specPath.toString())); formData.append("featuresToRemove", JSON.stringify(featuresToRemove)); - const baseURL = envInfo.getBaseUrl(); + const baseURL = envInfo.getBaseUrl() ?? this.apiBaseUrl; try { const response = await axios({