@kubb/plugin-oas
Version:
Generator swagger
32 lines (29 loc) • 1.11 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, value, tree = [], children }) {
return /* @__PURE__ */ jsxRuntime.jsx(SchemaContext.Provider, { value: { name, schema: value, 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-KXB5DUFD.cjs.map
//# sourceMappingURL=chunk-KXB5DUFD.cjs.map