Skip to content

Commit 04110e6

Browse files
authored
fix: failing pruning api call (#224)
What was added? - Added a fix for the failing pruning API call to set the endpoint URL correctly.
1 parent 078969d commit 04110e6

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/infrastructure/services/validation-service.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ export interface ValidateApiResponse {
5454
}
5555

5656
export class ValidationService {
57+
private readonly apiBaseUrl = "https://api.apimatic.io" as const;
58+
5759
constructor(private readonly configDir: DirectoryPath) {}
5860

5961
async validateViaFile({
@@ -105,7 +107,7 @@ export class ValidationService {
105107
formData.append("file", createReadStream(specPath.toString()));
106108
formData.append("featuresToRemove", JSON.stringify(featuresToRemove));
107109

108-
const baseURL = envInfo.getBaseUrl();
110+
const baseURL = envInfo.getBaseUrl() ?? this.apiBaseUrl;
109111

110112
try {
111113
const response = await axios({

0 commit comments

Comments
 (0)