UNPKG

fumadocs-openapi

Version:

Generate MDX docs for your OpenAPI spec

60 lines (59 loc) 1.15 kB
import { ResolvedSchema } from "../../utils/schema.js"; import { SchemaUIProps } from "./client.js"; import "../../types.js"; import { ReactNode } from "react"; import "react/jsx-runtime"; //#region src/ui/schema/index.d.ts interface FieldBase { description?: ReactNode; infoTags?: ReactNode[]; typeName: string; aliasName: string; deprecated?: boolean; } type SchemaData = FieldBase & ({ type: 'primitive'; } | { type: 'object'; props: { name: string; $type: string; required: boolean; }[]; } | { type: 'array'; item: { $type: string; }; } | { type: 'or'; items: { name: string; $type: string; }[]; } | { type: 'and'; items: { name: string; $type: string; }[]; }); interface SchemaUIOptions { root: ResolvedSchema; client: Omit<SchemaUIProps, 'generated'>; /** * include read only props */ readOnly?: boolean; /** * include write only props */ writeOnly?: boolean; } interface SchemaUIGeneratedData { $root: string; refs: Record<string, SchemaData>; } //#endregion export { SchemaUIGeneratedData, SchemaUIOptions }; //# sourceMappingURL=index.d.ts.map