diff --git a/.chronus/changes/chore-parser-migration-2025-9-10-15-16-40.md b/.chronus/changes/chore-parser-migration-2025-9-10-15-16-40.md new file mode 100644 index 00000000000..1381cd4fdea --- /dev/null +++ b/.chronus/changes/chore-parser-migration-2025-9-10-15-16-40.md @@ -0,0 +1,7 @@ +--- +changeKind: internal +packages: + - "@typespec/openapi3" +--- + +[deps] swaps outdated and unmaintained openapi-types and swagger parser dependencies for drop in replacements \ No newline at end of file diff --git a/packages/openapi3/package.json b/packages/openapi3/package.json index 03deb28ae70..3fe3e6036b9 100644 --- a/packages/openapi3/package.json +++ b/packages/openapi3/package.json @@ -62,9 +62,10 @@ "!dist/test/**" ], "dependencies": { - "@apidevtools/swagger-parser": "~12.0.0", + "@scalar/json-magic": "^0.6.1", + "@scalar/openapi-parser": "^0.22.3", + "@scalar/openapi-types": "^0.5.0", "@typespec/asset-emitter": "workspace:^", - "openapi-types": "~12.1.3", "yaml": "~2.8.0" }, "peerDependencies": { diff --git a/packages/openapi3/src/cli/actions/convert/convert-file.ts b/packages/openapi3/src/cli/actions/convert/convert-file.ts index b5403a3685e..5e150498bec 100644 --- a/packages/openapi3/src/cli/actions/convert/convert-file.ts +++ b/packages/openapi3/src/cli/actions/convert/convert-file.ts @@ -1,4 +1,7 @@ -import OpenAPIParser from "@apidevtools/swagger-parser"; +import { bundle } from "@scalar/json-magic/bundle"; +import { fetchUrls, parseJson, parseYaml } from "@scalar/json-magic/bundle/plugins/browser"; +import { readFiles } from "@scalar/json-magic/bundle/plugins/node"; +import { OpenAPI } from "@scalar/openapi-types"; import { formatTypeSpec, resolvePath } from "@typespec/compiler"; import { OpenAPI3Document } from "../../../types.js"; import { CliHost } from "../../types.js"; @@ -11,9 +14,14 @@ import { createContext } from "./utils/context.js"; export async function convertAction(host: CliHost, args: ConvertCliArgs) { // attempt to read the file const fullPath = resolvePath(process.cwd(), args.path); - const parser = new OpenAPIParser(); - const model = await parser.bundle(fullPath); - const context = createContext(parser, model as OpenAPI3Document, console, args.namespace); + const data = (await bundle(fullPath, { + plugins: [readFiles(), fetchUrls(), parseYaml(), parseJson()], + treeShake: false, + })) as OpenAPI.Document; + if (!data) { + throw new Error("Failed to load OpenAPI document"); + } + const context = createContext(data as OpenAPI3Document, console, args.namespace); const program = transform(context); let mainTsp: string; try { diff --git a/packages/openapi3/src/cli/actions/convert/convert.ts b/packages/openapi3/src/cli/actions/convert/convert.ts index 94425f6b9e8..49d31d985fc 100644 --- a/packages/openapi3/src/cli/actions/convert/convert.ts +++ b/packages/openapi3/src/cli/actions/convert/convert.ts @@ -1,4 +1,4 @@ -import OpenAPIParser from "@apidevtools/swagger-parser"; +import { AnyObject, dereference } from "@scalar/openapi-parser"; import { formatTypeSpec } from "@typespec/compiler"; import { OpenAPI3Document } from "../../../types.js"; import { generateMain } from "./generators/generate-main.js"; @@ -20,14 +20,21 @@ export async function convertOpenAPI3Document( document: OpenAPI3Document, { disableExternalRefs, namespace }: ConvertOpenAPI3DocumentOptions = {}, ) { - const parser = new OpenAPIParser(); - const bundleOptions = disableExternalRefs + const dereferenceOptions = disableExternalRefs ? { - resolve: { external: false, http: false, file: false }, + onDereference: (data: { schema: AnyObject; ref: string }): void => { + if (data.ref.startsWith("#")) { + return; + } + throw new Error(`External $ref pointers are disabled, but found $ref: ${data.ref}`); + }, } : {}; - await parser.bundle(document as any, bundleOptions); - const context = createContext(parser, document, console, namespace); + const { specification } = await dereference(document, dereferenceOptions); + if (!specification) { + throw new Error("Failed to dereference OpenAPI document"); + } + const context = createContext(document, console, namespace); const program = transform(context); const content = generateMain(program, context); try { diff --git a/packages/openapi3/src/cli/actions/convert/utils/context.ts b/packages/openapi3/src/cli/actions/convert/utils/context.ts index 0bd593ddc5e..be5ddcb8ec7 100644 --- a/packages/openapi3/src/cli/actions/convert/utils/context.ts +++ b/packages/openapi3/src/cli/actions/convert/utils/context.ts @@ -1,5 +1,10 @@ -import type OpenAPIParser from "@apidevtools/swagger-parser"; -import { OpenAPI3Document, OpenAPI3Encoding, OpenAPI3Schema, Refable } from "../../../../types.js"; +import { + OpenAPI3Document, + OpenAPI3Encoding, + OpenAPI3Schema, + OpenAPIDocument3_1, + Refable, +} from "../../../../types.js"; import { Logger } from "../../../types.js"; import { SchemaToExpressionGenerator } from "../generators/generate-types.js"; import { generateNamespaceName } from "./generate-namespace-name.js"; @@ -47,12 +52,7 @@ export interface Context { ): string; } -export type Parser = { - $refs: OpenAPIParser["$refs"]; -}; - export function createContext( - parser: Parser, openApi3Doc: OpenAPI3Document, logger?: Logger, namespace?: string, @@ -96,8 +96,35 @@ export function createContext( getSchemaByRef(ref) { return this.getByRef(ref); }, - getByRef(ref) { - return parser.$refs.get(ref) as any; + getByRef(ref: string): T | undefined { + const splitRef = ref.split("/"); + const componentKind = splitRef[2]; // #/components/schemas/Pet -> components + const componentName = splitRef[3]; // #/components/schemas/Pet -> Pet + switch (componentKind) { + case "schemas": + return openApi3Doc.components?.schemas?.[componentName] as T; + case "responses": + return openApi3Doc.components?.responses?.[componentName] as T; + case "parameters": + return openApi3Doc.components?.parameters?.[componentName] as T; + case "examples": + return openApi3Doc.components?.examples?.[componentName] as T; + case "requestBodies": + return openApi3Doc.components?.requestBodies?.[componentName] as T; + case "headers": + return openApi3Doc.components?.headers?.[componentName] as T; + case "securitySchemes": + return openApi3Doc.components?.securitySchemes?.[componentName] as T; + case "links": + return openApi3Doc.components?.links?.[componentName] as T; + case "callbacks": + return (openApi3Doc as unknown as OpenAPIDocument3_1).components?.callbacks?.[ + componentName + ] as T; + default: + this.logger.warn(`Unsupported component kind in $ref: ${ref}`); + return undefined; + } }, registerMultipartSchema(ref: string, encoding?: Record) { multipartSchemas.set(ref, encoding ?? null); diff --git a/packages/openapi3/test/tsp-openapi3/context.test.ts b/packages/openapi3/test/tsp-openapi3/context.test.ts index aa060b74a3d..04e6c979fe4 100644 --- a/packages/openapi3/test/tsp-openapi3/context.test.ts +++ b/packages/openapi3/test/tsp-openapi3/context.test.ts @@ -1,24 +1,26 @@ -import OpenAPIParser from "@apidevtools/swagger-parser"; -import { OpenAPI } from "openapi-types"; +import { dereference } from "@scalar/openapi-parser"; +import { OpenAPI } from "@scalar/openapi-types"; import { beforeAll, describe, expect, it } from "vitest"; import { createContext } from "../../src/cli/actions/convert/utils/context.js"; import { OpenAPI3Document } from "../../src/types.js"; describe("tsp-openapi: Context methods", () => { - let parser: OpenAPIParser; let doc: OpenAPI.Document<{}>; beforeAll(async () => { - parser = new OpenAPIParser(); - doc = await parser.bundle({ + const { specification } = await dereference({ openapi: "3.0.0", info: { title: "Test", version: "1.0.0" }, paths: {}, }); + if (!specification) { + throw new Error("Failed to dereference OpenAPI document"); + } + doc = specification; }); it("should add a component encoding to the registry", () => { - const context = createContext(parser, doc as OpenAPI3Document); + const context = createContext(doc as OpenAPI3Document); const reference = "#/components/schemas/MySchema"; const encoding = { myProperty: { @@ -31,7 +33,7 @@ describe("tsp-openapi: Context methods", () => { }); it("should consider a component without encoding to be registered", () => { - const context = createContext(parser, doc as OpenAPI3Document); + const context = createContext(doc as OpenAPI3Document); const reference = "#/components/schemas/MySchema"; context.registerMultipartSchema(reference); expect(context.getMultipartSchemaEncoding(reference)).toBeUndefined(); @@ -39,7 +41,7 @@ describe("tsp-openapi: Context methods", () => { }); it("should NOT consider a component to be registered when it's not", () => { - const context = createContext(parser, doc as OpenAPI3Document); + const context = createContext(doc as OpenAPI3Document); const reference = "#/components/schemas/MySchema"; expect(context.getMultipartSchemaEncoding(reference)).toBeUndefined(); expect(context.isSchemaReferenceRegisteredForMultipartForm(reference)).toBe(false); diff --git a/packages/openapi3/test/tsp-openapi3/generate-type.test.ts b/packages/openapi3/test/tsp-openapi3/generate-type.test.ts index 6e90be7e0bf..45bfb031111 100644 --- a/packages/openapi3/test/tsp-openapi3/generate-type.test.ts +++ b/packages/openapi3/test/tsp-openapi3/generate-type.test.ts @@ -1,4 +1,4 @@ -import OpenAPIParser from "@apidevtools/swagger-parser"; +import { dereference } from "@scalar/openapi-parser"; import { formatTypeSpec } from "@typespec/compiler"; import { strictEqual } from "node:assert"; import { beforeAll, describe, it } from "vitest"; @@ -302,13 +302,15 @@ const testScenarios: TestScenario[] = [ describe("tsp-openapi: generate-type", () => { let context: Context; beforeAll(async () => { - const parser = new OpenAPIParser(); - const doc = await parser.bundle({ + const { specification } = await dereference({ openapi: "3.0.0", info: { title: "Test", version: "1.0.0" }, paths: {}, }); - context = createContext(parser, doc as OpenAPI3Document); + if (!specification) { + throw new Error("Failed to dereference OpenAPI document"); + } + context = createContext(specification as OpenAPI3Document); }); testScenarios.forEach((t) => it(`${generateScenarioName(t)}`, async () => { diff --git a/packages/openapi3/test/tsp-openapi3/http-part-methods.test.ts b/packages/openapi3/test/tsp-openapi3/http-part-methods.test.ts index f8c7e671fc5..2385b997675 100644 --- a/packages/openapi3/test/tsp-openapi3/http-part-methods.test.ts +++ b/packages/openapi3/test/tsp-openapi3/http-part-methods.test.ts @@ -1,4 +1,4 @@ -import OpenAPIParser from "@apidevtools/swagger-parser"; +import { dereference } from "@scalar/openapi-parser"; import { formatTypeSpec } from "@typespec/compiler"; import { strictEqual } from "node:assert"; import { beforeAll, describe, it } from "vitest"; @@ -15,13 +15,12 @@ describe("tsp-openapi: HTTP part generation methods", () => { let context: Context; beforeAll(async () => { - const parser = new OpenAPIParser(); - const doc = await parser.bundle({ + const { specification } = await dereference({ openapi: "3.0.0", info: { title: "Test", version: "1.0.0" }, paths: {}, }); - context = createContext(parser, doc as OpenAPI3Document); + context = createContext(specification as OpenAPI3Document); }); describe("basic HTTP part wrapping", () => { diff --git a/packages/openapi3/test/tsp-openapi3/missing-operation-id.test.ts b/packages/openapi3/test/tsp-openapi3/missing-operation-id.test.ts index 894461077f5..4858f2fc6e2 100644 --- a/packages/openapi3/test/tsp-openapi3/missing-operation-id.test.ts +++ b/packages/openapi3/test/tsp-openapi3/missing-operation-id.test.ts @@ -1,15 +1,9 @@ import { beforeEach, describe, expect, it, vi } from "vitest"; import { transformPaths } from "../../src/cli/actions/convert/transforms/transform-paths.js"; -import { createContext, Parser } from "../../src/cli/actions/convert/utils/context.js"; +import { createContext } from "../../src/cli/actions/convert/utils/context.js"; import { convertOpenAPI3Document } from "../../src/index.js"; describe("Convert OpenAPI3 with missing operationId", () => { - const mockParser: Parser = { - $refs: { - get: () => undefined, - } as any, - }; - // Mock logger to capture warnings const mockLogger = { trace: vi.fn(), @@ -65,7 +59,7 @@ describe("Convert OpenAPI3 with missing operationId", () => { }, }; - const context = createContext(mockParser, openApiDoc as any, mockLogger); + const context = createContext(openApiDoc as any, mockLogger); const operations = transformPaths(openApiDoc.paths, context); // Should have 3 operations @@ -110,7 +104,7 @@ describe("Convert OpenAPI3 with missing operationId", () => { }, }; - const context = createContext(mockParser, openApiDoc as any, mockLogger); + const context = createContext(openApiDoc as any, mockLogger); const operations = transformPaths(openApiDoc.paths, context); // Should have 2 operations diff --git a/packages/openapi3/test/tsp-openapi3/single-anyof-oneof.test.ts b/packages/openapi3/test/tsp-openapi3/single-anyof-oneof.test.ts index b18a48aa3cb..7341516ad42 100644 --- a/packages/openapi3/test/tsp-openapi3/single-anyof-oneof.test.ts +++ b/packages/openapi3/test/tsp-openapi3/single-anyof-oneof.test.ts @@ -1,5 +1,5 @@ -import OpenAPIParser from "@apidevtools/swagger-parser"; -import { OpenAPI } from "openapi-types"; +import { dereference } from "@scalar/openapi-parser"; +import { OpenAPI } from "@scalar/openapi-types"; import { beforeAll, describe, expect, it } from "vitest"; import { generateDataType } from "../../src/cli/actions/convert/generators/generate-model.js"; import { TypeSpecDataTypes, TypeSpecModel } from "../../src/cli/actions/convert/interfaces.js"; @@ -8,12 +8,10 @@ import { createContext } from "../../src/cli/actions/convert/utils/context.js"; import { OpenAPI3Document } from "../../src/types.js"; describe("tsp-openapi: single anyOf/oneOf inline schema should produce model", () => { - let parser: OpenAPIParser; let doc: OpenAPI.Document<{}>; beforeAll(async () => { - parser = new OpenAPIParser(); - doc = await parser.bundle({ + const { specification } = await dereference({ openapi: "3.1.0", info: { title: "repro API", version: "1.0.0", description: "API for repro" }, servers: [{ url: "http://localhost:3000" }], @@ -87,10 +85,14 @@ describe("tsp-openapi: single anyOf/oneOf inline schema should produce model", ( }, }, }); + if (!specification) { + throw new Error("Failed to dereference OpenAPI document"); + } + doc = specification; }); it("should generate a model for anyOf with single inline schema", () => { - const context = createContext(parser, doc as OpenAPI3Document); + const context = createContext(doc as OpenAPI3Document); const types: TypeSpecDataTypes[] = []; transformComponentSchemas(context, types); @@ -115,7 +117,7 @@ describe("tsp-openapi: single anyOf/oneOf inline schema should produce model", ( }); it("should generate a model for oneOf with single inline schema", () => { - const context = createContext(parser, doc as OpenAPI3Document); + const context = createContext(doc as OpenAPI3Document); const types: TypeSpecDataTypes[] = []; transformComponentSchemas(context, types); @@ -132,7 +134,7 @@ describe("tsp-openapi: single anyOf/oneOf inline schema should produce model", ( }); it("should generate a model for anyOf with single inline schema + null", () => { - const context = createContext(parser, doc as OpenAPI3Document); + const context = createContext(doc as OpenAPI3Document); const types: TypeSpecDataTypes[] = []; transformComponentSchemas(context, types); @@ -152,7 +154,7 @@ describe("tsp-openapi: single anyOf/oneOf inline schema should produce model", ( }); it("should generate a model for oneOf with single inline schema + null", () => { - const context = createContext(parser, doc as OpenAPI3Document); + const context = createContext(doc as OpenAPI3Document); const types: TypeSpecDataTypes[] = []; transformComponentSchemas(context, types); diff --git a/packages/openapi3/test/tsp-openapi3/transform-component-schemas.test.ts b/packages/openapi3/test/tsp-openapi3/transform-component-schemas.test.ts index cb5cc5ef816..f894bbe1d78 100644 --- a/packages/openapi3/test/tsp-openapi3/transform-component-schemas.test.ts +++ b/packages/openapi3/test/tsp-openapi3/transform-component-schemas.test.ts @@ -1,5 +1,5 @@ -import OpenAPIParser from "@apidevtools/swagger-parser"; -import { OpenAPI } from "openapi-types"; +import { dereference } from "@scalar/openapi-parser"; +import { OpenAPI } from "@scalar/openapi-types"; import { beforeAll, describe, expect, it } from "vitest"; import { TypeSpecModel } from "../../src/cli/actions/convert/interfaces.js"; import { transformComponentSchemas } from "../../src/cli/actions/convert/transforms/transform-component-schemas.js"; @@ -7,12 +7,10 @@ import { createContext } from "../../src/cli/actions/convert/utils/context.js"; import { OpenAPI3Document } from "../../src/types.js"; describe("tsp-openapi: transform component schemas", () => { - let parser: OpenAPIParser; let doc: OpenAPI.Document<{}>; beforeAll(async () => { - parser = new OpenAPIParser(); - doc = await parser.bundle({ + const { specification } = await dereference({ openapi: "3.0.0", info: { title: "Test", version: "1.0.0" }, paths: { @@ -52,10 +50,14 @@ describe("tsp-openapi: transform component schemas", () => { }, }, }); + if (!specification) { + throw new Error("Failed to dereference OpenAPI document"); + } + doc = specification; }); it("adds the encoding to the model when available", () => { - const context = createContext(parser, doc as OpenAPI3Document); + const context = createContext(doc as OpenAPI3Document); context.registerMultipartSchema("#/components/schemas/MyModel", { id: { contentType: "text/plain" }, name: { contentType: "text/plain" }, diff --git a/packages/openapi3/test/tsp-openapi3/union-anyof-with-null.test.ts b/packages/openapi3/test/tsp-openapi3/union-anyof-with-null.test.ts index de64e511884..82d33bde7ff 100644 --- a/packages/openapi3/test/tsp-openapi3/union-anyof-with-null.test.ts +++ b/packages/openapi3/test/tsp-openapi3/union-anyof-with-null.test.ts @@ -1,5 +1,5 @@ -import OpenAPIParser from "@apidevtools/swagger-parser"; -import { OpenAPI } from "openapi-types"; +import { dereference } from "@scalar/openapi-parser"; +import { OpenAPI } from "@scalar/openapi-types"; import { beforeAll, describe, expect, it } from "vitest"; import { generateDataType } from "../../src/cli/actions/convert/generators/generate-model.js"; import { TypeSpecUnion } from "../../src/cli/actions/convert/interfaces.js"; @@ -8,12 +8,10 @@ import { createContext } from "../../src/cli/actions/convert/utils/context.js"; import { OpenAPI3Document } from "../../src/types.js"; describe("tsp-openapi: union anyOf with null", () => { - let parser: OpenAPIParser; let doc: OpenAPI.Document<{}>; beforeAll(async () => { - parser = new OpenAPIParser(); - doc = await parser.bundle({ + const { specification } = await dereference({ openapi: "3.1.0", info: { title: "Test", version: "1.0.0" }, paths: {}, @@ -68,10 +66,14 @@ on reasoning in a response.`, }, }, }); + if (!specification) { + throw new Error("Failed to dereference OpenAPI document"); + } + doc = specification; }); it("generates proper TypeSpec code with description and null", () => { - const context = createContext(parser, doc as OpenAPI3Document); + const context = createContext(doc as OpenAPI3Document); const types: TypeSpecUnion[] = []; transformComponentSchemas(context, types); @@ -98,7 +100,7 @@ on reasoning in a response.`, }); it("preserves description from oneOf members with constraints when one is null", () => { - const context = createContext(parser, doc as OpenAPI3Document); + const context = createContext(doc as OpenAPI3Document); const types: TypeSpecUnion[] = []; transformComponentSchemas(context, types); @@ -117,7 +119,7 @@ on reasoning in a response.`, }); it("handles reference + null anyOf correctly", () => { - const context = createContext(parser, doc as OpenAPI3Document); + const context = createContext(doc as OpenAPI3Document); const types: TypeSpecUnion[] = []; transformComponentSchemas(context, types); @@ -134,7 +136,7 @@ on reasoning in a response.`, }); it("handles oneOf with null type array properly", async () => { - const docWithTypeArray = await parser.bundle({ + const { specification } = await dereference({ openapi: "3.1.0", info: { title: "Test", version: "1.0.0" }, paths: {}, @@ -155,8 +157,12 @@ on reasoning in a response.`, }, }, }); + if (!specification) { + throw new Error("Failed to dereference OpenAPI document"); + } + const docWithTypeArray = specification; - const context = createContext(parser, docWithTypeArray as OpenAPI3Document); + const context = createContext(docWithTypeArray as OpenAPI3Document); const types: TypeSpecUnion[] = []; transformComponentSchemas(context, types); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6ee91a594bb..d48b7401deb 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1283,15 +1283,18 @@ importers: packages/openapi3: dependencies: - '@apidevtools/swagger-parser': - specifier: ~12.0.0 - version: 12.0.0(openapi-types@12.1.3) + '@scalar/json-magic': + specifier: ^0.6.1 + version: 0.6.1 + '@scalar/openapi-parser': + specifier: ^0.22.3 + version: 0.22.3 + '@scalar/openapi-types': + specifier: ^0.5.0 + version: 0.5.0 '@typespec/asset-emitter': specifier: workspace:^ version: link:../asset-emitter - openapi-types: - specifier: ~12.1.3 - version: 12.1.3 yaml: specifier: ~2.8.0 version: 2.8.1 @@ -2734,22 +2737,6 @@ packages: '@antfu/utils@9.2.0': resolution: {integrity: sha512-Oq1d9BGZakE/FyoEtcNeSwM7MpDO2vUBi11RWBZXf75zPsbUVWmUs03EqkRFrcgbXyKTas0BdZWC1wcuSoqSAw==} - '@apidevtools/json-schema-ref-parser@14.0.1': - resolution: {integrity: sha512-Oc96zvmxx1fqoSEdUmfmvvb59/KDOnUoJ7s2t7bISyAn0XEz57LCCw8k2Y4Pf3mwKaZLMciESALORLgfe2frCw==} - engines: {node: '>= 16'} - - '@apidevtools/openapi-schemas@2.1.0': - resolution: {integrity: sha512-Zc1AlqrJlX3SlpupFGpiLi2EbteyP7fXmUOGup6/DnkRgjP9bgMM/ag+n91rsv0U1Gpz0H3VILA/o3bW7Ua6BQ==} - engines: {node: '>=10'} - - '@apidevtools/swagger-methods@3.0.2': - resolution: {integrity: sha512-QAkD5kK2b1WfjDS/UQn/qQkbwF31uqRjPTrsCs5ZG9BQGAkjwvqGFjjPqAuzac/IYzpPtRzjCP1WrTuAIjMrXg==} - - '@apidevtools/swagger-parser@12.0.0': - resolution: {integrity: sha512-WLJIWcfOXrSKlZEM+yhA2Xzatgl488qr1FoOxixYmtWapBzwSC0gVGq4WObr4hHClMIiFFdOBdixNkvWqkWIWA==} - peerDependencies: - openapi-types: '>=7' - '@arcanis/slice-ansi@1.1.1': resolution: {integrity: sha512-xguP2WR2Dv0gQ7Ykbdb7BNCnPnIPB94uTi0Z2NvkRBEnhbwjOQ7QyQKJXrVQg4qDpiD9hA5l5cCwy/z2OXgc3w==} @@ -5574,6 +5561,26 @@ packages: '@types/node': optional: true + '@scalar/helpers@0.0.12': + resolution: {integrity: sha512-4NDmHShyi1hrVRsJCdRZT/FIpy+/5PFbVbQLRYX/pjpu5cYqHBj9s6n5RI6gGDXEBHAIFi63g9FC6Isgr66l1Q==} + engines: {node: '>=20'} + + '@scalar/json-magic@0.6.1': + resolution: {integrity: sha512-HJMPY5dUU3EXVS4EkjAFXo+uCrby/YFu/gljKDQnhYWRy5zQ0sJWrOEDcHS8nLoJRCIRD5tiVpCxnUnSb6OoAQ==} + engines: {node: '>=20'} + + '@scalar/openapi-parser@0.22.3': + resolution: {integrity: sha512-5Znbx9HVJb7EV9EJXJrUj+cs116QIBwX/hxkyaiLaaDL2w5S+z1rjtV+d0Jv7382FCtzAtfv/9llVuxZYPVqXA==} + engines: {node: '>=20'} + + '@scalar/openapi-types@0.5.0': + resolution: {integrity: sha512-HJBcLa+/mPP+3TCcQngj/iW5UqynRosOQdEETXjmdy6Ngw8wBjwIcT6C86J5jufJ6sI8++HYnt+e7pAvp5FO6A==} + engines: {node: '>=20'} + + '@scalar/openapi-upgrader@0.1.3': + resolution: {integrity: sha512-iROhcgy3vge6zsviPtoTLHale0nYt1PLhuMmJweQwJ0U23ZYyYhV5xgHtAd0OBEXuqT6rjYbJFvKOJZmJOwpNQ==} + engines: {node: '>=20'} + '@scarf/scarf@1.4.0': resolution: {integrity: sha512-xxeapPiUXdZAE3che6f3xogoJPeZgig6omHEy1rIY5WVsB3H2BHNnZH+gHG6x91SCWyQCzWGsuL2Hh3ClO5/qQ==} @@ -7226,9 +7233,6 @@ packages: resolution: {integrity: sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==} engines: {node: '>= 0.4'} - call-me-maybe@1.0.2: - resolution: {integrity: sha512-HpX65o1Hnr9HH25ojC1YGs7HCQLq0GCOibSaWER0eNpgJ/Z1MZv2mTc7+xh6WOPxbRVcmgbv4hGU+uSQ/2xFZQ==} - callsites@3.1.0: resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} engines: {node: '>=6'} @@ -9643,6 +9647,10 @@ packages: resolution: {integrity: sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==} engines: {'0': node >= 0.2.0} + jsonpointer@5.0.1: + resolution: {integrity: sha512-p/nXbhSEcu3pZRdkW1OfJhpsVtW1gd4Wa1fnQc9YLiTfAjn0312eMKimbdIQzuZl9aa9xUGaRlP9T/CJE/ditQ==} + engines: {node: '>=0.10.0'} + jsonwebtoken@9.0.2: resolution: {integrity: sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ==} engines: {node: '>=12', npm: '>=6'} @@ -9731,6 +9739,10 @@ packages: resolution: {integrity: sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==} engines: {node: '>=6'} + leven@4.1.0: + resolution: {integrity: sha512-KZ9W9nWDT7rF7Dazg8xyLHGLrmpgq2nVNFUckhqdW3szVP6YhCpp/RAnpmVExA9JvrMynjwSLVrEj3AepHR6ew==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + levn@0.4.1: resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} engines: {node: '>= 0.8.0'} @@ -10589,9 +10601,6 @@ packages: resolution: {integrity: sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==} engines: {node: '>=12'} - openapi-types@12.1.3: - resolution: {integrity: sha512-N4YtSYJqghVu4iek2ZUvcN/0aqH1kRDuNqzcycDxhOUpg7GdvLa2F3DgS6yBNhInhv2r/6I0Flkn7CqL8+nIcw==} - optionator@0.9.4: resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==} engines: {node: '>= 0.8.0'} @@ -13303,6 +13312,11 @@ packages: resolution: {integrity: sha512-CBKFWExMn46Foo4cldiChEzn7S7SRV+wqiluAb6xmueD/fGyRHIhX8m14vVGgeFWjN540nKCNVj6P21eQjgTuA==} engines: {node: '>= 14'} + yaml@2.8.0: + resolution: {integrity: sha512-4lLa/EcQCB0cJkyts+FpIRx5G/llPxfP6VQU5KByHEhLxY3IJCH0f0Hy1MHI8sClTvsIb8qwRJ6R/ZdlDJ/leQ==} + engines: {node: '>= 14.6'} + hasBin: true + yaml@2.8.1: resolution: {integrity: sha512-lcYcMxX2PO9XMGvAJkJ3OsNMw+/7FKes7/hgerGUYWIoWu5j/+YQqcZr5JnPZWzOsEBgMbSbiSTn/dv/69Mkpw==} engines: {node: '>= 14.6'} @@ -13372,6 +13386,9 @@ packages: zod@3.25.76: resolution: {integrity: sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==} + zod@4.1.11: + resolution: {integrity: sha512-WPsqwxITS2tzx1bzhIKsEs19ABD5vmCVa4xBo2tq/SrV4RNZtfws1EnCWQXM6yh8bD08a1idvkB5MZSBiZsjwg==} + zwitch@2.0.4: resolution: {integrity: sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==} @@ -13543,25 +13560,6 @@ snapshots: '@antfu/utils@9.2.0': {} - '@apidevtools/json-schema-ref-parser@14.0.1': - dependencies: - '@types/json-schema': 7.0.15 - js-yaml: 4.1.0 - - '@apidevtools/openapi-schemas@2.1.0': {} - - '@apidevtools/swagger-methods@3.0.2': {} - - '@apidevtools/swagger-parser@12.0.0(openapi-types@12.1.3)': - dependencies: - '@apidevtools/json-schema-ref-parser': 14.0.1 - '@apidevtools/openapi-schemas': 2.1.0 - '@apidevtools/swagger-methods': 3.0.2 - ajv: 8.17.1 - ajv-draft-04: 1.0.0(ajv@8.17.1) - call-me-maybe: 1.0.2 - openapi-types: 12.1.3 - '@arcanis/slice-ansi@1.1.1': dependencies: grapheme-splitter: 1.0.4 @@ -17767,6 +17765,33 @@ snapshots: optionalDependencies: '@types/node': 24.3.1 + '@scalar/helpers@0.0.12': {} + + '@scalar/json-magic@0.6.1': + dependencies: + '@scalar/helpers': 0.0.12 + yaml: 2.8.0 + + '@scalar/openapi-parser@0.22.3': + dependencies: + '@scalar/json-magic': 0.6.1 + '@scalar/openapi-types': 0.5.0 + '@scalar/openapi-upgrader': 0.1.3 + ajv: 8.17.1 + ajv-draft-04: 1.0.0(ajv@8.17.1) + ajv-formats: 3.0.1(ajv@8.17.1) + jsonpointer: 5.0.1 + leven: 4.1.0 + yaml: 2.8.0 + + '@scalar/openapi-types@0.5.0': + dependencies: + zod: 4.1.11 + + '@scalar/openapi-upgrader@0.1.3': + dependencies: + '@scalar/openapi-types': 0.5.0 + '@scarf/scarf@1.4.0': {} '@sec-ant/readable-stream@0.4.1': {} @@ -19149,7 +19174,7 @@ snapshots: algoliasearch: 4.25.2 clipanion: 4.0.0-rc.4(typanion@3.14.0) diff: 5.2.0 - ink: 3.2.0(@types/react@18.3.24)(react@17.0.2) + ink: 3.2.0(@types/react@18.3.24)(react@18.3.1) ink-text-input: 4.0.3(ink@3.2.0(@types/react@18.3.24)(react@17.0.2))(react@17.0.2) react: 17.0.2 semver: 7.7.2 @@ -19342,7 +19367,7 @@ snapshots: '@yarnpkg/plugin-git': 3.1.3(@yarnpkg/core@4.4.3(typanion@3.14.0))(typanion@3.14.0) clipanion: 4.0.0-rc.4(typanion@3.14.0) es-toolkit: 1.39.10 - ink: 3.2.0(@types/react@18.3.24)(react@18.3.1) + ink: 3.2.0(@types/react@18.3.24)(react@17.0.2) react: 17.0.2 semver: 7.7.2 tslib: 2.8.1 @@ -20163,8 +20188,6 @@ snapshots: call-bind-apply-helpers: 1.0.2 get-intrinsic: 1.3.0 - call-me-maybe@1.0.2: {} - callsites@3.1.0: {} camelcase-keys@6.2.2: @@ -23060,6 +23083,8 @@ snapshots: jsonparse@1.3.1: {} + jsonpointer@5.0.1: {} + jsonwebtoken@9.0.2: dependencies: jws: 3.2.2 @@ -23188,6 +23213,8 @@ snapshots: leven@3.1.0: {} + leven@4.1.0: {} + levn@0.4.1: dependencies: prelude-ls: 1.2.1 @@ -24426,8 +24453,6 @@ snapshots: is-docker: 2.2.1 is-wsl: 2.2.0 - openapi-types@12.1.3: {} - optionator@0.9.4: dependencies: deep-is: 0.1.4 @@ -27373,6 +27398,8 @@ snapshots: yaml@2.2.2: {} + yaml@2.8.0: {} + yaml@2.8.1: {} yargs-parser@21.1.1: {} @@ -27441,4 +27468,6 @@ snapshots: zod@3.25.76: {} + zod@4.1.11: {} + zwitch@2.0.4: {}