UNPKG

@standard-community/standard-openapi

Version:

[![npm version](https://img.shields.io/npm/v/@standard-community/standard-openapi.svg)](https://npmjs.org/package/@standard-community/standard-openapi "View this project on NPM") [![npm downloads](https://img.shields.io/npm/dm/@standard-community/standard

19 lines (16 loc) 784 B
import * as openapi_types from 'openapi-types'; import { StandardSchemaV1 } from '@standard-schema/spec'; import { T as ToOpenAPISchemaContext, a as ToOpenAPISchemaFn } from './utils-D4f8cMSa.js'; /** * Converts a Standard Schema to a OpenAPI schema. */ declare const toOpenAPISchema: (schema: StandardSchemaV1, context?: Partial<ToOpenAPISchemaContext>) => Promise<{ schema: openapi_types.OpenAPIV3_1.SchemaObject; components: openapi_types.OpenAPIV3_1.ComponentsObject | undefined; }>; /** * Load vendor before calling toOpenAPISchema, * for imporving performance and adding support for unsupported vendors */ declare function loadVendor(vendor: string, fn: ToOpenAPISchemaFn): void; export { ToOpenAPISchemaContext, ToOpenAPISchemaFn, loadVendor, toOpenAPISchema };