Keep the 0.29 compatibility fixes minimal

This commit is contained in:
Nolann Biron
2026-10-30 16:28:40 +01:00
parent de62f48ff7
commit cab41a2f90
2 changed files with 2 additions and 9 deletions
-1
View File
@@ -1,6 +1,5 @@
import type { OpenAPIV3, OpenAPIV3_1 } from '@scalar/openapi-types';
// oxlint-disable-next-line typescript/no-explicit-any
export type AnyObject = Record<string, any>;
/**
+2 -8
View File
@@ -10,14 +10,8 @@ import { parseOpenAPIV3 } from './v3';
export async function convertOpenAPIV2ToOpenAPIV3(
input: ParseOpenAPIInput
): Promise<ParseOpenAPIResult> {
const { specification } = upgradeFromInput(input);
if (!specification) {
throw new OpenAPIParseError('Failed to convert Swagger 2.0 to OpenAPI 3.1.1', {
code: 'v2-conversion',
rootURL: input.rootURL,
});
}
return parseOpenAPIV3({ ...input, rootURL: input.rootURL, value: specification });
const result = upgradeFromInput(input);
return parseOpenAPIV3({ ...input, rootURL: input.rootURL, value: result.specification! });
}
/**