UNPKG

@kubb/plugin-oas

Version:

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

28 lines (26 loc) 1.01 kB
import { createContext } from '@kubb/react'; import { jsx } from '@kubb/react/jsx-runtime'; // src/components/Operation.tsx var OperationContext = createContext({}); function Operation({ operation, children }) { return /* @__PURE__ */ jsx(OperationContext.Provider, { value: { operation }, children }); } Operation.Context = OperationContext; var SchemaContext = createContext({ name: "unknown", tree: [] }); function Schema({ name, schemaObject, tree = [], children }) { return /* @__PURE__ */ jsx(SchemaContext.Provider, { value: { name, schemaObject, tree }, children }); } Schema.Context = SchemaContext; var OasContext = createContext({}); function Oas({ oas, children, operations, generator }) { return /* @__PURE__ */ jsx(OasContext.Provider, { value: { oas, generator, operations }, children }); } Oas.Context = OasContext; Oas.Operation = Operation; Oas.Schema = Schema; export { Oas, Operation, Schema }; //# sourceMappingURL=chunk-JNN4JPWK.js.map //# sourceMappingURL=chunk-JNN4JPWK.js.map