Skip to content

Commit

Permalink
cleanup of openapi no context error msg
Browse files Browse the repository at this point in the history
  • Loading branch information
Gmin2 committed Sep 18, 2024
1 parent 3716f9c commit d3fd9f5
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/convert.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@ export function convert(input: AsyncAPIDocument, version: AsyncAPIConvertVersion
export function convert(input: string | AsyncAPIDocument, version: AsyncAPIConvertVersion , options: ConvertOptions= {}): string | AsyncAPIDocument {
const { format, document } = serializeInput(input);

if ('openapi' in document) {
throw new Error('Cannot convert OpenAPI document. Use convertOpenAPI function instead.');
}

const asyncapiVersion = document.asyncapi;
let fromVersion = conversionVersions.indexOf(asyncapiVersion);
const toVersion = conversionVersions.indexOf(version);
Expand Down

0 comments on commit d3fd9f5

Please sign in to comment.