UNPKG

@kubb/plugin-oas

Version:

OpenAPI Specification (OAS) plugin for Kubb, providing core functionality for parsing and processing OpenAPI/Swagger schemas for code generation.

72 lines (71 loc) 3.64 kB
import { C as Plugin, E as UserPluginWithLifeCycle, a as SchemaMapper, b as Config, c as schemaKeywords, g as SchemaObject, h as Operation, i as SchemaKeywordMapper, n as SchemaKeyword, o as SchemaTree, r as SchemaKeywordBase, s as isKeyword, t as Schema, w as PluginFactoryOptions } from "./SchemaMapper-DOSP3wgJ.cjs"; import { C as Resolver, S as ResolvePathOptions, _ as Options, a as createReactGenerator$1, b as Ref, c as SchemaGeneratorBuildOptions, d as OperationGenerator, f as OperationMethodResult, g as OperationSchemas, h as OperationSchema, i as ReactGenerator, l as SchemaGeneratorOptions, m as Include, n as createGenerator$1, o as GetSchemaGeneratorOptions, p as Exclude, r as Generator$1, s as SchemaGenerator, u as SchemaMethodResult, v as Override, x as Refs, y as PluginOas } from "./createGenerator-BK8WKARk.cjs"; import { Fabric } from "@kubb/react-fabric"; //#region src/plugin.d.ts declare const pluginOasName = "plugin-oas"; declare const pluginOas: (options?: Options | undefined) => UserPluginWithLifeCycle<PluginOas>; //#endregion //#region src/utils.d.ts type BuildOperationsOptions<TOptions extends PluginFactoryOptions> = { config: Config; fabric: Fabric; Component: ReactGenerator<any>['Operations']; generator: Omit<OperationGenerator<TOptions>, 'build'>; plugin: Plugin<TOptions>; }; declare function buildOperations<TOptions extends PluginFactoryOptions>(operations: Array<Operation>, { config, fabric, plugin, generator, Component }: BuildOperationsOptions<TOptions>): Promise<void>; type BuildOperationOptions<TOptions extends PluginFactoryOptions> = { config: Config; fabric: Fabric; Component: ReactGenerator<any>['Operation']; generator: Omit<OperationGenerator<TOptions>, 'build'>; plugin: Plugin<TOptions>; }; declare function buildOperation<TOptions extends PluginFactoryOptions>(operation: Operation, { config, fabric, plugin, generator, Component }: BuildOperationOptions<TOptions>): Promise<void>; type BuildSchemaOptions<TOptions extends PluginFactoryOptions> = { config: Config; fabric: Fabric; Component: ReactGenerator<any>['Schema']; generator: Omit<SchemaGenerator<SchemaGeneratorOptions, TOptions>, 'build'>; plugin: Plugin<TOptions>; }; declare function buildSchema<TOptions extends PluginFactoryOptions>(schema: { name: string; tree: Array<Schema>; value: SchemaObject; }, { config, fabric, plugin, Component, generator }: BuildSchemaOptions<TOptions>): Promise<void>; //#endregion //#region src/index.d.ts /** * @deprecated use `import { createGenerator } from '@kubb/plugin-oas/generators'` */ declare const createGenerator: typeof createGenerator$1; /** * @deprecated use `import { createReactGenerator } from '@kubb/plugin-oas/generators'` */ declare const createReactGenerator: typeof createReactGenerator$1; /** * @deprecated use `import { Generator } from '@kubb/plugin-oas/generators'` */ type Generator<TOptions extends PluginFactoryOptions> = Generator$1<TOptions>; //#endregion export { Exclude, Generator, type GetSchemaGeneratorOptions, Include, OperationGenerator, type OperationMethodResult, OperationSchema, OperationSchemas, Options, Override, PluginOas, Ref, Refs, ResolvePathOptions, Resolver, type Schema, SchemaGenerator, type SchemaGeneratorBuildOptions, type SchemaGeneratorOptions, type SchemaKeyword, type SchemaKeywordBase, type SchemaKeywordMapper, type SchemaMapper, type SchemaMethodResult, type SchemaTree, buildOperation, buildOperations, buildSchema, createGenerator, createReactGenerator, isKeyword, pluginOas, pluginOasName, schemaKeywords }; //# sourceMappingURL=index.d.cts.map