@kubb/plugin-oas
Version:
OpenAPI Specification (OAS) plugin for Kubb, providing core functionality for parsing and processing OpenAPI/Swagger schemas for code generation.
32 lines (29 loc) • 1.12 kB
JavaScript
;
var react = require('@kubb/react');
var jsxRuntime = require('@kubb/react/jsx-runtime');
// src/components/Operation.tsx
var OperationContext = react.createContext({});
function Operation({ operation, children }) {
return /* @__PURE__ */ jsxRuntime.jsx(OperationContext.Provider, { value: { operation }, children });
}
Operation.Context = OperationContext;
var SchemaContext = react.createContext({
name: "unknown",
tree: []
});
function Schema({ name, schemaObject, tree = [], children }) {
return /* @__PURE__ */ jsxRuntime.jsx(SchemaContext.Provider, { value: { name, schemaObject, tree }, children });
}
Schema.Context = SchemaContext;
var OasContext = react.createContext({});
function Oas({ oas, children, operations, generator }) {
return /* @__PURE__ */ jsxRuntime.jsx(OasContext.Provider, { value: { oas, generator, operations }, children });
}
Oas.Context = OasContext;
Oas.Operation = Operation;
Oas.Schema = Schema;
exports.Oas = Oas;
exports.Operation = Operation;
exports.Schema = Schema;
//# sourceMappingURL=chunk-Z2NREI4X.cjs.map
//# sourceMappingURL=chunk-Z2NREI4X.cjs.map