@kubb/swagger-ts 2.0.0-beta.8 → 2.0.0-beta.9
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/components.cjs +2 -2
- package/dist/components.cjs.map +1 -1
- package/dist/components.d.cts +1 -3
- package/dist/components.d.ts +1 -3
- package/dist/components.js +2 -2
- package/dist/components.js.map +1 -1
- package/dist/index.cjs +5 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +60 -62
- package/dist/index.d.ts +60 -62
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/dist/{infer.d.ts → oas.d.ts} +56 -56
- package/dist/{infer.js → oas.js} +1 -1
- package/package.json +11 -11
- package/src/components/Oas.tsx +2 -2
- package/src/{infer → oas}/index.ts +1 -1
- package/src/{infer/parse.ts → oas/infer.ts} +1 -1
- package/src/types.ts +2 -4
- /package/dist/{infer.js.map → oas.js.map} +0 -0
- /package/src/{infer → oas}/mappers.ts +0 -0
- /package/src/{infer → oas}/model.ts +0 -0
- /package/src/{infer → oas}/requestParams.ts +0 -0
- /package/src/{infer → oas}/response.ts +0 -0
- /package/src/{infer → oas}/security.ts +0 -0
package/dist/components.d.cts
CHANGED
@@ -73,9 +73,7 @@ type Options = {
|
|
73
73
|
name?: (name: ResolveNameParams['name'], type?: ResolveNameParams['type']) => string;
|
74
74
|
};
|
75
75
|
/**
|
76
|
-
* Export Oas object as Oas type with import type { Infer } from
|
77
|
-
* TODO add docs
|
78
|
-
* @beta
|
76
|
+
* Export an Oas object as Oas type with `import type { Infer } from '@kubb/swagger-ts/oas'`
|
79
77
|
*/
|
80
78
|
oasType?: boolean;
|
81
79
|
};
|
package/dist/components.d.ts
CHANGED
@@ -73,9 +73,7 @@ type Options = {
|
|
73
73
|
name?: (name: ResolveNameParams['name'], type?: ResolveNameParams['type']) => string;
|
74
74
|
};
|
75
75
|
/**
|
76
|
-
* Export Oas object as Oas type with import type { Infer } from
|
77
|
-
* TODO add docs
|
78
|
-
* @beta
|
76
|
+
* Export an Oas object as Oas type with `import type { Infer } from '@kubb/swagger-ts/oas'`
|
79
77
|
*/
|
80
78
|
oasType?: boolean;
|
81
79
|
};
|
package/dist/components.js
CHANGED
@@ -3192,7 +3192,7 @@ function Template({
|
|
3192
3192
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
3193
3193
|
`export const ${name} = ${JSON.stringify(api, void 0, 2)} as const`,
|
3194
3194
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("br", {}),
|
3195
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Type, { name: typeName, export: true, children: `
|
3195
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Type, { name: typeName, export: true, children: `Infer<typeof ${name}>` })
|
3196
3196
|
] });
|
3197
3197
|
}
|
3198
3198
|
var defaultTemplates = { default: Template };
|
@@ -3215,7 +3215,7 @@ Oas.File = function({ name, typeName, templates = defaultTemplates }) {
|
|
3215
3215
|
path: file.path,
|
3216
3216
|
meta: file.meta,
|
3217
3217
|
children: [
|
3218
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(File.Import, { name: ["
|
3218
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(File.Import, { name: ["Infer"], path: "@kubb/swagger-ts/oas", isTypeOnly: true }),
|
3219
3219
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(File.Source, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Oas, { Template: Template2, name, typeName }) })
|
3220
3220
|
]
|
3221
3221
|
}
|