Skip to content

Commit

Permalink
fix some linting problem
Browse files Browse the repository at this point in the history
  • Loading branch information
Gmin2 committed Sep 24, 2024
1 parent 42713ef commit 3fb330d
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/commands/convert.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ export default class Convert extends Command {
this.metricsMetadata.to_version = flags['target-version'];

// Determine if the input is OpenAPI or AsyncAPI
const specJson = this.specFile.toJson();
const isOpenAPI = flags['format'] === 'openapi';
const isAsyncAPI = flags['format'] === 'asyncapi';

Expand All @@ -49,9 +48,8 @@ export default class Convert extends Command {
// Handle file output or log the result
convertedFileFormatted = this.formatConvertedFile(convertedFile);
await this.handleOutput(flags.output, convertedFileFormatted);

} catch (err) {
this.handleError(err, filePath ?? "unknown", flags);
this.handleError(err, filePath ?? 'unknown', flags);
}
}

Expand All @@ -62,9 +60,8 @@ export default class Convert extends Command {
return this.convertOpenAPI(specJson, flags);
} else if (isAsyncAPI) {
return this.convertAsyncAPI(flags);
} else {
return this.convertPostman(flags);
}
}
return this.convertPostman(flags);
}

private convertOpenAPI(specJson: any, flags: any) {
Expand Down

0 comments on commit 3fb330d

Please sign in to comment.