@kubb/plugin-oas 3.0.0-alpha.14 → 3.0.0-alpha.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-2PMRS7PB.cjs +8 -0
- package/dist/{chunk-SMB4EG6V.cjs.map → chunk-2PMRS7PB.cjs.map} +1 -1
- package/dist/{chunk-OSKSFHO2.js → chunk-2V64GHQ4.js} +3 -3
- package/dist/{chunk-OSKSFHO2.js.map → chunk-2V64GHQ4.js.map} +1 -1
- package/dist/chunk-4JIFKRM5.js +6 -0
- package/dist/{chunk-EJHTGW4H.js.map → chunk-4JIFKRM5.js.map} +1 -1
- package/dist/{chunk-XELSZPJC.cjs → chunk-5ULY3TQB.cjs} +4 -4
- package/dist/{chunk-XELSZPJC.cjs.map → chunk-5ULY3TQB.cjs.map} +1 -1
- package/dist/{chunk-YSPJF26N.cjs → chunk-AAIEMW6V.cjs} +26 -26
- package/dist/{chunk-YSPJF26N.cjs.map → chunk-AAIEMW6V.cjs.map} +1 -1
- package/dist/{chunk-2S2QRJPN.cjs → chunk-CFU6KMOB.cjs} +4 -4
- package/dist/{chunk-2S2QRJPN.cjs.map → chunk-CFU6KMOB.cjs.map} +1 -1
- package/dist/{chunk-E2Z4IRAI.js → chunk-GAPWY2CE.js} +4 -4
- package/dist/{chunk-E2Z4IRAI.js.map → chunk-GAPWY2CE.js.map} +1 -1
- package/dist/{chunk-6BDSF64V.cjs → chunk-I3ZL3GUQ.cjs} +11 -11
- package/dist/{chunk-6BDSF64V.cjs.map → chunk-I3ZL3GUQ.cjs.map} +1 -1
- package/dist/{chunk-B4WIB7UG.js → chunk-M3V3WMCW.js} +3 -3
- package/dist/{chunk-B4WIB7UG.js.map → chunk-M3V3WMCW.js.map} +1 -1
- package/dist/{chunk-A2T3ZQOU.js → chunk-PZTS5YZV.js} +4 -4
- package/dist/{chunk-A2T3ZQOU.js.map → chunk-PZTS5YZV.js.map} +1 -1
- package/dist/components.cjs +6 -6
- package/dist/components.js +3 -3
- package/dist/generators.cjs +5 -5
- package/dist/generators.js +4 -4
- package/dist/hooks.cjs +12 -12
- package/dist/hooks.js +3 -3
- package/dist/index.cjs +18 -18
- package/dist/index.js +7 -7
- package/dist/utils.cjs +9 -9
- package/dist/utils.js +3 -3
- package/package.json +9 -9
- package/src/types.ts +5 -0
- package/dist/chunk-EJHTGW4H.js +0 -6
- package/dist/chunk-SMB4EG6V.cjs +0 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/index.ts"],"names":["init_cjs_shims"],"mappings":";;;;;AAAAA,gCAAA,EAAA","file":"chunk-
|
|
1
|
+
{"version":3,"sources":["../src/components/index.ts"],"names":["init_cjs_shims"],"mappings":";;;;;AAAAA,gCAAA,EAAA","file":"chunk-2PMRS7PB.cjs","sourcesContent":["export { Oas } from './Oas.tsx'\nexport { Operation } from './Operation.tsx'\nexport { Schema } from './Schema.tsx'\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { init_esm_shims } from './chunk-
|
|
1
|
+
import { init_esm_shims } from './chunk-GAPWY2CE.js';
|
|
2
2
|
import { resolve } from 'node:path';
|
|
3
3
|
import { URLPath } from '@kubb/core/utils';
|
|
4
4
|
import { parse } from '@kubb/oas/parser';
|
|
@@ -28,5 +28,5 @@ function parseFromConfig(config, options = {}, oasClass = Oas) {
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
export { parseFromConfig };
|
|
31
|
-
//# sourceMappingURL=chunk-
|
|
32
|
-
//# sourceMappingURL=chunk-
|
|
31
|
+
//# sourceMappingURL=chunk-2V64GHQ4.js.map
|
|
32
|
+
//# sourceMappingURL=chunk-2V64GHQ4.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/utils/parseFromConfig.ts"],"names":["api"],"mappings":";;;;;;;;AAAA,cAAA,EAAA,CAAA;AAUO,SAAS,gBAAgB,MAAgB,EAAA,OAAA,GAAyB,EA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} from '@kubb/oas/parser'\n\nimport type { Config } from '@kubb/core'\nimport { Oas, type OasTypes } from '@kubb/oas'\nimport yaml from '@stoplight/yaml'\n\nexport function parseFromConfig(config: Config, options: FormatOptions = {}, oasClass: typeof Oas = Oas): Promise<Oas> {\n if ('data' in config.input) {\n if (typeof config.input.data === 'object') {\n const api: OasTypes.OASDocument = JSON.parse(JSON.stringify(config.input.data)) as OasTypes.OASDocument\n return parse(api, options, oasClass)\n }\n\n try {\n const api: string = yaml.parse(config.input.data as string) as string\n\n return parse(api, options, oasClass)\n } catch (e) {\n /* empty */\n }\n\n const api: OasTypes.OASDocument = JSON.parse(JSON.stringify(config.input.data)) as OasTypes.OASDocument\n\n return parse(api, options, oasClass)\n }\n\n if (new URLPath(config.input.path).isURL) {\n return parse(config.input.path, options, oasClass)\n }\n\n return parse(resolve(config.root, config.input.path), options, oasClass)\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/index.ts"],"names":[],"mappings":";;;AAAA,cAAA,EAAA","file":"chunk-
|
|
1
|
+
{"version":3,"sources":["../src/components/index.ts"],"names":[],"mappings":";;;AAAA,cAAA,EAAA","file":"chunk-4JIFKRM5.js","sourcesContent":["export { Oas } from './Oas.tsx'\nexport { Operation } from './Operation.tsx'\nexport { Schema } from './Schema.tsx'\n"]}
|
|
@@ -31,9 +31,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
31
31
|
mod
|
|
32
32
|
));
|
|
33
33
|
|
|
34
|
-
// ../../node_modules/.pnpm/tsup@8.2.4_@microsoft+api-extractor@7.47.7_@types+node@20.16.
|
|
34
|
+
// ../../node_modules/.pnpm/tsup@8.2.4_@microsoft+api-extractor@7.47.7_@types+node@20.16.4__@swc+core@1.7.22_jiti@1.21.6__fpzbqwwca26qndurg5tnw6xyfi/node_modules/tsup/assets/cjs_shims.js
|
|
35
35
|
var init_cjs_shims = __esm({
|
|
36
|
-
"../../node_modules/.pnpm/tsup@8.2.4_@microsoft+api-extractor@7.47.7_@types+node@20.16.
|
|
36
|
+
"../../node_modules/.pnpm/tsup@8.2.4_@microsoft+api-extractor@7.47.7_@types+node@20.16.4__@swc+core@1.7.22_jiti@1.21.6__fpzbqwwca26qndurg5tnw6xyfi/node_modules/tsup/assets/cjs_shims.js"() {
|
|
37
37
|
}
|
|
38
38
|
});
|
|
39
39
|
|
|
@@ -86,5 +86,5 @@ exports.__toESM = __toESM;
|
|
|
86
86
|
exports.getSchemaFactory = getSchemaFactory;
|
|
87
87
|
exports.getSchemas = getSchemas;
|
|
88
88
|
exports.init_cjs_shims = init_cjs_shims;
|
|
89
|
-
//# sourceMappingURL=chunk-
|
|
90
|
-
//# sourceMappingURL=chunk-
|
|
89
|
+
//# sourceMappingURL=chunk-5ULY3TQB.cjs.map
|
|
90
|
+
//# sourceMappingURL=chunk-5ULY3TQB.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../node_modules/.pnpm/tsup@8.2.4_@microsoft+api-extractor@7.47.7_@types+node@20.16.
|
|
1
|
+
{"version":3,"sources":["../../../node_modules/.pnpm/tsup@8.2.4_@microsoft+api-extractor@7.47.7_@types+node@20.16.4__@swc+core@1.7.22_jiti@1.21.6__fpzbqwwca26qndurg5tnw6xyfi/node_modules/tsup/assets/cjs_shims.js","../src/utils/getSchemas.ts","../src/utils/getSchemaFactory.ts"],"names":["oas","isOpenApiV3_1Document"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAA,cAAA,GAAA,KAAA,CAAA;AAAA,EAAA,yLAAA,GAAA;AAAA,GAAA;AAAA,CAAA,EAAA;;;ACAA,cAAA,EAAA,CAAA;AAUO,SAAS,UAAA,CAAW,EAAE,GAAA,EAAK,WAAa,EAAA,QAAA,GAAW,CAAC,SAAW,EAAA,eAAA,EAAiB,WAAW,CAAA,EAA6D,EAAA;AAC7J,EAAM,MAAA,UAAA,GAAa,GAAI,CAAA,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CAAE,CAAC,CAAK,IAAA,kBAAA,CAAA;AAC5D,QAAA,OAAA,CAAQ,IAAI,CAAI,GAAA,OAAA,CAAQ,OAAU,GAAA,WAAA,IAAe,gBAAgB,CAAG,EAAA,MAAA,CAAA;AAAA,OACtE;AAAA,KACD,CAAA,CAAA;AAAA,GACH;AAEA,EAAO,OAAA,OAAA,CAAA;AACT,CAAA;;;AC5CA,cAAA,EAAA,CAAA;AAuBO,SAAS,iBAAmDA,KAA6D,EAAA;AAC9H,EAAA,OAAO,CAAC,MAA0B,KAAA;AAChC,IAAA,MAAM,OAAU,GAAAC,yBAAA,CAAsBD,KAAI,CAAA,GAAG,IAAI,KAAQ,GAAA,KAAA,CAAA;AAEzD,IAAO,OAAA;AAAA,MACL,MAAA;AAAA,MACA,OAAA;AAAA,KACF,CAAA;AAAA,GACF,CAAA;AACF","file":"chunk-5ULY3TQB.cjs","sourcesContent":["// Shim globals in cjs bundle\n// There's a weird bug that esbuild will always inject importMetaUrl\n// if we export it as `const importMetaUrl = ... __filename ...`\n// But using a function will not cause this issue\n\nconst getImportMetaUrl = () =>\n typeof document === 'undefined'\n ? new URL(`file:${__filename}`).href\n : (document.currentScript && document.currentScript.src) ||\n new URL('main.js', document.baseURI).href\n\nexport const importMetaUrl = /* @__PURE__ */ getImportMetaUrl()\n","import type { Oas, OasTypes, contentType } from '@kubb/oas'\n\ntype Mode = 'schemas' | 'responses' | 'requestBodies'\n\nexport type GetSchemasProps = {\n oas: Oas\n contentType?: contentType\n includes?: Mode[]\n}\n\nexport function getSchemas({ oas, contentType, includes = ['schemas', 'requestBodies', 'responses'] }: GetSchemasProps): Record<string, OasTypes.SchemaObject> {\n const components = oas.getDefinition().components\n\n let schemas: Record<string, OasTypes.SchemaObject> = {}\n\n if (includes.includes('schemas')) {\n schemas = {\n ...schemas,\n ...((components?.schemas as Record<string, OasTypes.SchemaObject>) || {}),\n }\n }\n\n const requestBodies = components?.requestBodies || {}\n if (includes.includes('responses')) {\n const responses = components?.responses || {}\n\n Object.entries(responses).forEach(([name, response]: [string, OasTypes.ResponseObject]) => {\n if (response.content && !schemas[name]) {\n const firstContentType = Object.keys(response.content)[0] || 'application/json'\n schemas[name] = response.content?.[contentType || firstContentType]?.schema as OasTypes.SchemaObject\n }\n })\n }\n\n if (includes.includes('requestBodies')) {\n Object.entries(requestBodies).forEach(([name, request]: [string, OasTypes.RequestBodyObject]) => {\n if (request.content && !schemas[name]) {\n const firstContentType = Object.keys(request.content)[0] || 'application/json'\n schemas[name] = request.content?.[contentType || firstContentType]?.schema as OasTypes.SchemaObject\n }\n })\n }\n\n return schemas\n}\n","import { isOpenApiV3_1Document } from '@kubb/oas'\n\nimport type { Oas, OpenAPIV3, OpenAPIV3_1, SchemaObject } from '@kubb/oas'\n\n/**\n * Make it possible to narrow down the schema based on a specific version(3 or 3.1)\n */\ntype SchemaResult<TWithRef extends boolean = false> =\n | {\n schema?: (TWithRef extends true ? OpenAPIV3.SchemaObject | OpenAPIV3.ReferenceObject : OpenAPIV3.SchemaObject) & {\n nullable?: boolean\n 'x-nullable'?: boolean\n }\n version: '3.0'\n }\n | {\n schema?: (TWithRef extends true ? OpenAPIV3_1.SchemaObject | OpenAPIV3_1.ReferenceObject : OpenAPIV3_1.SchemaObject) & {\n nullable?: boolean\n 'x-nullable'?: boolean\n }\n version: '3.1'\n }\n\nexport function getSchemaFactory<TWithRef extends boolean = false>(oas: Oas): (schema?: SchemaObject) => SchemaResult<TWithRef> {\n return (schema?: SchemaObject) => {\n const version = isOpenApiV3_1Document(oas.api) ? '3.1' : '3.0'\n\n return {\n schema,\n version,\n } as SchemaResult<TWithRef>\n }\n}\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk5ULY3TQB_cjs = require('./chunk-5ULY3TQB.cjs');
|
|
4
4
|
var core = require('@kubb/core');
|
|
5
5
|
var transformers = require('@kubb/core/transformers');
|
|
6
6
|
var utils = require('@kubb/core/utils');
|
|
@@ -13,9 +13,9 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
|
13
13
|
var transformers__default = /*#__PURE__*/_interopDefault(transformers);
|
|
14
14
|
|
|
15
15
|
// ../../node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react.production.min.js
|
|
16
|
-
var require_react_production_min =
|
|
16
|
+
var require_react_production_min = chunk5ULY3TQB_cjs.__commonJS({
|
|
17
17
|
"../../node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react.production.min.js"(exports) {
|
|
18
|
-
|
|
18
|
+
chunk5ULY3TQB_cjs.init_cjs_shims();
|
|
19
19
|
var l = Symbol.for("react.element");
|
|
20
20
|
var n = Symbol.for("react.portal");
|
|
21
21
|
var p = Symbol.for("react.fragment");
|
|
@@ -286,9 +286,9 @@ var require_react_production_min = chunkXELSZPJC_cjs.__commonJS({
|
|
|
286
286
|
});
|
|
287
287
|
|
|
288
288
|
// ../../node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react.development.js
|
|
289
|
-
var require_react_development =
|
|
289
|
+
var require_react_development = chunk5ULY3TQB_cjs.__commonJS({
|
|
290
290
|
"../../node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react.development.js"(exports, module) {
|
|
291
|
-
|
|
291
|
+
chunk5ULY3TQB_cjs.init_cjs_shims();
|
|
292
292
|
if (process.env.NODE_ENV !== "production") {
|
|
293
293
|
(function() {
|
|
294
294
|
if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart === "function") {
|
|
@@ -2159,9 +2159,9 @@ var require_react_development = chunkXELSZPJC_cjs.__commonJS({
|
|
|
2159
2159
|
});
|
|
2160
2160
|
|
|
2161
2161
|
// ../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js
|
|
2162
|
-
var require_react =
|
|
2162
|
+
var require_react = chunk5ULY3TQB_cjs.__commonJS({
|
|
2163
2163
|
"../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js"(exports, module) {
|
|
2164
|
-
|
|
2164
|
+
chunk5ULY3TQB_cjs.init_cjs_shims();
|
|
2165
2165
|
if (process.env.NODE_ENV === "production") {
|
|
2166
2166
|
module.exports = require_react_production_min();
|
|
2167
2167
|
} else {
|
|
@@ -2171,9 +2171,9 @@ var require_react = chunkXELSZPJC_cjs.__commonJS({
|
|
|
2171
2171
|
});
|
|
2172
2172
|
|
|
2173
2173
|
// ../../node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react-jsx-runtime.production.min.js
|
|
2174
|
-
var require_react_jsx_runtime_production_min =
|
|
2174
|
+
var require_react_jsx_runtime_production_min = chunk5ULY3TQB_cjs.__commonJS({
|
|
2175
2175
|
"../../node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react-jsx-runtime.production.min.js"(exports) {
|
|
2176
|
-
|
|
2176
|
+
chunk5ULY3TQB_cjs.init_cjs_shims();
|
|
2177
2177
|
var f = require_react();
|
|
2178
2178
|
var k = Symbol.for("react.element");
|
|
2179
2179
|
var l = Symbol.for("react.fragment");
|
|
@@ -2196,9 +2196,9 @@ var require_react_jsx_runtime_production_min = chunkXELSZPJC_cjs.__commonJS({
|
|
|
2196
2196
|
});
|
|
2197
2197
|
|
|
2198
2198
|
// ../../node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react-jsx-runtime.development.js
|
|
2199
|
-
var require_react_jsx_runtime_development =
|
|
2199
|
+
var require_react_jsx_runtime_development = chunk5ULY3TQB_cjs.__commonJS({
|
|
2200
2200
|
"../../node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react-jsx-runtime.development.js"(exports) {
|
|
2201
|
-
|
|
2201
|
+
chunk5ULY3TQB_cjs.init_cjs_shims();
|
|
2202
2202
|
if (process.env.NODE_ENV !== "production") {
|
|
2203
2203
|
(function() {
|
|
2204
2204
|
var React = require_react();
|
|
@@ -3083,9 +3083,9 @@ var require_react_jsx_runtime_development = chunkXELSZPJC_cjs.__commonJS({
|
|
|
3083
3083
|
});
|
|
3084
3084
|
|
|
3085
3085
|
// ../../node_modules/.pnpm/react@18.3.1/node_modules/react/jsx-runtime.js
|
|
3086
|
-
var require_jsx_runtime =
|
|
3086
|
+
var require_jsx_runtime = chunk5ULY3TQB_cjs.__commonJS({
|
|
3087
3087
|
"../../node_modules/.pnpm/react@18.3.1/node_modules/react/jsx-runtime.js"(exports, module) {
|
|
3088
|
-
|
|
3088
|
+
chunk5ULY3TQB_cjs.init_cjs_shims();
|
|
3089
3089
|
if (process.env.NODE_ENV === "production") {
|
|
3090
3090
|
module.exports = require_react_jsx_runtime_production_min();
|
|
3091
3091
|
} else {
|
|
@@ -3095,7 +3095,7 @@ var require_jsx_runtime = chunkXELSZPJC_cjs.__commonJS({
|
|
|
3095
3095
|
});
|
|
3096
3096
|
|
|
3097
3097
|
// src/SchemaMapper.ts
|
|
3098
|
-
|
|
3098
|
+
chunk5ULY3TQB_cjs.init_cjs_shims();
|
|
3099
3099
|
var schemaKeywords = {
|
|
3100
3100
|
any: "any",
|
|
3101
3101
|
strict: "strict",
|
|
@@ -3147,7 +3147,7 @@ function isKeyword(meta, keyword) {
|
|
|
3147
3147
|
}
|
|
3148
3148
|
|
|
3149
3149
|
// src/SchemaGenerator.ts
|
|
3150
|
-
|
|
3150
|
+
chunk5ULY3TQB_cjs.init_cjs_shims();
|
|
3151
3151
|
var SchemaGenerator = class _SchemaGenerator extends core.BaseGenerator {
|
|
3152
3152
|
// Collect the types of all referenced schemas, so we can export them later
|
|
3153
3153
|
refs = {};
|
|
@@ -3381,7 +3381,7 @@ var SchemaGenerator = class _SchemaGenerator extends core.BaseGenerator {
|
|
|
3381
3381
|
];
|
|
3382
3382
|
}
|
|
3383
3383
|
#getParsedSchemaObject(schema) {
|
|
3384
|
-
const parsedSchema =
|
|
3384
|
+
const parsedSchema = chunk5ULY3TQB_cjs.getSchemaFactory(this.context.oas)(schema);
|
|
3385
3385
|
return parsedSchema;
|
|
3386
3386
|
}
|
|
3387
3387
|
/**
|
|
@@ -3744,7 +3744,7 @@ var SchemaGenerator = class _SchemaGenerator extends core.BaseGenerator {
|
|
|
3744
3744
|
}
|
|
3745
3745
|
async build(...generators) {
|
|
3746
3746
|
const { oas, contentType, include } = this.context;
|
|
3747
|
-
const schemas =
|
|
3747
|
+
const schemas = chunk5ULY3TQB_cjs.getSchemas({ oas, contentType, includes: include });
|
|
3748
3748
|
const promises = Object.entries(schemas).reduce((acc, [name, schema]) => {
|
|
3749
3749
|
const options = this.#getOptions({ name });
|
|
3750
3750
|
const promiseOperation = this.schema.call(this, name, schema, {
|
|
@@ -3782,8 +3782,8 @@ var SchemaGenerator = class _SchemaGenerator extends core.BaseGenerator {
|
|
|
3782
3782
|
};
|
|
3783
3783
|
|
|
3784
3784
|
// src/components/Operation.tsx
|
|
3785
|
-
|
|
3786
|
-
var import_jsx_runtime =
|
|
3785
|
+
chunk5ULY3TQB_cjs.init_cjs_shims();
|
|
3786
|
+
var import_jsx_runtime = chunk5ULY3TQB_cjs.__toESM(require_jsx_runtime(), 1);
|
|
3787
3787
|
var OperationContext = react.createContext({});
|
|
3788
3788
|
function Operation({ operation, children }) {
|
|
3789
3789
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(OperationContext.Provider, { value: { operation }, children });
|
|
@@ -3791,11 +3791,11 @@ function Operation({ operation, children }) {
|
|
|
3791
3791
|
Operation.Context = OperationContext;
|
|
3792
3792
|
|
|
3793
3793
|
// src/hooks/useSchema.ts
|
|
3794
|
-
|
|
3794
|
+
chunk5ULY3TQB_cjs.init_cjs_shims();
|
|
3795
3795
|
|
|
3796
3796
|
// src/components/Schema.tsx
|
|
3797
|
-
|
|
3798
|
-
var import_jsx_runtime2 =
|
|
3797
|
+
chunk5ULY3TQB_cjs.init_cjs_shims();
|
|
3798
|
+
var import_jsx_runtime2 = chunk5ULY3TQB_cjs.__toESM(require_jsx_runtime(), 1);
|
|
3799
3799
|
var SchemaContext = react.createContext({
|
|
3800
3800
|
name: "unknown",
|
|
3801
3801
|
tree: []
|
|
@@ -3878,8 +3878,8 @@ function useSchema() {
|
|
|
3878
3878
|
}
|
|
3879
3879
|
|
|
3880
3880
|
// src/components/Oas.tsx
|
|
3881
|
-
|
|
3882
|
-
var import_jsx_runtime3 =
|
|
3881
|
+
chunk5ULY3TQB_cjs.init_cjs_shims();
|
|
3882
|
+
var import_jsx_runtime3 = chunk5ULY3TQB_cjs.__toESM(require_jsx_runtime(), 1);
|
|
3883
3883
|
var OasContext = react.createContext({});
|
|
3884
3884
|
function Oas({ oas, children, operations, generator }) {
|
|
3885
3885
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(OasContext.Provider, { value: { oas, generator, operations }, children });
|
|
@@ -3942,5 +3942,5 @@ exports.isKeyword = isKeyword;
|
|
|
3942
3942
|
exports.require_jsx_runtime = require_jsx_runtime;
|
|
3943
3943
|
exports.schemaKeywords = schemaKeywords;
|
|
3944
3944
|
exports.useSchema = useSchema;
|
|
3945
|
-
//# sourceMappingURL=chunk-
|
|
3946
|
-
//# sourceMappingURL=chunk-
|
|
3945
|
+
//# sourceMappingURL=chunk-AAIEMW6V.cjs.map
|
|
3946
|
+
//# sourceMappingURL=chunk-AAIEMW6V.cjs.map
|