UNPKG

openapi-typescript

Version:

Convert OpenAPI 3.0 & 3.1 schemas to TypeScript

16 lines (15 loc) 654 B
import { BaseResolver, type Config as RedoclyConfig, type Document } from "@redocly/openapi-core"; import { Readable } from "node:stream"; import type { OpenAPI3 } from "../types.js"; export interface ValidateAndBundleOptions { redoc: RedoclyConfig; silent: boolean; cwd?: URL; } interface ParseSchemaOptions { absoluteRef: string; resolver: BaseResolver; } export declare function parseSchema(schema: unknown, { absoluteRef, resolver }: ParseSchemaOptions): Promise<Document>; export declare function validateAndBundle(source: string | URL | OpenAPI3 | Readable | Buffer, options: ValidateAndBundleOptions): Promise<any>; export {};