MCPcopy Index your code
hub / github.com/GitbookIO/gitbook / convertOpenAPIV2ToOpenAPIV3

Function convertOpenAPIV2ToOpenAPIV3

packages/openapi-parser/src/v2.ts:9–14  ·  view source on GitHub ↗
(
    input: ParseOpenAPIInput
)

Source from the content-addressed store, hash-verified

7 * Convert a Swagger 2.0 schema to an OpenAPI 3.0 schema.
8 */
9export async function convertOpenAPIV2ToOpenAPIV3(
10 input: ParseOpenAPIInput
11): Promise<ParseOpenAPIResult> {
12 const result = upgradeFromInput(input);
13 return parseOpenAPIV3({ ...input, rootURL: input.rootURL, value: result.specification });
14}
15
16/**
17 * Upgrade a Swagger 2.0 schema to an OpenAPI 3.0 schema.

Callers 2

v2.test.tsFile · 0.90
parseOpenAPIFunction · 0.90

Calls 2

parseOpenAPIV3Function · 0.90
upgradeFromInputFunction · 0.85

Tested by

no test coverage detected