UNPKG

@kubb/plugin-oas

Version:

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

33 lines (30 loc) 1.03 kB
import * as react from 'react'; import { SchemaObject } from '@kubb/oas'; import { Key, KubbNode } from '@kubb/react/types'; import { S as Schema$1 } from './SchemaMapper-B21ZmWag.cjs'; type SchemaContextProps = { name: string; schemaObject?: SchemaObject; tree: Array<Schema$1>; }; type Props = { key?: Key; name: string; schemaObject?: SchemaObject; tree?: Array<Schema$1>; children?: KubbNode; }; /** * Provides schema-related context to descendant components. * * Wraps its children with a context containing the schema name, optional schema object, and an optional schema type tree. * * @param name - The name of the schema. * @param schemaObject - The schema object to provide in context, if available. * @param tree - An array representing the schema type hierarchy. */ declare function Schema({ name, schemaObject, tree, children }: Props): any; declare namespace Schema { var Context: react.Context<SchemaContextProps>; } export { Schema as S, type SchemaContextProps as a };